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: