Closed MelchiorHakimi closed 1 year ago
Some results are not returned in the proper format from Google, then you may not able to get the exact date time.
Ah, so you are saying that it is Google sending bad information when the "Feb 21" format is used.
I guess for my use, then, I simply create a datetime based on the date returned so I have my datetimes in a consistent form. Too bad Google sends datetime that way.
Anywho, great project, thanks!
Actually this seems to be a problem with define_date(date) as you can see...
results.append({'title': tmp_text, 'media': tmp_media,'date': tmp_date,'datetime':define_date(tmp_date),'desc': tmp_desc, 'link': tmp_link,'img': tmp_img})
datetime is something computed by GoogleNews (as in this project) and not something sent by Google News (as in the service).
Actually this seems to be a problem with define_date(date) as you can see...
results.append({'title': tmp_text, 'media': tmp_media,'date': tmp_date,'datetime':define_date(tmp_date),'desc': tmp_desc, 'link': tmp_link,'img': tmp_img})
datetime is something computed by GoogleNews (as in this project) and not something sent by Google News (as in the service).
I have fixed this issue, please update to the latest version.
If a news article has a date in this format: "18 days ago" I get a datetime in this format: "2023-03-03 2:24:53"
That's good. However, when the date is in this format: "Feb 21" I get NaN as datetime.
How to solve? Thanks!