From 6a24c74e50efe2a40e915c3008849b21e8f60081 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 7 Feb 2010 12:12:23 -0700 Subject: [PATCH] Courier Press by Krittika Goyal --- resources/recipes/courrier.recipe | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 resources/recipes/courrier.recipe diff --git a/resources/recipes/courrier.recipe b/resources/recipes/courrier.recipe new file mode 100644 index 0000000000..d5559a5fca --- /dev/null +++ b/resources/recipes/courrier.recipe @@ -0,0 +1,26 @@ +from calibre.web.feeds.news import BasicNewsRecipe +from calibre.ebooks.BeautifulSoup import BeautifulSoup + +class CourierPress(BasicNewsRecipe): + title = u'Courier Press' + language = 'en' + __author__ = 'Krittika Goyal' + oldest_article = 1 #days + max_articles_per_feed = 25 + + remove_stylesheets = True + remove_tags = [ + dict(name='iframe'), + ] + + feeds = [ +('Courier Press', + 'http://www.courierpress.com/rss/headlines/news/'), +] + + def preprocess_html(self, soup): + story = soup.find(name='div', attrs={'id':'article_body'}) + soup = BeautifulSoup('t') + body = soup.find(name='body') + body.insert(0, story) + return soup