Registry / http-networking / googlenewsdecoder

googlenewsdecoder

JSON →
library0.1.7pypypi✓ verified 82d ago

A Python package to decode Google News URLs (https://news.google.com/articles/...) to their original source URLs. Current version 0.1.7, released Jan 2025. Active development with frequent updates.

pip install googlenewsdecoder
INSTALL
IMPORT
SIG · GOOGLENEWSDECODER
G
googlenewsdecoder
http-networkingpythonv0.1.7
Install
2.4s avg
Import
Disk
33MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.1.7 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 34.5MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 2.4s · import 0.000s · 35MB
33MB installed
● package 33MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

GoogleDecoder
from googlenewsdecoder import GoogleDecoder
from googlenewsdecoder import GoogleNewsDecoder

Decode a Google News article URL to its original source. Returns dict with 'decoded_url' key.

from googlenewsdecoder import new_decoderv1 # Example Google News URL (decode to original source) decoded = new_decoderv1('https://news.google.com/articles/CAIiEP0wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZiIsInNvdXJjZSI6IiJ9') print(decoded.get('decoded_url'))
Debug
Known issues
breakingAs of version 0.1.5, old decoder methods (decoderv1, decoderv2, decoderv3, decoderv4) are deprecated and no longer functional. Use new_decoderv1 instead.
fix
Replace calls to decoderv1/2/3/4 with new_decoderv1.
affects: >=0.1.5
gotchaGoogle News URL structure changes frequently; decoding may fail silently. The function may return {'status': 'error', 'message': '...'} instead of raising an exception.
fix
Always check the 'status' key in the returned dict before using 'decoded_url'.
affects: all
gotchaRate limiting (HTTP 429) is common. From version 0.1.6, a time delay between requests was added, but heavy usage may still be blocked.
fix
Use proxy support via the 'proxy' parameter (added in 0.1.7) or add your own delays.
affects: all
Upgrade
Version history
0.1.7latest on PyPI · released Jan 18, 2025
Audit
Dependencies
requestsrequiredUsed for HTTP requests to Google News
beautifulsoup4requiredUsed for HTML parsing
Agent activity
4 hits · last 30 days
node
4
Resources
googlenewsdecoder — pip install googlenewsdecoder · libregistry