Skip to content

Commit

Permalink
fix: Exception with clock on subsequent captures.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafiot committed Dec 2, 2024
1 parent 3743194 commit 9944232
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions playwrightcapture/capture.py
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,8 @@ async def capture_page(self, url: str, *, max_depth_capture_time: int,
page: Page | None=None, depth: int=0,
rendered_hostname_only: bool=True,
with_favicon: bool=False,
allow_tracking: bool=False
allow_tracking: bool=False,
clock_set: bool=False
) -> CaptureResponse:

to_return: CaptureResponse = {}
Expand Down Expand Up @@ -1097,7 +1098,8 @@ async def store_request(request: Request) -> None:
url=url, referer=page.url,
page=page, depth=depth,
rendered_hostname_only=rendered_hostname_only,
max_depth_capture_time=max_capture_time)
max_depth_capture_time=max_capture_time,
clock_set=clock_set)
to_return['children'].append(child_capture) # type: ignore[union-attr]
except (TimeoutError, asyncio.TimeoutError):
self.logger.info(f'Timeout error, took more than {max_capture_time}s. Unable to capture {url}.')
Expand Down

0 comments on commit 9944232

Please sign in to comment.