chore: drop explanatory comments

This commit is contained in:
ThePhaseless
2026-08-11 11:23:31 +02:00
parent d3a828e814
commit 9b933ea70c
2 changed files with 0 additions and 10 deletions
-5
View File
@@ -153,11 +153,6 @@ async def read_item(request: LinkRequest, dep: BrowserDep) -> LinkResponse:
else await dep.page.content()
)
# The User-Agent the target site actually saw, taken from the navigation
# request headers. page.evaluate falls through to eval() in the page's
# main world and fails whenever the page CSP disallows eval (e.g. the
# Firefox JSON viewer in #394, or uncatchable meta-tag CSP), so evaluate
# is only a fallback and its failure must not turn the request into a 500.
user_agent = (
page_request.request.headers.get("user-agent") if page_request else None
)
-5
View File
@@ -96,11 +96,6 @@ async def get_browser(
proxy=proxy_config,
humanize=True,
locale=BROWSER_LOCALE or "auto",
# Firefox renders application/json documents in a built-in viewer whose
# own CSP (`script-src resource:`) blocks Playwright's eval-based
# evaluate(), crashing /v1 on JSON APIs (issue #394). Disabling the
# viewer renders JSON as plain text: evaluate works and consumers get
# the raw JSON instead of the viewer's HTML markup.
extra_prefs={"devtools.jsonview.enabled": False},
) as browser_raw:
# InvisiblePlaywright yields a Browser instance