Installation & Quickstart

Installation

$ pip install pygooglenews --upgrade

Quickstart

from pygooglenews import GoogleNews

gn = GoogleNews()

Top Stories

top = gn.top_news()

Stories by Topic

business = gn.topic_headlines('business')

Geolocation Specific Stories

headquaters = gn.geo_headlines('San Fran')
# search for the best matching articles that mention MSFT and 
# do not mention AAPL (over the past 6 month
search = gn.search('MSFT -APPL', when = '6m')

Last updated