fix(web-crawler): remove Playwright rendering andoptimize the robots.txt entry-failure message - #3040
Merged
qin-ctx merged 2 commits intoJul 6, 2026
Conversation
…hells Drop the Playwright-based fallback rendering path so SPA pages are stored as their static shell HTML instead of being rendered headlessly. SPA shells now surface the <noscript> notice (e.g. "You need to enable JavaScript to run this app.") rather than producing an empty document, and robots.txt-blocked entry pages get a human-readable error message. - Delete playwright_renderer.py, render_heuristics.py and their tests - Strip fallback_playwright/playwright_timeout config, fallback_rendered counter, and render-hint plumbing from the crawler and web importer - HTMLParser: drop the SPA-empty-pattern stripping and fall back to <noscript> text when trafilatura extracts nothing - Humanize the robots.txt entry-failure message - Migrate the orphaned _convert_to_raw_url tests to HTTPAccessor (the method moved there in an earlier reorg) and remove the stale file
Replace the verbose robots.txt explanation with a short compliance hint that omits the URL and points users to local-file import instead.
qin-ctx
approved these changes
Jul 6, 2026
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.
Description
从递归网页爬虫中移除基于 Playwright 的回退渲染路径。SPA 页面现在直接存储为静态 shell HTML,不再启动 headless 浏览器渲染,恢复了爬虫原本轻量、无额外依赖的行为。为避免产出空文档,SPA 空壳页现在会保留 提示语(例如 You need to enable JavaScript to run this app. );被 robots.txt 拦截的入口页也会返回更易读的报错。
Related Issue
Type of Change
Changes Made
Testing
本地相关测试套件全部通过( tests/parse/ 、 tests/parse/accessors/web_crawler/ 、 tests/unit/test_web_importer.py 、 tests/unit/test_accessors_http.py )——共 160 passed。
Checklist
Additional Notes