Reputation: 11
I am trying to download the full text PDF versions from the Elsevier API. I am able to download the whole paper in XML, JSON and plain text form. So, the API key is working fine. However, I am not able to download the full text in PDF form. When I try to change the header to accept the PDF files, it only writes the first page of the article
I tried on a lot of different DOI's but all of them return the first page of the article.
This is the request command that I am using to access the paper
import requests
r = requests.get('http://api.elsevier.com/content/article/doi/10.1016/0038-1098(87)90044-5?httpAccept=application/pdf', headers=headers)
And I am writing using the following code
with open('test.pdf','wb') as f:
f.write(r.content)
There is no error but the test.pdf is only the first page of the article.
Upvotes: 1
Views: 1529
Reputation: 106
By default, the article retrieval API (https://dev.elsevier.com/documentation/ArticleRetrievalAPI.wadl) allows full-text retrieval of articles in XML or JSON format, not in PDF format (except for open access content, where full text is available in all formats). For non-OA content, only the first page of the PDF is available by default.
Upvotes: 3