I am trying to get Covid-19 JSON data from Europe Pubmed Central. The JSON results returned by Europe PMC server looks like this.
My initial code querying the server looks like this:
import requests
import json
mydata = "https://www.ebi.ac.uk/europepmc/webservices/rest/search?query=(%E2%80%9C2019-nCoV%E2%80%9D)&format=json"
#get Server response
reply = requests.get(mydata)
#print out results
print(reply.json())
I wish to get rid of these part of the JSON:
{'version': '6.2', 'hitCount': 847, 'nextCursorMark': 'AoIIQVJxdCg0MTI2NjU3Mw==', 'request': {'queryString': '(“2019-nCoV”)', 'resultType': 'lite', 'cursorMark': '*', 'pageSize': 25, 'sort': '', 'synonym': False}, 'resultList':
How can i get rid of this part in python? I apologize in advance for the long url querystring.
I would recommend simply doing
Then reply would consist only of
From there you could iterate over all object like so