Skip to content

Commit

Permalink
Merge pull request zotero#1933 from GuyAglionby/fix-arxiv
Browse files Browse the repository at this point in the history
Update arxiv xpath
  • Loading branch information
adam3smith authored Apr 22, 2019
2 parents 5f1558e + 5aaef74 commit cea8902
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions arXiv.org.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@
"inRepository": true,
"translatorType": 12,
"browserSupport": "gcsv",
"lastUpdated": "2019-03-29 12:34:44"
"lastUpdated": "2019-04-20 11:32:16"
}


/*
***** BEGIN LICENSE BLOCK *****
Expand Down Expand Up @@ -115,7 +114,7 @@ function doWeb(doc, url) {
id = url.substring(p + 5, url.length - 4);
}
else {
id = ZU.xpathText(doc, '//td[contains(@class,"arxivid")]/a')
id = ZU.xpathText(doc, '//tr[td[text() = "Cite as:"]]//span[@class = "arxivid"]/a')
|| ZU.xpathText(doc, '//b[starts-with(normalize-space(text()),"arXiv:")]');
}
if (!id) throw new Error('Could not find arXiv ID on page.');
Expand Down

0 comments on commit cea8902

Please sign in to comment.