Adding new translators using Erik's framework in a minified form; translators by Sebastian Karcher and Avram Lyon; framework by Erik Hetzner
This commit is contained in:
parent
f5661217aa
commit
77c66d5612
10 changed files with 661 additions and 101 deletions
60
translators/APN.ru.js
Normal file
60
translators/APN.ru.js
Normal file
File diff suppressed because one or more lines are too long
75
translators/Ab Imperio.js
Normal file
75
translators/Ab Imperio.js
Normal file
File diff suppressed because one or more lines are too long
46
translators/EurasiaNet.js
Normal file
46
translators/EurasiaNet.js
Normal file
File diff suppressed because one or more lines are too long
43
translators/Gasyrlar Awazy.js
Normal file
43
translators/Gasyrlar Awazy.js
Normal file
File diff suppressed because one or more lines are too long
101
translators/Kommersant.js
Normal file
101
translators/Kommersant.js
Normal file
File diff suppressed because one or more lines are too long
71
translators/Matbugat.ru.js
Normal file
71
translators/Matbugat.ru.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
54
translators/The New Yorker.js
Normal file
54
translators/The New Yorker.js
Normal file
File diff suppressed because one or more lines are too long
48
translators/VoxEU.js
Normal file
48
translators/VoxEU.js
Normal file
|
@ -0,0 +1,48 @@
|
|||
{
|
||||
"translatorID": "508e8fb9-8a33-4095-844f-133cba7e7b54",
|
||||
"label": "VoxEU",
|
||||
"creator": "Sebastian Karcher",
|
||||
"target": "^https?://www\\.voxeu\\.org",
|
||||
"minVersion": "1.0",
|
||||
"maxVersion": "",
|
||||
"priority": 100,
|
||||
"inRepository": true,
|
||||
"translatorType": 4,
|
||||
"lastUpdated": "2011-05-24 01:09:58"
|
||||
}
|
||||
|
||||
/*Examples:
|
||||
Individual item
|
||||
http://www.voxeu.org/index.php?q=node/6258
|
||||
Search results
|
||||
http://www.voxeu.org/index.php?q=search/node/eichengreen */
|
||||
|
||||
function detectWeb(doc, url) { return FW.detectWeb(doc, url); }
|
||||
function doWeb(doc, url) { return FW.doWeb(doc, url); }
|
||||
|
||||
/** Articles */
|
||||
FW.Scraper({
|
||||
itemType : 'blogPost',
|
||||
detect : FW.Xpath('//div[@class="terms"]'),
|
||||
title : FW.Xpath('//div[@id="main"]/div[@id="squeeze"]/h1').text().trim(),
|
||||
attachments : {
|
||||
url : FW.Url(),
|
||||
title : "voxEU snapshot",
|
||||
type : "text/html"
|
||||
},
|
||||
creators : FW.Xpath('//table[@class="layouttable"]/tbody/*/td/p/a ').text().cleanAuthor("author"),
|
||||
abstractNote : FW.Xpath('//table[@class="layouttable"]/tbody/tr/td/div/em').text(),
|
||||
date : FW.Xpath('//table[@class="layouttable"]/tbody/*/td/p/text()[last()] ').text(),
|
||||
publicationTitle : "VoxEU.org",
|
||||
tags : FW.Xpath('//div[@class="terms"]//li').text()
|
||||
});
|
||||
|
||||
/** Search results */
|
||||
FW.MultiScraper({
|
||||
itemType : "multiple",
|
||||
detect : FW.Xpath('//div[@class="content"]/dl[contains(@class, "search-results")]'),
|
||||
choices : {
|
||||
titles : FW.Xpath('//div[@class="content"]/dl/dt[@class="title"]/a').text(),
|
||||
urls : FW.Xpath('//div[@class="content"]/dl/dt[@class="title"]/a').key('href').text()
|
||||
}
|
||||
});
|
102
translators/Washington Monthly.js
Normal file
102
translators/Washington Monthly.js
Normal file
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue