From b03dad12b913bdd2ceb30c3de576ef45fdeb5f85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Fri, 8 Dec 2023 18:21:47 +0100 Subject: [PATCH] fix: Print the actual number of URLs we still have to capture --- playwrightcapture/capture.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/playwrightcapture/capture.py b/playwrightcapture/capture.py index 3675ff6..3c6f9f3 100644 --- a/playwrightcapture/capture.py +++ b/playwrightcapture/capture.py @@ -630,10 +630,10 @@ async def handle_download(download: Download) -> None: except (TimeoutError, asyncio.exceptions.TimeoutError): self.logger.info(f'Timeout error, took more than {max_capture_time}s. Unable to capture {url}.') except Exception as e: - self.logger.warning(f'Error while capturing child "{url}": {e}. {total_urls - index - 1} more to go.') + self.logger.warning(f'Error while capturing child "{url}": {e}. {len(child_urls) - index - 1} more to go.') else: runtime = int(time.time() - start_time) - self.logger.info(f'Successfully captured child URL: {url} in {runtime}s. {total_urls - index - 1} to go.') + self.logger.info(f'Successfully captured child URL: {url} in {runtime}s. {len(child_urls) - index - 1} to go.') try: await page.go_back() except PlaywrightTimeoutError: