Skip to content

Instantly share code, notes, and snippets.

@JarrydWannenburg
Last active September 3, 2022 15:15
Show Gist options
  • Save JarrydWannenburg/8851244dca270a5e13c9e30d2dad49c7 to your computer and use it in GitHub Desktop.
Save JarrydWannenburg/8851244dca270a5e13c9e30d2dad49c7 to your computer and use it in GitHub Desktop.
Google_News_Extraction_Article
# Init
newsapi = NewsApiClient(api_key=key)
# Pull articles with "Wells Fargo" in title. Exclude forbes because of subscription req.
# See https://newsapi.org/docs/endpoints/everything for more details
wells_fargo = newsapi.get_everything(qintitle='Wells Fargo',
exclude_domains='forbes.com',
language='en',
from_param='2022-08-29', # Date Range (YYYY-MM-DD)
to='2022-09-03', # Date Range (YYYY-MM-DD)
sort_by='popularity', # Other options include
page=1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment