Iceloof / GoogleNews

Script for GoogleNews
https://pypi.org/project/GoogleNews/
MIT License
316 stars 88 forks source link

No result as well #19

Closed fabolandry closed 4 years ago

fabolandry commented 4 years ago

I get an empty list and I checked my network. Something is up

mjlabe commented 4 years ago

Code?

fabolandry commented 4 years ago

from GoogleNews import GoogleNews googlenews = GoogleNews() googlenews.search('APPL') Test = googlenews.gettext() print(Test)

mjlabe commented 4 years ago

I am also getting []. I know my contribution to this project (def get_news(self, deamplify=False)) broke a couple days ago. It looks like Google has once again changed the format to discourage scraping. This will need to be fixed and is a great opportunity for someone to contribute! ;-)

wajihmsedi commented 4 years ago

Same here no results even for Trump. @fabolandry @mjlabe @HurinHu you guys have any update ?

mjlabe commented 4 years ago

No update here. I've given up on using my contribution because Google breaks it every month.

wajihmsedi commented 4 years ago

@mjlabe Pity do you recommend newapi ?

mjlabe commented 4 years ago

@mjlabe Pity do you recommend newapi ?

I'm sure if there is an issue, @HurinHu will fix it, but I thought he pushed an update a few days ago. Have you tried updating? If it's not fixed, take a look at the html you are getting back and compare it to what the project is trying to parse. Should be a quick fix and your contribution would be appreciated. You're going to have this issue with any library that scrapes Google.

harkib commented 4 years ago

The API has been working for me the last few days. Using the following to test;

from GoogleNews import GoogleNews
googlenews = GoogleNews()
googlenews.search('tesla')
if googlenews.result() == []:
    print("failed")
else:
    print("passed")
    print(googlenews.get__links())

There seems to be some issue of not returning results after heavy use. Documented in; https://github.com/HurinHu/GoogleNews/issues/22