googlenewsdecoder 0.2.1__tar.gz → 0.2.2__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: googlenewsdecoder
3
- Version: 0.2.1
3
+ Version: 0.2.2
4
4
  Summary: A Python package to decode Google News URLs to their original sources.
5
5
  Keywords: google,news,decoder,google-news,google-news-url,url-decoder,rss,gnews,original-url,redirect,google-news-url-decoder,googlenewsdecoder,google-news-decoder,google-decode
6
6
  Author: SSujitX
@@ -2,7 +2,8 @@ import json
2
2
  import re
3
3
  from urllib.parse import parse_qs, quote, urljoin, urlparse
4
4
 
5
- from selectolax.parser import HTMLParser
5
+ from selectolax.lexbor import LexborHTMLParser
6
+
6
7
 
7
8
  _SG = re.compile(r'data-n-a-sg="([^"]+)"')
8
9
  _TS = re.compile(r'data-n-a-ts="([^"]+)"')
@@ -87,7 +88,7 @@ def parse_signature(html: str) -> tuple[str, str] | None:
87
88
  Returns:
88
89
  ``(signature, timestamp)`` or None if those attributes are missing.
89
90
  """
90
- node = HTMLParser(html).css_first("c-wiz > div[jscontroller]")
91
+ node = LexborHTMLParser(html).css_first("c-wiz > div[jscontroller]")
91
92
  if node is not None:
92
93
  sg = node.attributes.get("data-n-a-sg")
93
94
  ts = node.attributes.get("data-n-a-ts")
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "googlenewsdecoder"
3
- version = "0.2.1"
3
+ version = "0.2.2"
4
4
  description = "A Python package to decode Google News URLs to their original sources."
5
5
  readme = "README.md"
6
6
  license = "MIT"
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "googlenewsdecoder"
3
- version = "0.2.1"
3
+ version = "0.2.2"
4
4
  description = "A Python package to decode Google News URLs to their original sources."
5
5
  readme = "README.md"
6
6
  license = "MIT"