Skip to content

Commit

Permalink
Fixing screenshot cmd --wait
Browse files Browse the repository at this point in the history
  • Loading branch information
Yomguithereal committed Apr 16, 2024
1 parent 3cef9d2 commit 67518bc
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions minet/cli/fetch/fetch.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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),
Expand Down

0 comments on commit 67518bc

Please sign in to comment.