Repository navigation
[Feature Request]: Lightweight HTTP-only crawling mode via DOM AST pruning (no browser required) #2355
Replies: 1 comment
|
The browser-free transport already exists as That keeps the existing scraping and Markdown pipeline. Configure I ran this path on 0.9.5 from that revision against a local HTTP fixture. It produced raw Markdown, removed the excluded navigation, retained the relevant paragraphs in BM25 fit Markdown, and blocked a disallowed URL before fetching that page. No browser or external website was used. The useful next comparison would be your pruning approach against this existing HTTP path, with the same pages and reused sessions. Check preservation of task-relevant tables, code and links alongside token count and latency. A large token reduction alone does not establish equivalent extraction quality, and the proposed speed and memory gains still need measurement. |
Uh oh!
There was an error while loading. Please reload this page.
What needs to be done?
Add an optional HTTP-only crawling strategy that fetches pages via plain HTTP and prunes the DOM AST directly — without launching a Playwright browser instance.
The strategy would:
New class:
AsyncHTTPCrawlerStrategyas a sibling to the existingAsyncPlaywrightCrawlerStrategyWhat problem does this solve?
For static and SSR-rendered pages (~60–70% of real-world crawl targets), spinning up a Playwright browser adds substantial overhead:
There's currently no way to opt out of the browser layer even when JavaScript rendering isn't needed. This blocks Crawl4AI from being used in high-throughput, resource-constrained pipelines (serverless, edge, batch RAG ingestion).
Target users/beneficiaries
Current alternatives/workarounds
normalization, and async dispatcher
the full browser startup cost
Benchmark from a reference implementation using the same DOM AST approach:
Parse time: ~11ms/page vs ~300ms Playwright cold start.
Reference: https://github.com/dong7812/dompruner-mcp
Proposed approach
New strategy class
AsyncHTTPCrawlerStrategyin async_crawler_strategy.pyPlug into the existing pipeline unchanged:
Opt-in via config:
crawler_config = CrawlerRunConfig(crawler_strategy="http")
Foreseeable challenges:
→ document clearly; auto-fallback to Playwright could be a follow-up
Success metric: same Markdown output quality as Playwright for static pages, with ≥10x reduction in memory footprint and ≥5x reduction in per-page latency.
Happy to prototype a PR targeting the develop branch.
All reactions