Skip to main content

Search Google News RSS Feed and returns a usable JSON response

Project description

GNews Travis branch Coveralls branch

🚩 A Python Package (with CLI support) that searches Google News RSS Feed and returns a usable JSON response
🚩 As well as you can fetch full article

Usage

Coverts ⬇️

{'publisher': 'Aljazeera.com',
 'description': 'Pakistan accuses India of stoking conflict in Indian Ocean  '
                'Aljazeera.com',
 'published date': 'Tue, 16 Feb 2021 11:50:43 GMT',
 'title': 'Pakistan accuses India of stoking conflict in Indian Ocean - '
          'Aljazeera.com',
 'url': 'https://www.aljazeera.com/news/2021/2/16/pakistan-accuses-india-of-nuclearizing-indian-ocean'}

Install

pip install gnews

Usage

from GNews import GNews
google_news = GNews()
news = google_news.get_news('Pakistan')

We can set country, language, period and size during initialization

google_news = GNews(language='en', country='US', period='7d', size=10)

On the bottom left side of the Google News page you may find a Language & region section where you can find all of the supported combinations.

Article Properties

Properties Description Example
title Title of the article Why don't unicorns exist? You asked Google – here's the answer ... - The Guardian
url Google news link to article Article Link
published date Published date Wed, 07 Jun 2017 07:01:30 GMT
description Short description of article Why don't unicorns exist? You asked Google - here's the answer ...
publisher Publisher of article The Guardian

License

MIT ©

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gnews-0.0.1.tar.gz (3.0 kB view hashes)

Uploaded Source

Built Distribution

gnews-0.0.1-py3-none-any.whl (4.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page