GNews icon indicating copy to clipboard operation
GNews copied to clipboard

Issue on setting date range

Open plim001 opened this issue 1 year ago • 1 comments

Hi,

Below is the code provided, but I cant seem to set the date range

image

plim001 avatar Jul 10 '22 16:07 plim001

I also have the same issue. I used the tuple (2022, 6, 11) but this gave errors. I also tried defining the objects before but this did not work either. How do I pass the date and max_results options?

from gnews import GNews
google_news = GNews()
google_news.results = 100
google_news.language = 'english'

google_news.start_date = (2022, 6, 11)
google_news.end_date = (2022, 7, 11)
vietnam_news = google_news.get_news('Vietnam')

print(vietnam_news[0])

Also as per comment below, having an option of collecting more than 100 results would be useful too.

ehsong avatar Jul 11 '22 14:07 ehsong

Issue has been fixed https://github.com/ranahaani/GNews/pull/41

ranahaani avatar Sep 19 '22 05:09 ranahaani

Issue has been fixed #41

Period is working with the new approved code But I cannot make the start_date end_date working. I tried both the ("2021, 7, 11") format and (2021, 7, 11) Can you help me? Thank you

gianandreabertello avatar Oct 22 '22 13:10 gianandreabertello