support to scrape on the chrome error page (#4018)
Some checks are pending
Run tests and pre-commit / Run tests and pre-commit hooks (push) Waiting to run
Run tests and pre-commit / Frontend Lint and Build (push) Waiting to run
Publish Fern Docs / run (push) Waiting to run

This commit is contained in:
LawyZheng 2025-11-18 17:12:11 +08:00 committed by GitHub
parent ce76b400a9
commit 5ead565fd8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -791,7 +791,11 @@ class BrowserState:
return [
http_page
for http_page in self.browser_context.pages
if http_page.url == "about:blank" or urlparse(http_page.url).scheme in ["http", "https"]
if (
http_page.url == "about:blank"
or http_page.url == "chrome-error://chromewebdata/"
or urlparse(http_page.url).scheme in ["http", "https"]
)
]
async def validate_browser_context(self, page: Page) -> bool: