From 436d604f1ce46b94a193303add564ca3d5c8738e Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 5 Jan 2012 18:28:15 +0530 Subject: [PATCH] Various Italian news sources by faber1971 --- recipes/macity.recipe | 23 +++++++++++++++++++++++ recipes/wired_it.recipe | 12 ++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 recipes/macity.recipe create mode 100644 recipes/wired_it.recipe diff --git a/recipes/macity.recipe b/recipes/macity.recipe new file mode 100644 index 0000000000..b79fa972cf --- /dev/null +++ b/recipes/macity.recipe @@ -0,0 +1,23 @@ +from calibre.web.feeds.news import BasicNewsRecipe + +class AdvancedUserRecipe1325766771(BasicNewsRecipe): + title = u'Macity' + language = 'it' + oldest_article = 7 + max_articles_per_feed = 100 + auto_cleanup = True + + def get_article_url(self, article): + link = BasicNewsRecipe.get_article_url(self, article) + if link.split('/')[-1]=="story01.htm": + link=link.split('/')[-2] + a=['A', 'B', 'C', 'D', 'E', 'F', 'G', 'I', 'L' , 'N' , 'S' ] + b=['0', '.', '/', '?', '-', '=', '&', '_', 'http://', '.com', 'www.'] + for i in range(0,len(a)): + link=link.replace('0'+a[-i],b[-i]) + return link + + feeds = [(u'Macity', u'http://www.macitynet.it.feedsportal.com/c/33714/f/599513/index.rss')] + __author__ = 'faber1971' + description = 'Apple and hi-tech news' + diff --git a/recipes/wired_it.recipe b/recipes/wired_it.recipe new file mode 100644 index 0000000000..2c1f8a172d --- /dev/null +++ b/recipes/wired_it.recipe @@ -0,0 +1,12 @@ +from calibre.web.feeds.news import BasicNewsRecipe + +class AdvancedUserRecipe1325758162(BasicNewsRecipe): + title = u'Wired' + language = 'it' + oldest_article = 7 + max_articles_per_feed = 100 + auto_cleanup = True + remove_tags_after = [dict(name='div', attrs={'class':'article_content'})] + feeds = [(u'Wired', u'http://www.wired.it/rss.xml')] + __author__ = 'faber1971' + description = 'An American magazine that reports on how new technology affects culture, the economy, and politics'