closes #403, Aleph translator not working

i modified the XPath the Aleph translator uses to something that should work in nearly every case.
This commit is contained in:
Simon Kornblith 2006-11-25 00:01:24 +00:00
parent cc8ef0b93d
commit 94302bbe1c

View File

@ -1,4 +1,4 @@
-- 105
-- 106
-- ***** BEGIN LICENSE BLOCK *****
--
@ -22,7 +22,7 @@
-- Set the following timestamp to the most recent scraper update date
REPLACE INTO "version" VALUES ('repository', STRFTIME('%s', '2006-11-21 22:30:00'));
REPLACE INTO "version" VALUES ('repository', STRFTIME('%s', '2006-11-24 14:30:00'));
REPLACE INTO "translators" VALUES ('96b9f483-c44d-5784-cdad-ce21b984fe01', '2006-11-21 22:30:00', 1, 100, 12, 'Amazon', 'Sean Takats', '^http://(?:www\.)amazon',
'function detectWeb(doc, url) {
@ -1781,7 +1781,7 @@ function doWeb(doc, url) {
}
}');
REPLACE INTO "translators" VALUES ('cf87eca8-041d-b954-795a-2d86348999d5', '2006-10-02 17:00:00', 1, 100, 4, 'Aleph', 'Simon Kornblith', '^http://[^/]+/F(?:/[A-Z0-9\-]+(?:\?.*)?$|\?func=find|\?func=scan)',
REPLACE INTO "translators" VALUES ('cf87eca8-041d-b954-795a-2d86348999d5', '2006-11-24 14:30:00', 1, 100, 4, 'Aleph', 'Simon Kornblith', '^http://[^/]+/F(?:/[A-Z0-9\-]+(?:\?.*)?$|\?func=find|\?func=scan)',
'function detectWeb(doc, url) {
var singleRe = new RegExp("^http://[^/]+/F/[A-Z0-9\-]+\?.*(?:func=full-set-set.*\&format=[0-9]{3}|func=direct)");
@ -1845,7 +1845,7 @@ REPLACE INTO "translators" VALUES ('cf87eca8-041d-b954-795a-2d86348999d5', '2006
if (prefix == ''x'') return namespace; else return null;
} : null;
var xpath = ''//table/tbody/tr[td[1][@id="bold"] or td[@class="recordTD"]][td[2]]'';
var xpath = ''//*[tr[td/text()="LDR"]]/tr'';
var elmts = newDoc.evaluate(xpath, newDoc, nsResolver, XPathResult.ANY_TYPE, null);
var elmt;