Iceloof / GoogleNews

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

Datetime not available #146

Open felipefreitasbr opened 3 months ago

felipefreitasbr commented 3 months ago

Hi folks, all my requests are returning datetime for the very first result only, all the others are 'datetime': nan. Does anyone else facing the same issue or know how to solve it?

googlenews = GoogleNews(region='BR', lang='pt-BR')
googlenews.search('VALE3')
resultados = googlenews.results()

for i, resultado in enumerate(resultados):
    print(f"Resultado {i+1}: {resultado}")

Resultado 1: {'title': "Vale (VALE3): Analistas adotam 'postura conservadora'; entenda", 'media': 'Suno - Investimentos Inteligentes', 'date': 'á 22 minutos', 'datetime': nan,
Resultado 2: {'title': 'Vale (VALE3), Natura (NTCO3) e Hapvida (HAPV3) movimentam o mercado nesta segunda-feira; veja mais destaques', 'media': 'Suno - Investimentos Inteligentes', 'date': 'á 44 minutos', 'datetime': nan,
....
Resultado 121: {'title': 'Tebet não vê ingerência na Petrobras (PETR4) e na Vale (VALE3)', 'media': 'InfoMoney', 'date': 'á 4 horas', 'datetime': nan,

I'm working on version 1.6.14, under Python 3.11.5 on a Windows 10,

Many thanks :)

HurinHu commented 3 months ago

It seems the parser for datetime is not working in other languages, it is only working with English search.

miraculix95 commented 2 weeks ago

yes, I have the same problem