Hi, there.
Currently, we worked on accessing news on particular topics, not in this video, we're going to learn
to access the current top headlines for a particular country.
So what I'll do is I'll duplicate the previous codes.
So that I don't have to write the codes again.
Mostly, it will be like this.
So we import requests, we have this function, gets news.
But this time we're not going to have the topic parameter, nor from date, neither to date.
So we remove those.
This time what we have is country.
We move the language parameter as well and just leave the country and the API key.
Parameters.
Either the euro will be a bit different this time.
So HTP, as a newspaper, that's all curvy too.
And then we have instead of everything.
We have top.
Headlines a question mark after that of.
I'm going to remove all those until the apology.
So after the headlines, we'll have country.
Basically, to control our perimeter and then we have this and symbol, and then we have the API key,
and that's it.
That's the, you know, we gets a request object for that, you know, we get the contents, we access
the articles.
So the dictionary will be similar to the previous dictionary.
So this dictionary also has a nautical ski.
So we get the value of articles and we saw the results in a results variable using this loop in here.
So that's the final coat on, then we want to call the function.
So print gets news topic from date and two dates are all gone.
So we have gone through a cycle to use the API keys of default parameters.
So we leave it like that and we run the code.
Those are the results, so these are the headlines.
For USA Today.
So thanks a lot.
I'll see you later.