har2tree 1.31.0__py3-none-any.whl → 1.31.1__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 +6 -1
- {har2tree-1.31.0.dist-info → har2tree-1.31.1.dist-info}/METADATA +3 -3
- {har2tree-1.31.0.dist-info → har2tree-1.31.1.dist-info}/RECORD +5 -5
- {har2tree-1.31.0.dist-info → har2tree-1.31.1.dist-info}/LICENSE +0 -0
- {har2tree-1.31.0.dist-info → har2tree-1.31.1.dist-info}/WHEEL +0 -0
har2tree/helper.py
CHANGED
|
@@ -283,7 +283,12 @@ def make_soup(html: bytes) -> BeautifulSoup:
|
|
|
283
283
|
if doc_as_str.startswith('<?xml'):
|
|
284
284
|
return BeautifulSoup(doc_as_str, 'lxml-xml')
|
|
285
285
|
else:
|
|
286
|
-
|
|
286
|
+
try:
|
|
287
|
+
return BeautifulSoup(doc_as_str, 'lxml')
|
|
288
|
+
except Exception as e:
|
|
289
|
+
logger.warning(f'Unable to parse doc with lxml, try again with the default parser: {e}')
|
|
290
|
+
# Fallback to the default python parser
|
|
291
|
+
return BeautifulSoup(doc_as_str, 'html.parser')
|
|
287
292
|
|
|
288
293
|
# The CSS processing bit is taked out of WeasyPrint
|
|
289
294
|
# https://github.com/Kozea/WeasyPrint/blob/main/weasyprint/css/__init__.py#L876 -> preprocess_stylesheet
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: har2tree
|
|
3
|
-
Version: 1.31.
|
|
3
|
+
Version: 1.31.1
|
|
4
4
|
Summary: HTTP Archive (HAR) to ETE Toolkit generator
|
|
5
5
|
License: BSD-3-Clause
|
|
6
6
|
Author: Raphaël Vinot
|
|
@@ -27,8 +27,8 @@ Requires-Dist: filetype (>=1.2.0)
|
|
|
27
27
|
Requires-Dist: legacy-cgi (>=2.6.3) ; python_version >= "3.13,<4.0"
|
|
28
28
|
Requires-Dist: numpy (<2.1) ; python_version < "3.10"
|
|
29
29
|
Requires-Dist: numpy (<2.3) ; python_version < "3.11"
|
|
30
|
-
Requires-Dist: numpy (>=2.3.
|
|
31
|
-
Requires-Dist: publicsuffixlist (>=1.0.2.
|
|
30
|
+
Requires-Dist: numpy (>=2.3.1) ; python_version >= "3.11"
|
|
31
|
+
Requires-Dist: publicsuffixlist (>=1.0.2.20250627)
|
|
32
32
|
Requires-Dist: six (>=1.17.0) ; extra == "docs"
|
|
33
33
|
Requires-Dist: tinycss2 (>=1.4.0)
|
|
34
34
|
Requires-Dist: w3lib (>=2.3.1)
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
har2tree/__init__.py,sha256=Na3mxHkUBq3rzYbxiLNJF37DxH5mcghSorjzXw5Teug,422
|
|
2
2
|
har2tree/har2tree.py,sha256=47x9X5tY69f9SXkYJgJsnAaX2kxgXHgzFThGz6M86Zw,44495
|
|
3
|
-
har2tree/helper.py,sha256=
|
|
3
|
+
har2tree/helper.py,sha256=mwCNI4YHyuVGFT11GgeYclsk6m5kKNr2Q6YWY-VNs3U,20540
|
|
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.31.
|
|
8
|
-
har2tree-1.31.
|
|
9
|
-
har2tree-1.31.
|
|
10
|
-
har2tree-1.31.
|
|
7
|
+
har2tree-1.31.1.dist-info/LICENSE,sha256=Xa4EVROgJsEo10CW-ISCRiw0TtqdKz1JuM3BBLBM55c,1803
|
|
8
|
+
har2tree-1.31.1.dist-info/METADATA,sha256=uH1yroPazJiA1ISX9v8nr7WWFk7_a_qn8EkknivK4j0,2112
|
|
9
|
+
har2tree-1.31.1.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
|
10
|
+
har2tree-1.31.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|