PlaywrightCapture 1.41.0__tar.gz → 1.41.1__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: PlaywrightCapture
3
- Version: 1.41.0
3
+ Version: 1.41.1
4
4
  Summary: A simple library to capture websites using playwright
5
5
  License-Expression: BSD-3-Clause
6
6
  License-File: LICENSE
@@ -1230,6 +1230,11 @@ class Capture():
1230
1230
  self.logger.warning(f"Unable to get cookies: {e}")
1231
1231
  errors.append(f'Unable to get the cookies: {e}')
1232
1232
  self.should_retry = True
1233
+ except Exception as e:
1234
+ # When the driver explodes for no clear reason.
1235
+ self.logger.warning(f"[Generic Exception] Unable to get cookies: {e}")
1236
+ errors.append(f'[Generic Exception] Unable to get the cookies: {e}')
1237
+ self.should_retry = True
1233
1238
 
1234
1239
  # Collect storage state, including IndexedDB, to capture the full browser state.
1235
1240
  try:
@@ -1243,6 +1248,11 @@ class Capture():
1243
1248
  self.logger.warning(f"Unable to get the storage: {e}")
1244
1249
  errors.append(f'Unable to get the storage: {e}')
1245
1250
  self.should_retry = True
1251
+ except Exception as e:
1252
+ # When the driver explodes for no clear reason.
1253
+ self.logger.warning(f"[Generic Exception] Unable to get the storage: {e}")
1254
+ errors.append(f'[Generic Exception] Unable to get the storage: {e}')
1255
+ self.should_retry = True
1246
1256
 
1247
1257
  try:
1248
1258
  if page.is_closed():
@@ -2304,6 +2314,9 @@ class Capture():
2304
2314
  if url_to_fetch.startswith('/'):
2305
2315
  self.logger.info(f'Landing page not valid, cannot get favicon: {rendered_url}')
2306
2316
  continue
2317
+ if url_to_fetch.startswith('blob'):
2318
+ self.logger.warning(f'Cannot get a favicon from a blob URL: {url_to_fetch}')
2319
+ continue
2307
2320
 
2308
2321
  if self.only_global_lookup:
2309
2322
  not_local, message = self.__check_local_url(url_to_fetch)
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "PlaywrightCapture"
3
- version = "1.41.0"
3
+ version = "1.41.1"
4
4
  description = "A simple library to capture websites using playwright"
5
5
  authors = [
6
6
  {name="Raphaël Vinot", email= "raphael.vinot@circl.lu"}