PlaywrightCapture 1.40.7__tar.gz → 1.40.8__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {playwrightcapture-1.40.7 → playwrightcapture-1.40.8}/PKG-INFO +1 -1
- {playwrightcapture-1.40.7 → playwrightcapture-1.40.8}/playwrightcapture/capture.py +8 -1
- {playwrightcapture-1.40.7 → playwrightcapture-1.40.8}/pyproject.toml +1 -1
- {playwrightcapture-1.40.7 → playwrightcapture-1.40.8}/LICENSE +0 -0
- {playwrightcapture-1.40.7 → playwrightcapture-1.40.8}/README.md +0 -0
- {playwrightcapture-1.40.7 → playwrightcapture-1.40.8}/playwrightcapture/__init__.py +0 -0
- {playwrightcapture-1.40.7 → playwrightcapture-1.40.8}/playwrightcapture/exceptions.py +0 -0
- {playwrightcapture-1.40.7 → playwrightcapture-1.40.8}/playwrightcapture/helpers.py +0 -0
- {playwrightcapture-1.40.7 → playwrightcapture-1.40.8}/playwrightcapture/py.typed +0 -0
- {playwrightcapture-1.40.7 → playwrightcapture-1.40.8}/playwrightcapture/socks5dnslookup.py +0 -0
|
@@ -292,7 +292,7 @@ class Capture():
|
|
|
292
292
|
|
|
293
293
|
return self
|
|
294
294
|
|
|
295
|
-
async def __aexit__(self, exc_type: Any,
|
|
295
|
+
async def __aexit__(self, exc_type: Any, exc_value: Any, traceback: Any) -> bool:
|
|
296
296
|
"""Close browser resources and suppress exceptions like the upstream context manager."""
|
|
297
297
|
|
|
298
298
|
if self.browser.is_connected():
|
|
@@ -315,6 +315,9 @@ class Capture():
|
|
|
315
315
|
except Exception as e:
|
|
316
316
|
self.logger.warning(f'Unable to remove temp HAR file {self._temp_harfile.name}: {e}')
|
|
317
317
|
|
|
318
|
+
if exc_type:
|
|
319
|
+
self.logger.warning(f'An exception occured during the capture: {exc_value}')
|
|
320
|
+
return False
|
|
318
321
|
return True
|
|
319
322
|
|
|
320
323
|
async def setup_page_capture(self, *, allow_tracking: bool=False) -> Page:
|
|
@@ -2275,6 +2278,10 @@ class Capture():
|
|
|
2275
2278
|
try:
|
|
2276
2279
|
self.logger.debug(f'Attempting to fetch favicon from {u}.')
|
|
2277
2280
|
url_to_fetch = urljoin(rendered_url, u)
|
|
2281
|
+
if url_to_fetch.startswith('/'):
|
|
2282
|
+
self.logger.info(f'Landing page not valid, cannot get favicon: {rendered_url}')
|
|
2283
|
+
continue
|
|
2284
|
+
|
|
2278
2285
|
if self.only_global_lookup:
|
|
2279
2286
|
not_local, message = self.__check_local_url(url_to_fetch)
|
|
2280
2287
|
if not_local is False:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|