You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to use Article Search API to download articles that are relevant to this query: ("military" OR "soldier*" OR "air force" OR "navy" OR "army") AND ("threat*" OR "danger*" OR "fear*" OR "risk*")
But some entries are just random?
The code I used
importrequestsapikey=""params= {
"fq": '("military" OR "soldier*" OR "air force" OR "navy" OR "army") AND ("threat*" OR "danger*" OR "fear*" OR "risk*")',
"begin_date": "20210101",
"end_date": "20210601",
"api-key": apikey,
"page": 0
}
headers= {"Accept": "application/json"}
response=requests.get("https://api.nytimes.com/svc/search/v2/articlesearch.json", params=params, headers=headers).json()
foriteminresponse["response"]["docs"]:
print(item["abstract"])
# What happens to the nearly two million people in our nation’s prison system demonstrates who we are as a people.# A look back at what has transpired in the year since Mr. Floyd’s murder reveals a country both struggling to confront it history # of racial division and continuing to succumb to it.# A cease-fire between Israel and Hamas.# Mr. Biden has spoken publicly about how he once sent Mr. Netanyahu a photograph with the inscription, “Bibi, I don’t agree with a damn thing you say, but I love you.”# The move, which will require companies to report to the government any significant attacks, is a response to the Colonial Pipeline ransomware attacks.# Mr. Protasevich, 26, is an exiled dissident whose reach drew an authoritarian ruler into a gambit that outraged Western governments.# Israeli extremists have formed more than 100 new groups on the Facebook-owned encrypted messaging app in recent days to target attacks.# A new kind of pandemic grief.# After 11 days of intense fighting, Hamas and Israel began a cease-fire. Here is the arc of the conflict.# An eviction in East Jerusalem lies at the center of a conflict that led to war between Israel and Hamas. But for millions of Palestinians, the routine indignities of occupation are part of daily life.
The text was updated successfully, but these errors were encountered:
Hi there!
I'm trying to use Article Search API to download articles that are relevant to this query:
("military" OR "soldier*" OR "air force" OR "navy" OR "army") AND ("threat*" OR "danger*" OR "fear*" OR "risk*")
But some entries are just random?
The code I used
The text was updated successfully, but these errors were encountered: