fix(fetchers): better handling for infinite network_idle
This commit is contained in:
@@ -105,7 +105,7 @@ class SyncSession:
|
||||
"""Wait for the page to become idle (no network activity) even if there are never-ending requests."""
|
||||
try:
|
||||
page.wait_for_load_state("networkidle", timeout=timeout)
|
||||
except PlaywrightError:
|
||||
except (PlaywrightError, Exception):
|
||||
pass
|
||||
|
||||
def _wait_for_page_stability(self, page: Page | Frame, load_dom: bool, network_idle: bool):
|
||||
@@ -221,7 +221,7 @@ class AsyncSession:
|
||||
"""Wait for the page to become idle (no network activity) even if there are never-ending requests."""
|
||||
try:
|
||||
await page.wait_for_load_state("networkidle", timeout=timeout)
|
||||
except PlaywrightError:
|
||||
except (PlaywrightError, Exception):
|
||||
pass
|
||||
|
||||
async def _wait_for_page_stability(self, page: AsyncPage | AsyncFrame, load_dom: bool, network_idle: bool):
|
||||
|
||||
Reference in New Issue
Block a user