I am trying to download images from openi (https://openi.nlm.nih.gov/index.php) using python 3.5 and requests. I am using their rest API as follows:
resp = requests.get("http://openi.nlm.nih.gov/retrieve.php",
params = {"query":"Feulgen", "m": 1, "n": 12})
print(resp.content)
This gives me a json file that contains textual information about the images that I would like (including their .png filenames) but I would really like to download the images themselves.
Do I have to download each image according to the specific url listed in the JSON or is there a way to do some sort of "batch download" for the images that would come up in this query?
I have seen this post about downloading images with requests but it seems that I need the .png or .jpeg or .whatever URL. Does anyone know way to get the images without the individual image URLs?
Thanks in advance.