Skip to content

Commit

Permalink
fix: Print the actual number of URLs we still have to capture
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafiot committed Dec 8, 2023
1 parent 4107a33 commit b03dad1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions playwrightcapture/capture.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit b03dad1

Please sign in to comment.