Fixes code in IEEE Xplore translator that was causing citations to save multiple times. Also fixes a problem with PDFs being saved incorrectly.
This commit is contained in:
parent
a620e08b7b
commit
86c13dca35
11
scrapers.sql
11
scrapers.sql
|
@ -22,7 +22,7 @@
|
|||
|
||||
|
||||
-- Set the following timestamp to the most recent scraper update date
|
||||
REPLACE INTO version VALUES ('repository', STRFTIME('%s', '2008-02-27 04:00:00'));
|
||||
REPLACE INTO version VALUES ('repository', STRFTIME('%s', '2008-02-27 15:00:00'));
|
||||
|
||||
REPLACE INTO translators VALUES ('96b9f483-c44d-5784-cdad-ce21b984fe01', '1.0.0b4.r1', '', '2007-06-21 20:00:00', '1', '100', '4', 'Amazon.com', 'Sean Takats', '^https?://(?:www\.)?amazon',
|
||||
'function detectWeb(doc, url) {
|
||||
|
@ -12518,7 +12518,7 @@ REPLACE INTO translators VALUES ('6614a99-479a-4524-8e30-686e4d66663e', '1.0.0b3
|
|||
Zotero.wait();
|
||||
}');
|
||||
|
||||
REPLACE INTO translators VALUES ('92d4ed84-8d0-4d3c-941f-d4b9124cfbb', '1.0.0b3.r1', '', '2008-02-27 04:00:00', '1', '100', '4', 'IEEE Xplore', 'Simon Kornblith and Michael Berkowitz', 'https?://[^/]*ieeexplore.ieee.org[^/]*/(?:[^\?]+\?(?:|.*&)arnumber=[0-9]+|search/(?:searchresult.jsp|selected.jsp))',
|
||||
REPLACE INTO translators VALUES ('92d4ed84-8d0-4d3c-941f-d4b9124cfbb', '1.0.0b3.r1', '', '2008-02-27 15:00:00', '1', '100', '4', 'IEEE Xplore', 'Simon Kornblith and Michael Berkowitz', 'https?://[^/]*ieeexplore.ieee.org[^/]*/(?:[^\?]+\?(?:|.*&)arnumber=[0-9]+|search/(?:searchresult.jsp|selected.jsp))',
|
||||
'function detectWeb(doc, url) {
|
||||
var articleRe = /[?&]arnumber=([0-9]+)/;
|
||||
var m = articleRe.exec(url);
|
||||
|
@ -12574,8 +12574,7 @@ REPLACE INTO translators VALUES ('92d4ed84-8d0-4d3c-941f-d4b9124cfbb', '1.0.0b3.
|
|||
var arnumber = "";
|
||||
for each(var url in urls) {
|
||||
var m = articleRe.exec(url);
|
||||
arnumber += "%3Carnumber%3E"+m[1]+"%3C%2Farnumber%3E";
|
||||
var newurls = [url];
|
||||
arnumber = "%3Carnumber%3E"+m[1]+"%3C%2Farnumber%3E";
|
||||
var post = "dlSelect=cite_abs&fileFormate=ris&arnumber="+arnumber+"&x=5&y=10";
|
||||
var isRe = /[?&]isnumber=([0-9]+)/;
|
||||
var puRe = /[?&]punumber=([0-9]+)/;
|
||||
|
@ -12586,11 +12585,9 @@ REPLACE INTO translators VALUES ('92d4ed84-8d0-4d3c-941f-d4b9124cfbb', '1.0.0b3.
|
|||
translator.setString(text);
|
||||
translator.setHandler("itemDone", function(obj, item) {
|
||||
var url = urls.shift();
|
||||
Zotero.debug(url);
|
||||
var is = isRe.exec(url);
|
||||
var pu = puRe.exec(url);
|
||||
var arnumber = articleRe.exec(url);
|
||||
|
||||
if(item.notes[0] && item.notes[0].note) {
|
||||
item.abstractNote = item.notes[0].note;
|
||||
item.notes = new Array();
|
||||
|
@ -12612,7 +12609,7 @@ REPLACE INTO translators VALUES ('92d4ed84-8d0-4d3c-941f-d4b9124cfbb', '1.0.0b3.
|
|||
}
|
||||
}
|
||||
item.creators = dupes;
|
||||
|
||||
var newurls = [url];
|
||||
Zotero.Utilities.processDocuments(newurls, function(newDoc) {
|
||||
var xpath = ''//p[@class="bodyCopyBlackLargeSpaced"]'';
|
||||
var textElmt = newDoc.evaluate(xpath, newDoc, namespace, XPathResult.ANY_TYPE, null).iterateNext();
|
||||
|
|
Loading…
Reference in New Issue
Block a user