-ACM translator should more consistently save abstracts.
This commit is contained in:
parent
b50126776f
commit
ec46106617
11
scrapers.sql
11
scrapers.sql
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
|
|
||||||
-- Set the following timestamp to the most recent scraper update date
|
-- Set the following timestamp to the most recent scraper update date
|
||||||
REPLACE INTO version VALUES ('repository', STRFTIME('%s', '2008-05-19 16:30:00'));
|
REPLACE INTO version VALUES ('repository', STRFTIME('%s', '2008-05-19 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',
|
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) {
|
'function detectWeb(doc, url) {
|
||||||
|
@ -17021,7 +17021,7 @@ function doWeb(doc, url) {
|
||||||
}
|
}
|
||||||
}');
|
}');
|
||||||
|
|
||||||
REPLACE INTO translators VALUES ('e78d20f7-488-4023-831-dfe39679f3f', '1.0.0b3.r1', '', '2008-03-04 20:00:00', '1', '100', '4', 'ACM', 'Simon Kornblith', 'https?://[^/]*portal\.acm\.org[^/]*/(?:results\.cfm|citation\.cfm)',
|
REPLACE INTO translators VALUES ('e78d20f7-488-4023-831-dfe39679f3f', '1.0.0b3.r1', '', '2008-05-19 17:30:00', '1', '100', '4', 'ACM', 'Simon Kornblith and Michael Berkowitz', 'https?://[^/]*portal\.acm\.org[^/]*/(?:results\.cfm|citation\.cfm)',
|
||||||
'function detectWeb(doc, url) {
|
'function detectWeb(doc, url) {
|
||||||
if(url.indexOf("/results.cfm") != -1) {
|
if(url.indexOf("/results.cfm") != -1) {
|
||||||
var items = Zotero.Utilities.getItemArray(doc, doc, ''^https?://[^/]+/citation.cfm\\?[^#]+$'');
|
var items = Zotero.Utilities.getItemArray(doc, doc, ''^https?://[^/]+/citation.cfm\\?[^#]+$'');
|
||||||
|
@ -17057,10 +17057,11 @@ function scrape(doc) {
|
||||||
null).iterateNext().getAttribute("onClick");
|
null).iterateNext().getAttribute("onClick");
|
||||||
var m = onClick.match(/''([^'']+)''/);
|
var m = onClick.match(/''([^'']+)''/);
|
||||||
|
|
||||||
var abstract = doc.evaluate(''//div[@class="abstract"]/p[@class="abstract"]'', doc, null,
|
var abstract = doc.evaluate(''//div[@class="abstract"]/p[@class="abstract"]'', doc, null, XPathResult.ANY_TYPE, null).iterateNext();
|
||||||
XPathResult.ANY_TYPE, null).iterateNext();
|
if (!abstract.textContent.match(/\w+/)) {
|
||||||
|
var abstract = doc.evaluate(''//div[@class="abstract"]/p[2]'', doc, null, XPathResult.ANY_TYPE, null).iterateNext();
|
||||||
|
}
|
||||||
if(abstract) abstract = Zotero.Utilities.cleanString(abstract.textContent);
|
if(abstract) abstract = Zotero.Utilities.cleanString(abstract.textContent);
|
||||||
|
|
||||||
var snapshot = doc.location.href;
|
var snapshot = doc.location.href;
|
||||||
|
|
||||||
var attachments = new Array();
|
var attachments = new Array();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user