{"id":21394,"library":"googlenewsdecoder","title":"GoogleNewsDecoder","description":"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.","status":"active","version":"0.1.7","language":"python","source_language":"en","source_url":"https://github.com/SSujitX/google-news-url-decoder","tags":["google-news","url-decoder","news","scraping","decoder"],"install":[{"cmd":"pip install googlenewsdecoder","lang":"bash","label":"Install via pip"}],"dependencies":[{"reason":"Used for HTTP requests to Google News","package":"requests","optional":false},{"reason":"Used for HTML parsing","package":"beautifulsoup4","optional":false}],"imports":[{"note":"Class name is PascalCase, not module name","wrong":"from googlenewsdecoder import googlenewsdecoder","symbol":"GoogleNewsDecoder","correct":"from googlenewsdecoder import GoogleNewsDecoder"},{"note":"Main decoding function","symbol":"new_decoderv1","correct":"from googlenewsdecoder import new_decoderv1"}],"quickstart":{"code":"from googlenewsdecoder import new_decoderv1\n\n# Example Google News URL (decode to original source)\ndecoded = new_decoderv1('https://news.google.com/articles/CAIiEP0wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZz4wZiIsInNvdXJjZSI6IiJ9')\nprint(decoded.get('decoded_url'))","lang":"python","description":"Decode a Google News article URL to its original source. Returns dict with 'decoded_url' key."},"warnings":[{"fix":"Replace calls to decoderv1/2/3/4 with new_decoderv1.","message":"As of version 0.1.5, old decoder methods (decoderv1, decoderv2, decoderv3, decoderv4) are deprecated and no longer functional. Use new_decoderv1 instead.","severity":"breaking","affected_versions":">=0.1.5"},{"fix":"Always check the 'status' key in the returned dict before using 'decoded_url'.","message":"Google News URL structure changes frequently; decoding may fail silently. The function may return {'status': 'error', 'message': '...'} instead of raising an exception.","severity":"gotcha","affected_versions":"all"},{"fix":"Use proxy support via the 'proxy' parameter (added in 0.1.7) or add your own delays.","message":"Rate limiting (HTTP 429) is common. From version 0.1.6, a time delay between requests was added, but heavy usage may still be blocked.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Use 'from googlenewsdecoder import new_decoderv1' instead.","cause":"decoderv1 was removed in version 0.1.5.","error":"ImportError: cannot import name 'decoderv1' from 'googlenewsdecoder'"},{"fix":"Check that the URL is a valid Google News article URL and handle None return: decoded = new_decoderv1(url) or {}.","cause":"The function returned None instead of a dict (e.g., due to network error or invalid URL).","error":"AttributeError: 'NoneType' object has no attribute 'get'"},{"fix":"Use the proxy parameter (new in 0.1.7) or add time.sleep() between calls.","cause":"Too many rapid requests to Google News servers.","error":"HTTP 429 Too Many Requests"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}