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

Can't get top headlines for some countries (even though supported by the API) #91

Open
EceSenaEtoglu opened this issue Oct 5, 2023 · 0 comments

Comments

@EceSenaEtoglu
Copy link

EceSenaEtoglu commented Oct 5, 2023

The default language of get_top_headlines seems "en". When needed to get specific news for a country, if language is not changed article count seems 0.

Change the language get the news, could be a choice.

BUT

The problem occurs when the language is not supported by the API
top_headlines = newsapi.get_top_headlines(country="tr",language = "tr")
print(top_headlines)

Above code gives" invalid language error".
But in the API doc, specific news are supported for Turkey.
Since in the client, language has to be changed to get the news and language is not defined tor Turkey in the API, it raises an error

Also the issue exists in getting category specific news for countries

@EceSenaEtoglu EceSenaEtoglu changed the title Can't get category specific top headlines for some countries (even though supported by the API) Can't get top headlines for some countries (even though supported by the API) Oct 5, 2023
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

1 participant