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

Article search problem #77

Closed
happylilem opened this issue Jul 17, 2020 · 3 comments
Closed

Article search problem #77

happylilem opened this issue Jul 17, 2020 · 3 comments
Assignees

Comments

@happylilem
Copy link

Hi, I'm trying to use this library to obtain PubMed article attributes. The sample script works perfectly when I used it to search for the sample PubMed article “Deal or no deal? ”. However, when I tried to substitute this article with other PubMed articles, my Jupyter Notebook simply responded "None" instead of any results as it did for the sample article. I wonder if there were any restrictions on the articles that could be reached by this library. I would be very thankful if you could help me with this!

@happylilem
Copy link
Author

The search string that worked is:
title = "Deal or no deal? The prevalence and nutritional quality of price promotions among U.S. food and beverage purchases."
and it returns the article attributes as
OrderedDict([('doi', '10.1016/j.appet.2017.07.006'), ('title', 'Deal or no deal? The prevalence and nutritional quality of price promotions among U.S. food and beverage purchases'), ('url', 'https://europepmc.org/articles/PMC5574185/'), ('authors', ['Taillie, Lindsey Smith', 'Ng, Shu Wen', 'Xue, Ya', 'Harding, Matthew']), ('open', True)])

When I changed the string to another PubMed article such as this one:
title = "A Comparative Study of Free Oligosaccharides in the Milk of Domestic Animals"
The response is None.
I tried several other articles, and the responses were also None. The article titles didn't contain any special characters.

@happylilem
Copy link
Author

happylilem commented Jul 17, 2020

Here is the entire script I used, which is just the one shown as sample except that I changed the article title--
from richcontext import scholapi as rc_scholapi
schol = rc_scholapi.ScholInfraAPI(config_file="rc.cfg", logger=None)
source = schol.openaire
title = "A Comparative Study of Free Oligosaccharides in the Milk of Domestic Animals"
if source.has_credentials():
response = source.title_search(title)
if response.message:
print(response.message)
else:
print(response.meta)

@ernestogimeno ernestogimeno self-assigned this Jul 17, 2020
@ernestogimeno
Copy link
Collaborator

Hi @happylilem,

I tested your code and I see that you are using OpenAIRE integration, instead of the intended PubMed, so if you do this on your code...

source = schol.pubmed

... you will get a result.

I realized we need to improve our documentation to make more explicit how to access each service. For now, you can see here a hint of the other options you have.

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