har2tree 1.27.10__py3-none-any.whl → 1.28.0__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/har2tree.py +3 -2
- har2tree/helper.py +7 -1
- {har2tree-1.27.10.dist-info → har2tree-1.28.0.dist-info}/METADATA +4 -4
- har2tree-1.28.0.dist-info/RECORD +10 -0
- {har2tree-1.27.10.dist-info → har2tree-1.28.0.dist-info}/WHEEL +1 -1
- har2tree-1.27.10.dist-info/RECORD +0 -10
- {har2tree-1.27.10.dist-info → har2tree-1.28.0.dist-info}/LICENSE +0 -0
har2tree/har2tree.py
CHANGED
|
@@ -191,7 +191,7 @@ class HarFile():
|
|
|
191
191
|
self.final_redirect = self.final_redirect.split('?', 1)[0]
|
|
192
192
|
self._search_final_redirect()
|
|
193
193
|
else:
|
|
194
|
-
self.logger.
|
|
194
|
+
self.logger.info(f'Unable to find the final redirect: {self.final_redirect}')
|
|
195
195
|
|
|
196
196
|
@property
|
|
197
197
|
def number_entries(self) -> int:
|
|
@@ -566,7 +566,8 @@ class Har2Tree:
|
|
|
566
566
|
if node:
|
|
567
567
|
return node[0]
|
|
568
568
|
|
|
569
|
-
|
|
569
|
+
browser_errors = ['chrome-error', 'about:blank']
|
|
570
|
+
if self.har.final_redirect and not any(self.har.final_redirect.startswith(r) for r in browser_errors):
|
|
570
571
|
self.logger.warning(f'Final redirect URL from adress bar not in tree: {self.har.final_redirect}')
|
|
571
572
|
else:
|
|
572
573
|
# No final redirect, already logged earlier.
|
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
|
-
|
|
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.
|
|
3
|
+
Version: 1.28.0
|
|
4
4
|
Summary: HTTP Archive (HAR) to ETE Toolkit generator
|
|
5
5
|
License: BSD-3-Clause
|
|
6
6
|
Author: Raphaël Vinot
|
|
@@ -25,9 +25,9 @@ Requires-Dist: beautifulsoup4[charset-normalizer,lxml] (>=4.13.3)
|
|
|
25
25
|
Requires-Dist: ete3 (>=3.1.3)
|
|
26
26
|
Requires-Dist: filetype (>=1.2.0)
|
|
27
27
|
Requires-Dist: legacy-cgi (>=2.6.2) ; python_version >= "3.13,<4.0"
|
|
28
|
-
Requires-Dist: numpy (
|
|
29
|
-
Requires-Dist: numpy (>=2.2.
|
|
30
|
-
Requires-Dist: publicsuffixlist (>=1.0.2.
|
|
28
|
+
Requires-Dist: numpy (<2.1) ; python_version == "3.9"
|
|
29
|
+
Requires-Dist: numpy (>=2.2.3) ; python_version >= "3.10"
|
|
30
|
+
Requires-Dist: publicsuffixlist (>=1.0.2.20250213)
|
|
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)
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
har2tree/__init__.py,sha256=Na3mxHkUBq3rzYbxiLNJF37DxH5mcghSorjzXw5Teug,422
|
|
2
|
+
har2tree/har2tree.py,sha256=47x9X5tY69f9SXkYJgJsnAaX2kxgXHgzFThGz6M86Zw,44495
|
|
3
|
+
har2tree/helper.py,sha256=c2i6yQo-yREMJ1cF006LUREsLfJppiqp_7SOpmvK7D8,20279
|
|
4
|
+
har2tree/nodes.py,sha256=CC3NseEaM455JOpPqjfTAQ-dwWiGWmzlceGSSeTwoRo,28951
|
|
5
|
+
har2tree/parser.py,sha256=4yej1OcVYAIiLfzYZsO9WCw3WyM_ykDTuvpW7UO1ROE,3645
|
|
6
|
+
har2tree/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
|
+
har2tree-1.28.0.dist-info/LICENSE,sha256=Xa4EVROgJsEo10CW-ISCRiw0TtqdKz1JuM3BBLBM55c,1803
|
|
8
|
+
har2tree-1.28.0.dist-info/METADATA,sha256=kTxj2vQ1VZmwuF9ygH1CwjrU3BhuKDAmpaseA1EGXq0,2058
|
|
9
|
+
har2tree-1.28.0.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
|
|
10
|
+
har2tree-1.28.0.dist-info/RECORD,,
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
har2tree/__init__.py,sha256=Na3mxHkUBq3rzYbxiLNJF37DxH5mcghSorjzXw5Teug,422
|
|
2
|
-
har2tree/har2tree.py,sha256=Q7D5xkz5XIPXikX0yj7DkfVlYAntGtaPy3gCcs9nnCY,44366
|
|
3
|
-
har2tree/helper.py,sha256=V4kkajF8hnVMkoXPWMBmIFLp1VNDROha-BYsCyu6EHY,19973
|
|
4
|
-
har2tree/nodes.py,sha256=CC3NseEaM455JOpPqjfTAQ-dwWiGWmzlceGSSeTwoRo,28951
|
|
5
|
-
har2tree/parser.py,sha256=4yej1OcVYAIiLfzYZsO9WCw3WyM_ykDTuvpW7UO1ROE,3645
|
|
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,,
|
|
File without changes
|