Skip to content

Commit

Permalink
probable fix for issue #1112
Browse files Browse the repository at this point in the history
I used to extract this from web page meta data, but this approach seems simpler.
  • Loading branch information
jkitchin committed Apr 26, 2024
1 parent 1902483 commit feaf7ea
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions org-ref-arxiv.el
Original file line number Diff line number Diff line change
Expand Up @@ -223,15 +223,7 @@ Returns a formatted BibTeX entry."
(arxiv-maybe-arxiv-id-from-current-kill))
(read-string
"PDF: ")))
(let ((pdf-url (with-current-buffer
(url-retrieve-synchronously
(concat
"http://arxiv.org/abs/" arxiv-number))
;; <meta name="citation_pdf_url" content="http://arxiv.org/pdf/0801.1144" />
(goto-char (point-min))
(search-forward-regexp
"name=\\\"citation_pdf_url\\\" content=\\\"\\(.*\\)\\\"")
(match-string 1))))
(let ((pdf-url (format "https://arxiv.org/pdf/%s" arxiv-number)))
(url-copy-file pdf-url pdf)
;; now check if we got a pdf
(unless (org-ref-pdf-p pdf)
Expand Down

0 comments on commit feaf7ea

Please sign in to comment.