Skip to content

Commit

Permalink
Update fetch_pmc.R
Browse files Browse the repository at this point in the history
switch to EuropePMC
  • Loading branch information
khanspers authored Jan 6, 2025
1 parent 59f3347 commit 838950b
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions scripts/fetch_pmc.R
Original file line number Diff line number Diff line change
Expand Up @@ -232,12 +232,10 @@ if(!length(image_filename) > 0){
write("---", yml.path, append = T)

## download image from PMC, politely
# img.from.path = paste0("https://www.ncbi.nlm.nih.gov/pmc/articles/",
# article.data$pmcid,
# "/bin/",article.data$image_filename)
img.from.path = paste0("https://europepmc.org/articles/",
article.data$pmcid,
"/bin/",article.data$image_filename)

img.from.path = paste0("https://www.ncbi.nlm.nih.gov/",
article.data$figure_link)
img.to.path = file.path('figures',paste(fn, "jpg", sep = "."))
headers = c(
`user-agent` = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.61 Safari/537.36'
Expand Down

0 comments on commit 838950b

Please sign in to comment.