Skip to content

Instantly share code, notes, and snippets.

View ary15's full-sized avatar

Ary V ary15

  • ETH Zurich
  • Zurich, Switzerland
View GitHub Profile
@ary15
ary15 / doi-utils.el
Created March 23, 2018 09:41
Modifying science direct download
;;** Science Direct
(defun doi-utils-get-science-direct-pdf-url (redirect-url)
"Science direct hides the pdf url in html. We get it out here.
REDIRECT-URL is where the pdf url will be in."
(setq *doi-utils-waiting* t)
(url-retrieve
redirect-url
(lambda (status)
(goto-char (point-min))
(re-search-forward "pdf_url\" content=\"\\([^\"]*\\)\"" nil t) ; modified the search string to reflect updated science direct