From a9920318dab35d731a122c7b6d03478e0386a9f2 Mon Sep 17 00:00:00 2001 From: Michael Berkowitz Date: Tue, 27 May 2008 16:37:00 +0000 Subject: [PATCH] -Fixes ScienceDirect translator problem reported in the forums. --- scrapers.sql | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scrapers.sql b/scrapers.sql index 701734bf8..8e13c98c4 100644 --- a/scrapers.sql +++ b/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-05-27 16:45:00')); +REPLACE INTO version VALUES ('repository', STRFTIME('%s', '2008-05-27 17:30:00')); REPLACE INTO translators VALUES ('96b9f483-c44d-5784-cdad-ce21b984fe01', '1.0.0b4.r1', '', '2008-03-21 20:00:00', '1', '100', '4', 'Amazon.com', 'Sean Takats and Michael Berkowitz', '^https?://(?:www\.)?amazon', 'function detectWeb(doc, url) { @@ -15945,12 +15945,12 @@ REPLACE INTO translators VALUES ('fe728bc9-595a-4f03-98fc-766f1d8d0936', '1.0.0b Zotero.wait(); }'); -REPLACE INTO translators VALUES ('b6d0a7a-d076-48ae-b2f0-b6de28b194e', '1.0.0b3.r1', '', '2008-05-22 19:00:00', '1', '100', '4', 'ScienceDirect', 'Michael Berkowitz', 'https?://www\.sciencedirect\.com[^/]*/science(\/article)?\?(?:.+\&|)_ob=(?:ArticleURL|ArticleListURL|PublicationURL)', +REPLACE INTO translators VALUES ('b6d0a7a-d076-48ae-b2f0-b6de28b194e', '1.0.0b3.r1', '', '2008-05-27 17:30:00', '1', '100', '4', 'ScienceDirect', 'Michael Berkowitz', 'https?://www\.sciencedirect\.com[^/]*/science(\/article)?\?(?:.+\&|)_ob=(?:ArticleURL|ArticleListURL|PublicationURL)', 'function detectWeb(doc, url) { if ((url.indexOf("_ob=DownloadURL") != -1) || doc.title == "ScienceDirect Login") { return false; } - if(url.indexOf("_ob=ArticleURL") == -1) { + if(url.indexOf("_ob=ArticleURL") == -1 || url.indexOf("/journal/") != -1) { return "multiple"; } else { return "journalArticle"; @@ -15979,7 +15979,7 @@ REPLACE INTO translators VALUES ('b6d0a7a-d076-48ae-b2f0-b6de28b194e', '1.0.0b3. while (next_row = rows.iterateNext()) { var title = next_row.textContent; var link = next_row.href; - items[link] = title; + if (!title.match(/PDF \(/) && !title.match(/Related Articles/)) items[link] = title; } items = Zotero.selectItems(items); for (var i in items) {