diff --git a/minet/cli/fetch/fetch.py b/minet/cli/fetch/fetch.py index 3f97a51386..7fba5db13e 100644 --- a/minet/cli/fetch/fetch.py +++ b/minet/cli/fetch/fetch.py @@ -461,7 +461,6 @@ def worker_callback( # Screenshot elif cli_args.action == "screenshot": - import asyncio from playwright.async_api import ( Error as PlaywrightError, TimeoutError as PlaywrightTimeoutError, @@ -523,7 +522,7 @@ async def screenshot( ) if cli_args.wait is not None: - await asyncio.sleep(cli_args.wait) + await page.wait_for_timeout(cli_args.wait * 1000) await page.screenshot( path=pathjoin(cli_args.output_dir, filename),