Closed cap337 closed 1 year ago
facing same issues 😔
yes can confirm, only response is {'status': 'ok', 'totalResults': 0, 'articles': []}
, if you look into your account it gets counted in the usage report, so the request seems to somehow get lost on the way back?
Same issue on our end
Hi, it appears that the language parameter is no longer supported in the top headlines API. This is a new/breaking change introduced by the news API team. I would reach out to them directly. If they say this is intentional, I can remove the default 'en' parameter from the package.
Apparently, NewsAPI changed their language codes and now expect 'en-US' to be the default. This has been updated to allow the 'en-US' country code in a recently published version 0.2.7 .
Please use now:
top_headlines = newsapi.get_top_headlines(language='en-US')
When get_top_headlines() is called in my code, no articles are returned I simply get: {'status': 'ok', 'totalResults': 0, 'articles': []}.