Closed ssmithm closed 1 year ago
Thanks for the suggestion. To be honest, I have not really considered that possibility before.
The approach you propose makes sense (checking if the query string is a URL or a string... that part is sound). However, I am not sure if a PubMed link like 'my Bibliography" can work with the Eutils API. Let me remind you that easyPubMed
is not a web scraper, but is an interface to the Entrez Eutils server. The Eutils API may or may not support data retrieval via a URL that is likely meant to be accessed via a browser. THis has to be tested.
Can you provide an example of a URL that you may want to use?
I am closing cause I have not received additional feedback/input about this.
First, great package Damiano.
I've looked through the vignettes and code and do not see an obvious way to supply a specific URL, e.g., using a persons "My Bibliography" link, rather than supplying search terms, for the
get_pubmed_id
function. It's easy enough to alter the code to allow a URL (and check whether pubmed_query_string is a URL) -- see below -- but the function then fails at the Data Processing step. I think the issue is that the XML on the end of a PubMed/Entrez search is different when using search terms versus accessing the My Bibliography link directly. Perhaps you've already considered this issue and have a fix, but if not, would you consider adding this functionality?where the
is_url()
function could be as simple as: