diff --git a/chrome/content/zotero/xpcom/utilities.js b/chrome/content/zotero/xpcom/utilities.js
index 3c9ee936b..c1a1c1e63 100644
--- a/chrome/content/zotero/xpcom/utilities.js
+++ b/chrome/content/zotero/xpcom/utilities.js
@@ -285,6 +285,9 @@ Zotero.Utilities.Ingester.prototype.gatherElementsOnXPath = function(doc, parent
/*
* Gets a given node as a string containing all child nodes
+ *
+ * WARNING: This is DEPRECATED and may be removed in the final release. Use
+ * doc.evaluate and the "nodeValue" or "textContent" property
*/
Zotero.Utilities.Ingester.prototype.getNodeString = function(doc, contextNode, xpath, nsResolver) {
var elmts = this.gatherElementsOnXPath(doc, contextNode, xpath, nsResolver);
diff --git a/scrapers.sql b/scrapers.sql
index 68679d709..8a90e58e5 100644
--- a/scrapers.sql
+++ b/scrapers.sql
@@ -1,4 +1,4 @@
--- 117
+-- 118
-- ***** BEGIN LICENSE BLOCK *****
--
@@ -22,9 +22,9 @@
-- Set the following timestamp to the most recent scraper update date
-REPLACE INTO "version" VALUES ('repository', STRFTIME('%s', '2006-12-09 20:45:00'));
+REPLACE INTO "version" VALUES ('repository', STRFTIME('%s', '2006-12-11 15:44:00'));
-REPLACE INTO translators VALUES ('96b9f483-c44d-5784-cdad-ce21b984fe01', '1.0.0b3.r1', '', '2006-11-26 09:05:00', 1, 100, 4, 'Amazon', 'Sean Takats', '^http://(?:www\.)amazon',
+REPLACE INTO translators VALUES ('96b9f483-c44d-5784-cdad-ce21b984fe01', '1.0.0b3.r1', '', '2006-12-11 11:24:00', 1, 100, 4, 'Amazon', 'Sean Takats', '^http://(?:www\.)amazon',
'function detectWeb(doc, url) {
var suffixRe = new RegExp("http://(?:www\.)amazon\.([^/]+)/");
@@ -34,7 +34,6 @@ REPLACE INTO translators VALUES ('96b9f483-c44d-5784-cdad-ce21b984fe01', '1.0.0b
if(searchRe.test(doc.location.href)) {
return "multiple";
} else {
-
var namespace = doc.documentElement.namespaceURI;
var nsResolver = namespace ? function(prefix) {
if (prefix == ''x'') return namespace; else return null;
@@ -42,17 +41,22 @@ REPLACE INTO translators VALUES ('96b9f483-c44d-5784-cdad-ce21b984fe01', '1.0.0b
var xpath = ''//input[@name="ASIN"]'';
if(doc.evaluate(xpath, doc, nsResolver, XPathResult.ANY_TYPE, null).iterateNext()) {
- elmt = doc.evaluate(''//input[@name="storeID"]'', doc, nsResolver, XPathResult.ANY_TYPE, null).iterateNext();
- var storeID = Zotero.Utilities.getNodeString(doc, elmt, ''./@value'', nsResolver);
- Zotero.Utilities.debug("store id: " + storeID);
- if (storeID=="books"){
- return "book";
- }
- else if (storeID=="music"){
- return "audioRecording";
- }
- else if (storeID=="dvd"|storeID=="video"){
- return "videoRecording";
+ var elmt = doc.evaluate(''//input[@name="storeID"]'', doc, nsResolver, XPathResult.ANY_TYPE, null).iterateNext();
+ if(elmt) {
+ var storeID = elmt.value;
+ Zotero.Utilities.debug("store id: " + storeID);
+ if (storeID=="books"){
+ return "book";
+ }
+ else if (storeID=="music"){
+ return "audioRecording";
+ }
+ else if (storeID=="dvd"|storeID=="video"){
+ return "videoRecording";
+ }
+ else {
+ return "book";
+ }
}
else {
return "book";
@@ -87,8 +91,8 @@ REPLACE INTO translators VALUES ('96b9f483-c44d-5784-cdad-ce21b984fe01', '1.0.0b
var asinRe = new RegExp(''/(dp|product)/([^/]+)/'');
do {
- var link = Zotero.Utilities.getNodeString(doc, elmt, ''../@href'', nsResolver);
- var searchTitle = Zotero.Utilities.getNodeString(doc, elmt, ''./text()'', nsResolver);
+ var link = doc.evaluate(''../@href'', elmt, nsResolver, XPathResult.ANY_TYPE, null).iterateNext().nodeValue;
+ var searchTitle = elmt.textContent;
availableItems[i] = searchTitle;
var asinMatch = asinRe.exec(link);
asins[i] = asinMatch[2];
@@ -110,7 +114,7 @@ REPLACE INTO translators VALUES ('96b9f483-c44d-5784-cdad-ce21b984fe01', '1.0.0b
nsResolver, XPathResult.ANY_TYPE, null);
var elmt;
while(elmt = elmts.iterateNext()) {
- var asin = Zotero.Utilities.getNodeString(doc, elmt, ''./@value'', nsResolver);
+ var asin = elmt.value;
}
uris.push("http://ecs.amazonaws." + suffix + "/onca/xml?Service=AWSECommerceService&Version=2006-06-28&Operation=ItemLookup&SubscriptionId=0H174V5J5R5BE02YQN02&ItemId=" + asin + "&ResponseGroup=ItemAttributes");
}
@@ -407,7 +411,7 @@ function doWeb(doc, url) {
Zotero.wait();
}');
-REPLACE INTO translators VALUES ('88915634-1af6-c134-0171-56fd198235ed', '1.0.0b2.r2', '', '2006-10-02 17:00:00', 1, 100, 4, 'LOC/Voyager WebVoyage', 'Simon Kornblith', 'Pwebrecon\.cgi',
+REPLACE INTO translators VALUES ('88915634-1af6-c134-0171-56fd198235ed', '1.0.0b2.r2', '', '2006-12-11 11:24:00', 1, 100, 4, 'LOC/Voyager WebVoyage', 'Simon Kornblith', 'Pwebrecon\.cgi',
'function detectWeb(doc, url) {
var export_options = doc.forms.namedItem(''frm'').elements.namedItem(''RD'').options;
for(var i in export_options) {
@@ -464,7 +468,7 @@ REPLACE INTO translators VALUES ('88915634-1af6-c134-0171-56fd198235ed', '1.0.0b
// Go through links
for(var j=0; j