Iceloof / GoogleNews

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

Is it possible to set the specific website? #63

Closed tansunit closed 3 years ago

tansunit commented 3 years ago

Hi there,

Thank you for creating a wonderful package for crawling google new. It works well.

Just one question, is it possible to set the specific website for searching like we use it in Google as below?

site:www.bbc.com

I tried to set it within googlenews=GoogleNews() , just like I set the search language and start&end date, but it doesn't work.

It would be very useful to set specific website when we use this package.

Thank you very much!

HurinHu commented 3 years ago

I have investigated url and the potential solution, it seems Google News is not allow to access the specific site search under news tab, it can do it on the browser, but the same url you can parse to the new browser window and get the result in the google search page not in the news. Probable we can create a new project for google search(not just news) and include this function in there.

tansunit commented 3 years ago

Thank you.

The current solution which I use is setting a keyword within the googlenews.search function, such as

googlenews.search('epidemic BBC')

It works but not well.