Open
Conversation
…c providers Add LLM-based extraction support alongside the existing CSS selector strategy. Fields with only a description (no selector) can now be extracted via LLM providers. - Add ExtractionStrategy enum (CSS, LLM, AUTO) and LLMProvider protocol - Add OpenAI and Anthropic built-in providers using aiohttp (no SDK dependency) - Add clean_html utility for HTML-to-clean-HTML conversion (boilerplate removal) - Add html_to_markdown converter with Readability-inspired heuristics - Add tab.llm_provider and tab.extraction_strategy convenience properties - Add validate_llm_provider for fail-fast when LLM is needed but not configured - Add LLMExtractionFailed and LLMProviderNotConfigured exceptions Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… protocol base Move all CDP protocol definitions from protocol/ to protocol/cdp/ to make room for the new BiDi protocol subpackage. Add initial BiDi base types and session/browser module definitions for Firefox support.
…nection handler Split ConnectionHandler into BaseConnectionHandler (ABC) with shared WebSocket mechanics and CDPConnectionHandler / BiDiConnectionHandler implementations. Extract CDP-specific event tracking from EventsManager into CDPEventTracker and BiDiEventTracker classes.
…hromium Rename interfaces.py to protocols.py with OptionsProtocol and BrowserOptionsManagerProtocol using typing.Protocol instead of ABC. Move options.py and tab.py into chromium/ subpackage. Merge ChromiumOptionsManager into chromium/options.py. Use OptionsProtocol in managers for dependency inversion.
Add FirefoxBrowser base class and Firefox implementation using BiDi connection handler. Same public API as Chromium Browser with typed command execution. Unsupported CDP-specific methods raise UnsupportedOperation.
…ic methods Add pydoll/protocol/types.py with protocol-agnostic types (Header, Cookie, CookieParam, WindowBounds, BrowserVersion, DownloadBehavior, RequestMethod). Privatize CDP-specific methods in Browser and Tab: enable/disable domain events, get_targets, get_tab_by_target, get_window_id_for_target, get_window_id. Update get_version to return BrowserVersion, set_window_bounds to accept WindowBounds, remove events_enabled from set_download_behavior. Add plan.md for unified API migration.
Update FirefoxBrowser to use BrowserVersion, Cookie, CookieParam, DownloadBehavior, WindowBounds from pydoll.protocol.types. Convert between generic and BiDi-specific formats internally. Remove CDP-specific stubs, keep get_opened_tabs as NotImplementedError until BiDi Tab is built.
…requests Add pydoll/protocol/events.py with Event enum and CDP/BiDi mapping. Add InterceptedRequest for protocol-agnostic request interception. Implement intercept_requests()/remove_intercept() in both Chrome and Firefox browsers. Update on() to accept Event enum with auto-enable for CDP domains. Fix BiDi Command type aliases to wrap with CommandResponse for correct typing.
…s, and cookies Add BiDiTab class using shared BiDi connection with context ID. Implements go_to, refresh, close, bring_to_front, title, current_url, page_source, take_screenshot, print_to_pdf, execute_script, cookies, dialog handling, on/remove_callback, and network_logs. Update FirefoxBrowser with start returning tab, get_opened_tabs, and new_tab.
Convert BiDi remote values (number, string, boolean, null, undefined, array, object, map, set, date, regexp, bigint) to native Python types instead of returning raw protocol dicts.
… implementation Extract CDP-specific element finding logic into CDPFindElementsMixin. FindElementsMixin now contains only protocol-agnostic code (find, query, retry/timeout, selector parsing). Add WebElementProtocol in elements/protocols.py. Move web_element.py and shadow_root.py into elements/cdp/ subpackage. Privatize find_or_wait_element.
…recorder and tests
Implement BiDi element finding using browsingContext.locateNodes with typed Locator variants (CssLocator, XPathLocator). BiDiWebElement uses sharedId for element references and script.callFunction for all interactions (click, text, visibility, etc). BiDiTab now inherits BidiFindElementsMixin for find()/query() support.
|
Important Review skippedToo many files! This PR contains 198 files, which is 48 over the limit of 150. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (198)
You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.