docs: add Obscura as a CDP backend example#2005
Open
SGavrl wants to merge 1 commit into
Open
Conversation
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.
Summary
Adds a runnable example that connects Crawl4AI to Obscura, an open-source Rust
headless browser, over CDP. Obscura speaks the DevTools Protocol, so Crawl4AI
drives it through the existing
cdp_urlpath with no library changes (samepattern as the Scrapeless example). No issue to link, this is a new example only.
List of files changed and why
docs/examples/obscura_cdp_backend.py- new example. Startobscura serve,connect with
BrowserConfig(browser_mode="cdp", cdp_url=...), and crawl astatic page plus a JS-rendered page to Markdown.
How Has This Been Tested?
Built Obscura from source, ran
obscura serve --port 9222, and ran Crawl4AIagainst it through
connect_over_cdp. Verified:were extracted after Obscura ran the page JS (they are not in the raw HTML)
wait_for="css:div.quote"js_codeexecution before extractionJsonCssExtractionStrategy(10 quotes with authors)Also ran the project's unit tests:
pytest tests/unit/-> 48 passed. Thebrowser and integration suites need a chromium binary plus network/API access
not available in my environment; this PR adds an example file and touches no
library code, so it does not affect them.
Screenshots and PDFs are not supported by Obscura (no paint engine) and are out
of scope.
Checklist: