screenshot: wait for networkidle before screenshotting

This commit is contained in:
Corentin Sechet 2022-04-08 14:15:10 +02:00
parent dc23b0b669
commit 5373c9b10a
1 changed files with 1 additions and 0 deletions

View File

@ -69,6 +69,7 @@ async def _screenshot_url(
) -> None:
page = await browser.new_page()
await page.goto(url)
await page.wait_for_load_state('networkidle')
url_slug = get_url_slug(url)
if not output_path.is_dir():
output_path.mkdir()