How sexfrance/truedriver works
Truedriver is an async Python browser-automation and scraping framework built on Chrome DevTools Protocol (CDP). A developer starts a Browser, opens a page through a Tab, locates and interacts with Elements (including within iframes), then reads page content or saves outputs. The main internal layers are browser lifecycle/configuration, tab and element APIs, and the CDP command/event transport. The README also documents cookies/profiles, proxy authentication, stealth configuration, and broad CDP capabilities. Some feature wiring is inferred only from documentation and the sampled excerpts, so uncertain links are omitted.
Main entry points: tab.py Tab navigation · __init__.py CDP domains · browser.py Browser lifecycle · element.py Element operations
Components 19
Automation API
- Public API
truedriver/__init__.py - Startup helpers
truedriver/core/util.py
Browser Runtime
- Browser config
truedriver/core/config.py - Browser lifecycle
truedriver/core/browser.py
Page Interaction
- Tab navigation
truedriver/core/tab.py - Element operations
truedriver/core/element.py - Wait conditions
truedriver/core/expect.py - Request interception
truedriver/core/intercept.py
CDP Protocol
- WebSocket transport
truedriver/core/connection.py - Page commands
truedriver/cdp/page.py - DOM commands
truedriver/cdp/dom.py - Runtime commands
truedriver/cdp/runtime.py - Input commands
truedriver/cdp/input_.py - Network commands
truedriver/cdp/network.py - Fetch commands
truedriver/cdp/fetch.py - CDP domains
truedriver/cdp/__init__.py
Other components
- Python developer
- Chrome-family browser
- Proxy service
Connections 26
- Python developer → Public API: uses
- Public API → Startup helpers: exports
- Startup helpers → Browser config: configures
- Startup helpers → Browser lifecycle: starts
- Browser lifecycle → WebSocket transport: opens transport
- Browser lifecycle → Tab navigation: opens tabs
- Tab navigation → WebSocket transport: sends commands
- Tab navigation → Page commands: navigates via
- Tab navigation → DOM commands: queries via
- Tab navigation → Runtime commands: evaluates via
- Tab navigation → Element operations: returns elements
- Element operations → Tab navigation: uses tab
- Element operations → DOM commands: resolves nodes
- Element operations → Input commands: dispatches input
- Wait conditions → Tab navigation: waits on
- Request interception → Fetch commands: uses commands
- Browser lifecycle → Network commands: handles proxy auth
- Browser lifecycle → Browser config: reads settings
- WebSocket transport → Chrome-family browser: exchanges CDP
- CDP domains → Page commands: includes
- CDP domains → DOM commands: includes
- CDP domains → Runtime commands: includes
- CDP domains → Input commands: includes
- CDP domains → Network commands: includes
- CDP domains → Fetch commands: includes
- Browser config → Proxy service: configures proxy