Questions tagged [pygooglenews]

9 questions
2
votes
2 answers

GoogleNews- pygooglenews -Could not parse your date error

Using pygooglenews a month ago and it was working, however now there seems to be an error: Could not parse your date Does anyone know how to bypass this or six this issue? gn = GoogleNews(lang = 'en') def get_news(search): stories = [] …
2
votes
2 answers

Scraping Google News with pygooglenews

I am trying to do scraping from Google News with pygooglenews. I am trying to scrape more than 100 articles at a time (as google sets limit at 100) by changing the target dates using for loop. The below is what I have so far but I keep getting error…
will418
  • 21
  • 1
  • 3
1
vote
0 answers

How can I avoid the "Too many requests" error on python when scraping googlenews?

I have a python list: ['Facebook lawsuit', 'Google lawsuit', 'Whatsapp lawsuit',' Instagram lawsuit'] I need help looping through Google News to pull the top 5 news articles between [2022-01-01 to 2022-03-31] Here's my code: def gnews_search(): …
1
vote
1 answer

Retrieving JSON Title, URL from Pygooglenews feedParser

I'm trying to retrieve values from pyGoogleNews (https://github.com/kotartemiy/pygooglenews) that is using feedParser to output the values. Code Snippet as follows: from pygooglenews import GoogleNews gn = GoogleNews(lang = 'en', country =…
Gene
  • 2,178
  • 3
  • 30
  • 50
0
votes
0 answers

SSLCertVerificationError with Jupyter notebook for GoogleNews pip

I'm fairly new in using this and I'm not sure how to solve this SSLCertVerificationError I encountered while following this Tutorial on Youtube I'm trying to scrape Google News for certain keywords but when I input " gn.search('keyword') ", this…
Far
  • 1
0
votes
0 answers

Python - create dataframe from output returned from a function?

Below is my code utilizing pygooglenews to scrape Google News: def get_titles1(search): news = [] # list of articles that will have NLP applied to it search = gn.search(search, when = '2y') #when: duration; 2y = 2 years, 6m = 6 months, etc.…
0
votes
1 answer

for loop only incrementing in range of 10 instead of 1

I am trying to return a list of URLs from a search using google news. I am using the GoogleNews and pandas dataframe modules to organize the results. I am then taking those URLs and downloading the webpages using pywebcopy. Right now, my for loop…
0
votes
1 answer

Python - Exporting PyGoogleNews output to CSV

I am new to Python and am trying to extract scraped headlines from the Google News Feed using the PyGoogleNews library for a project. I am using Google Colab. The PyGoogleNews code is running perfectly for me and I am happy with that. The code is…
0
votes
1 answer

Attribute error: 'list' object has no attribute 'strftime' while using pygooglenews

I am trying to get headlines and publishing time for news articles using pygooglenews. I want to be able to get daily articles over a period of 15 days, I have written the code below to specify start and end dates. but I get an error saying 'list…
iuyi
  • 11
  • 4