har2tree 1.27.10__py3-none-any.whl → 1.27.11__py3-none-any.whl

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.
har2tree/helper.py CHANGED
@@ -333,8 +333,14 @@ def find_external_ressources_in_css(css: str) -> list[str]:
333
333
  for r in __flatten_rules(rules):
334
334
  # other entries may have urls, but they will always be in a url() function
335
335
  if r.type == 'url':
336
- to_return.append(r.value)
336
+ try:
337
+ to_return.append(r.value)
338
+ except Exception as e:
339
+ logger.warning(f'Parsing error in tinycss2: {e} - {r}')
337
340
  elif r.type == 'function' and r.lower_name == 'url':
341
+ if isinstance(r.arguments[0], tinycss2.ast.ParseError):
342
+ # CSS is broken, cannot parse it. Generally a missing closing quote.
343
+ continue
338
344
  to_return.append(r.arguments[0].value)
339
345
  return to_return
340
346
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: har2tree
3
- Version: 1.27.10
3
+ Version: 1.27.11
4
4
  Summary: HTTP Archive (HAR) to ETE Toolkit generator
5
5
  License: BSD-3-Clause
6
6
  Author: Raphaël Vinot
@@ -27,7 +27,7 @@ Requires-Dist: filetype (>=1.2.0)
27
27
  Requires-Dist: legacy-cgi (>=2.6.2) ; python_version >= "3.13,<4.0"
28
28
  Requires-Dist: numpy (<=2.1) ; python_version == "3.9"
29
29
  Requires-Dist: numpy (>=2.2.2) ; python_version >= "3.10"
30
- Requires-Dist: publicsuffixlist (>=1.0.2.20250202)
30
+ Requires-Dist: publicsuffixlist (>=1.0.2.20250212)
31
31
  Requires-Dist: six (>=1.17.0) ; extra == "docs"
32
32
  Requires-Dist: tinycss2 (>=1.4.0)
33
33
  Requires-Dist: w3lib (>=2.3.1)
@@ -1,10 +1,10 @@
1
1
  har2tree/__init__.py,sha256=Na3mxHkUBq3rzYbxiLNJF37DxH5mcghSorjzXw5Teug,422
2
2
  har2tree/har2tree.py,sha256=Q7D5xkz5XIPXikX0yj7DkfVlYAntGtaPy3gCcs9nnCY,44366
3
- har2tree/helper.py,sha256=V4kkajF8hnVMkoXPWMBmIFLp1VNDROha-BYsCyu6EHY,19973
3
+ har2tree/helper.py,sha256=c2i6yQo-yREMJ1cF006LUREsLfJppiqp_7SOpmvK7D8,20279
4
4
  har2tree/nodes.py,sha256=CC3NseEaM455JOpPqjfTAQ-dwWiGWmzlceGSSeTwoRo,28951
5
5
  har2tree/parser.py,sha256=4yej1OcVYAIiLfzYZsO9WCw3WyM_ykDTuvpW7UO1ROE,3645
6
6
  har2tree/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
- har2tree-1.27.10.dist-info/LICENSE,sha256=Xa4EVROgJsEo10CW-ISCRiw0TtqdKz1JuM3BBLBM55c,1803
8
- har2tree-1.27.10.dist-info/METADATA,sha256=gKhIkVaByZEQ0o_P3nWzJ9FjzzMK2eaFjJfeb-TxWvo,2060
9
- har2tree-1.27.10.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
10
- har2tree-1.27.10.dist-info/RECORD,,
7
+ har2tree-1.27.11.dist-info/LICENSE,sha256=Xa4EVROgJsEo10CW-ISCRiw0TtqdKz1JuM3BBLBM55c,1803
8
+ har2tree-1.27.11.dist-info/METADATA,sha256=oiBxOFXHBhCfoAY1eLMFJ_7j1Knnob75ZGuVg7jWE3o,2060
9
+ har2tree-1.27.11.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
10
+ har2tree-1.27.11.dist-info/RECORD,,