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.
- {googlenewsdecoder-0.2.1 → googlenewsdecoder-0.2.2}/PKG-INFO +1 -1
- {googlenewsdecoder-0.2.1 → googlenewsdecoder-0.2.2}/googlenewsdecoder/_parse.py +3 -2
- {googlenewsdecoder-0.2.1 → googlenewsdecoder-0.2.2}/pyproject.toml +1 -1
- {googlenewsdecoder-0.2.1 → googlenewsdecoder-0.2.2}/pyproject.toml.orig +1 -1
- {googlenewsdecoder-0.2.1 → googlenewsdecoder-0.2.2}/README.md +0 -0
- {googlenewsdecoder-0.2.1 → googlenewsdecoder-0.2.2}/googlenewsdecoder/__init__.py +0 -0
- {googlenewsdecoder-0.2.1 → googlenewsdecoder-0.2.2}/googlenewsdecoder/decoder.py +0 -0
- {googlenewsdecoder-0.2.1 → googlenewsdecoder-0.2.2}/googlenewsdecoder/decoder_async.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: googlenewsdecoder
|
|
3
|
-
Version: 0.2.
|
|
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.
|
|
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 =
|
|
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")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|