har2tree 1.36.1__py3-none-any.whl → 1.36.2__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 CHANGED
@@ -798,7 +798,7 @@ class Har2Tree:
798
798
  # AND we already have a node in the tree with this pageref
799
799
  # => attach to that node.
800
800
  if ('pages' in self.har.har['log'] and len(self.har.har['log']['pages']) > 1
801
- and node.pageref != self.har.har['log']['pages'][0]
801
+ and hasattr(node, 'pageref') and node.pageref != self.har.har['log']['pages'][0]
802
802
  and self.pages_root[node.pageref] != node.uuid):
803
803
  # In that case, we check if there is already a page with the pageref of the orphan node,
804
804
  # and attach the node to that.
@@ -824,7 +824,7 @@ class Har2Tree:
824
824
  # No luck, the node is root for this pageref, let's attach it to the prior page in the list, or the very first node (tree root)
825
825
  page_before = self.har.har['log']['pages'][0]
826
826
  for page in self.har.har['log']['pages'][1:]:
827
- if page['id'] == node.pageref:
827
+ if hasattr(node, 'pageref') and page['id'] == node.pageref:
828
828
  break
829
829
  # Sometimes, the page listed in the list of pages is not related to
830
830
  # any of the entries. Go figure what happened.
har2tree/helper.py CHANGED
@@ -268,7 +268,7 @@ def find_identifiers(soup: BeautifulSoup) -> dict[str, list[str]] | None:
268
268
  # This is beta and kinda fragile, but it's going to find (most) of the google tag IDs
269
269
  # https://support.google.com/google-ads/answer/12326985?hl=en_us_us
270
270
  # NOTE: the doc says 9 X, but all the examples I found have 10 X so we cannot trust it
271
- if google_tag_ids := set(re.findall(r"(?:G-|AW-|GA-|UA-)\w{9,13}", str(soup))):
271
+ if google_tag_ids := set(re.findall(r"(?:G-|AW-|GA-|UA-|GTM-)\w{9,15}", str(soup))):
272
272
  blocklist = {'UA-Compatible'}
273
273
  google_tag_ids -= blocklist
274
274
  if google_tag_ids:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: har2tree
3
- Version: 1.36.1
3
+ Version: 1.36.2
4
4
  Summary: HTTP Archive (HAR) to ETE Toolkit generator
5
5
  License-Expression: BSD-3-Clause
6
6
  License-File: LICENSE
@@ -20,7 +20,7 @@ Classifier: Programming Language :: Python :: 3.14
20
20
  Classifier: Topic :: Internet
21
21
  Classifier: Topic :: Security
22
22
  Provides-Extra: docs
23
- Requires-Dist: Sphinx (>=9.0.4) ; (python_version >= "3.11") and (extra == "docs")
23
+ Requires-Dist: Sphinx (>=9.1.0) ; (python_version >= "3.12") and (extra == "docs")
24
24
  Requires-Dist: beautifulsoup4[charset-normalizer,lxml] (>=4.14.3)
25
25
  Requires-Dist: ete3 (>=3.1.3)
26
26
  Requires-Dist: filetype (>=1.2.0)
@@ -28,8 +28,8 @@ Requires-Dist: json-stream (>=2.3.3,<3.0.0)
28
28
  Requires-Dist: legacy-cgi (>=2.6.4) ; python_version >= "3.13" and python_version < "4.0"
29
29
  Requires-Dist: multipart (>=1.3.0,<2.0.0)
30
30
  Requires-Dist: numpy (>=2.2,<2.3) ; python_version < "3.11"
31
- Requires-Dist: numpy (>=2.3.5) ; python_version >= "3.11" and python_version < "4.0"
32
- Requires-Dist: publicsuffixlist (>=1.0.2.20251217)
31
+ Requires-Dist: numpy (>=2.4.1) ; python_version >= "3.11" and python_version < "4.0"
32
+ Requires-Dist: publicsuffixlist (>=1.0.2.20260126)
33
33
  Requires-Dist: requests-toolbelt (>=1.0.0,<2.0.0)
34
34
  Requires-Dist: six (>=1.17.0) ; extra == "docs"
35
35
  Requires-Dist: tinycss2 (>=1.5.1)
@@ -0,0 +1,10 @@
1
+ har2tree/__init__.py,sha256=Na3mxHkUBq3rzYbxiLNJF37DxH5mcghSorjzXw5Teug,422
2
+ har2tree/har2tree.py,sha256=OgWvSFwGnND_Cul4UnUGl3tRml4X3po9a4aVJcvs-R8,54338
3
+ har2tree/helper.py,sha256=KCZ6b3feJcHHXAlNv7Mw8YJ6l-HmwXapP43yBOFi4BE,20742
4
+ har2tree/nodes.py,sha256=QWKqEUnuW7J6pASVvzwWAQNqL-_KDzSs2ld6uJl3qbw,37710
5
+ har2tree/parser.py,sha256=4yej1OcVYAIiLfzYZsO9WCw3WyM_ykDTuvpW7UO1ROE,3645
6
+ har2tree/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
+ har2tree-1.36.2.dist-info/METADATA,sha256=Xr9y_8Ihfoq5SCHwrKdNv5x613fpWjYYqqoY9pUvNpI,2239
8
+ har2tree-1.36.2.dist-info/WHEEL,sha256=3ny-bZhpXrU6vSQ1UPG34FoxZBp3lVcvK0LkgUz6VLk,88
9
+ har2tree-1.36.2.dist-info/licenses/LICENSE,sha256=Xa4EVROgJsEo10CW-ISCRiw0TtqdKz1JuM3BBLBM55c,1803
10
+ har2tree-1.36.2.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 2.2.1
2
+ Generator: poetry-core 2.3.0
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
@@ -1,10 +0,0 @@
1
- har2tree/__init__.py,sha256=Na3mxHkUBq3rzYbxiLNJF37DxH5mcghSorjzXw5Teug,422
2
- har2tree/har2tree.py,sha256=4SYegFw2ycH6kJTkUTTrJb2f6D4ekITEkyZ-4it1PsA,54280
3
- har2tree/helper.py,sha256=ktX5Fq-K_t4r0VVAXIH4uy7xc-qCjtSaiUvkX_PYxhw,20737
4
- har2tree/nodes.py,sha256=QWKqEUnuW7J6pASVvzwWAQNqL-_KDzSs2ld6uJl3qbw,37710
5
- har2tree/parser.py,sha256=4yej1OcVYAIiLfzYZsO9WCw3WyM_ykDTuvpW7UO1ROE,3645
6
- har2tree/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
- har2tree-1.36.1.dist-info/METADATA,sha256=QuSZMYKNtpaVwtP8AVjFk_xFS1g0_kmPJ5V78nIQV_8,2239
8
- har2tree-1.36.1.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
9
- har2tree-1.36.1.dist-info/licenses/LICENSE,sha256=Xa4EVROgJsEo10CW-ISCRiw0TtqdKz1JuM3BBLBM55c,1803
10
- har2tree-1.36.1.dist-info/RECORD,,