Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Date Range doesn't work? #141

Open
Calc-oholic opened this issue Feb 24, 2024 · 4 comments
Open

Date Range doesn't work? #141

Calc-oholic opened this issue Feb 24, 2024 · 4 comments

Comments

@Calc-oholic
Copy link

That's all I can say? Regardless of what I set the date range to, it just shows the most recent, ignoring the date range. I've tried using set_time_range and also in the GoogleNews() constructor, but neither work. Why? How do I make it work?

@deeepwin
Copy link

deeepwin commented Jun 2, 2024

Same here with search() method, with get_news() it works.

@bpyle02
Copy link

bpyle02 commented Jul 13, 2024

Also having the same issue

@Harika-3196
Copy link

I wanted to use get_news to extract the news articles with in the specified date range but the return response URL of
get_news is bit weird

topic ="ecommerce sales in october"
start="10/10/2024"
end="10/15/2024"
news_results = get_news(topic, start, end)

something like this
URL : https://news.google.com/read/CBMivAFBVV95cUxNaW1zVFZYUHZqT1lHNFoySG5HOUpIVlhvZ0puQ2lsMzVlM3BGOHNWS0lqV25uc1c4NHFMQW1nTTV6NnQ5YjlTMm9qWWxLdmt2d1hGYUdDcVVhTzRPMi0wWFhxb2NrckJldnlJakt6R242R0twbVg1NmtUNHR0UjdPR2ZSLThueHhkVlhGdGlHYUNnMkl2ZXRhSkRGQUpWS3ViN0R5Z3pWakVjam5LR0Iwb2MyeWFaU1cyNmlldg?hl=en-IN&gl=IN&ceid=IN%3Aen

How can I get the actual article url.
https://www.tomsguide.com/sales-events/walmart-anti-prime-day-sales-event-is-live-31-rival-black-friday-deals-id-get-now

If the date range with search function it will be helpful as it returns the article url exactly.

@HurinHu
Copy link
Member

HurinHu commented Jan 6, 2025

I wanted to use get_news to extract the news articles with in the specified date range but the return response URL of

get_news is bit weird

topic ="ecommerce sales in october"

start="10/10/2024"

end="10/15/2024"

news_results = get_news(topic, start, end)

something like this

URL : https://news.google.com/read/CBMivAFBVV95cUxNaW1zVFZYUHZqT1lHNFoySG5HOUpIVlhvZ0puQ2lsMzVlM3BGOHNWS0lqV25uc1c4NHFMQW1nTTV6NnQ5YjlTMm9qWWxLdmt2d1hGYUdDcVVhTzRPMi0wWFhxb2NrckJldnlJakt6R242R0twbVg1NmtUNHR0UjdPR2ZSLThueHhkVlhGdGlHYUNnMkl2ZXRhSkRGQUpWS3ViN0R5Z3pWakVjam5LR0Iwb2MyeWFaU1cyNmlldg?hl=en-IN&gl=IN&ceid=IN%3Aen

How can I get the actual article url.

https://www.tomsguide.com/sales-events/walmart-anti-prime-day-sales-event-is-live-31-rival-black-friday-deals-id-get-now

If the date range with search function it will be helpful as it returns the article url exactly.

You can manually extract the url by fetching the google url, but I don't suggest to do so, because it will create a request to google for each url, easily get blocked by google.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants