From 67f6ae3ed256fb7705c18b3d874f6e0349bddede Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Sat, 9 Sep 2006 19:47:47 +0000 Subject: [PATCH] - closes #69, notification system for broken scrapers - don't put "Page" before page in WaPo scraper --- chrome/chromeFiles/content/scholar/xpcom/translate.js | 4 ++-- scrapers.sql | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/chrome/chromeFiles/content/scholar/xpcom/translate.js b/chrome/chromeFiles/content/scholar/xpcom/translate.js index 3c1eb784f0..b740f13b32 100644 --- a/chrome/chromeFiles/content/scholar/xpcom/translate.js +++ b/chrome/chromeFiles/content/scholar/xpcom/translate.js @@ -931,8 +931,8 @@ Scholar.Translate.prototype._translationComplete = function(returnValue, error) * runs an HTTP request to report a translation error */ Scholar.Translate.prototype._reportTranslationFailure = function(errorData) { - if(Scholar.Prefs.get("reportTranslationFailure")) { - var postBody = "id="+escape(this.translator[0].translatorID)+ + if(this.translator[0].inRepository && Scholar.Prefs.get("reportTranslationFailure")) { + var postBody = "ids[]="+escape(this.translator[0].translatorID)+ "&lastUpdated="+escape(this.translator[0].lastUpdated)+ "&errorData="+escape(errorData); Scholar.Utilities.HTTP.doPost("http://www.zotero.org/repo/report", postBody); diff --git a/scrapers.sql b/scrapers.sql index d65e118028..6a0da865cc 100644 --- a/scrapers.sql +++ b/scrapers.sql @@ -1,4 +1,4 @@ --- 87 +-- 88 -- Set the following timestamp to the most recent scraper update date REPLACE INTO "version" VALUES ('repository', STRFTIME('%s', '2006-08-31 22:44:00')); @@ -3805,7 +3805,7 @@ REPLACE INTO "translators" VALUES ('d1bf1c29-4432-4ada-8893-2e29fc88fd9e', '2006 XPathResult.ANY_TYPE, null); var font; while(font = fonts.iterateNext()) { - var pageRe = /([^;]+);([\xA0 ]+Pages?[\xA0 ]+([A-Z0-9\-]+))?/ + var pageRe = /([^;]+);(?:[\xA0 ]+Pages?[\xA0 ]+([A-Z0-9\-]+))?/ // grab pages and date Scholar.Utilities.debug(Scholar.Utilities.cleanString(font.nodeValue)); var m = pageRe.exec(font.nodeValue);