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:
Avram Lyon 2011-05-23 21:54:14 +00:00
parent f5661217aa
commit 77c66d5612
10 changed files with 661 additions and 101 deletions

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

File diff suppressed because one or more lines are too long

46
translators/EurasiaNet.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

101
translators/Kommersant.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

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

48
translators/VoxEU.js Normal file
View 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()
}
});

File diff suppressed because one or more lines are too long