ropensci-archive / crminer

:no_entry: ARCHIVED :no_entry: Fetch 'Scholary' Full Text from 'Crossref'
Other
17 stars 5 forks source link

crm_plain doesn't seem to work with url input for elsevier #33

Closed sckott closed 3 years ago

sckott commented 4 years ago

and possibly others, e.g,

url <- "https://api.elsevier.com/content/article/PII:S0370269310012608?httpAccept=text/plain"
crm_plain(url)
#> [1] "<service-error><status><statusCode>INVALID_INPUT</statusCode><statusText>View parameter specified in request is not valid</statusText></status></service-error>"

im guessing its due to missing attributes (probably doi and crossref member in particular), see

link <- crm_links("10.1016/j.physletb.2010.10.049", "plain")
z <- as_tdmurl(url, "plain")

str(link)
#> List of 1
#>  $ plain: chr "https://api.elsevier.com/content/article/PII:S0370269310012608?httpAccept=text/plain"
#>  - attr(*, "class")= chr "tdmurl"
#>  - attr(*, "type")= chr "plain"
#>  - attr(*, "doi")= chr "10.1016/j.physletb.2010.10.049"
#>  - attr(*, "member")= chr "78"
#>  - attr(*, "intended_application")= chr "text-mining"

str(z)
#> List of 1
#>  $ plain: chr "https://api.elsevier.com/content/article/PII:S0370269310012608?httpAccept=text/plain"
#>  - attr(*, "class")= chr "tdmurl"
#>  - attr(*, "type")= chr "plain"