Iceloof / GoogleNews

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

Search is returning empty list #94

Closed SamratDey112358 closed 2 years ago

SamratDey112358 commented 2 years ago

googlenews.search(item) is giving empty list. Since we need to extract news content from site urls, get_news function - which gives the urls in a different format, I think - is not suitable. Tried upgrading googlenews package but to no avail. Please help! Thanks

la-strole commented 2 years ago

Looks like Google changed the tags again. In the file init.py you can replace line 139 result = self.content.find_all("div", id="search")[0].find_all("g-card") with result = self.content.find_all("div", id="search")[0].find("div", id="rso").children https://drive.google.com/file/d/1oRq5BRVEsFBlwpNWmaWdvCbLgniUku6U/view?usp=sharing

HurinHu commented 2 years ago

The issue is solved with latest version, please upgrade to v1.6.4