Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

readDocs #20

Closed
ghost opened this issue Jan 29, 2018 · 2 comments
Closed

readDocs #20

ghost opened this issue Jan 29, 2018 · 2 comments

Comments

@ghost
Copy link

ghost commented Jan 29, 2018

I would like to retrieve the documents as you showed in the example python script. However, I always fail. Could you please let me know how I can get access to all the documents of an author? I only need the DOI for further analysis of citation, etc. Thanks

Scopus (Abtract) document example

Initialize document with ID as integer

scp_doc = AbsDoc(scp_id = 56923985200)
if scp_doc.read(client):
print ("scp_doc.title: ", scp_doc.title)
scp_doc.write()
else:
print ("Read document failed.")

ScienceDirect (full-text) document example using PII

pii_doc = FullDoc(sd_pii = 'S1674927814000082')
if pii_doc.read(client):
print ("pii_doc.title: ", pii_doc.title)
pii_doc.write()
else:
print ("Read document failed.")

ScienceDirect (full-text) document example using DOI

doi_doc = FullDoc(doi = '10.1016/S1525-1578(10)60571-5')
if doi_doc.read(client):
print ("doi_doc.title: ", doi_doc.title)
doi_doc.write()
else:
print ("Read document failed.")

@m-direnzo
Copy link

m-direnzo commented Feb 12, 2018

Hello,

In your first example, the Scopus ID you provided does not appear to be valid.

In the second and third examples, both the PII and DOI return the expected results with a standard API key obtained from dev.elsevier.com. Please verify that you've properly set up your config.json file with a valid API key and initialized the ElsClient object with that configuration per the example.

Lastly, I'm not sure if the lack of indentation in your code is a product of copy/pasting to this site. If not, please be aware that the conditional statements you wrote will not be correctly interpreted if you do not indent the subsequent statements in the block, e.g.

if doi_doc.read(client):
    print("doi_doc.title: ", doi_doc.title)
    doi_doc.write()
else:
    print("Read document failed.")

will be interpreted correctly whereas the code you pasted will not.

I hope that helps!

Best regards,
Matthew DiRenzo

@ghost
Copy link
Author

ghost commented Feb 13, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants