From 19163e55ca2b64aebcc2fef728ae5eea12f7125b Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 13 Jan 2010 09:42:37 -0700 Subject: [PATCH] New recipe for the News and Observer by Krittika Goyal --- resources/recipes/observer.recipe | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 resources/recipes/observer.recipe diff --git a/resources/recipes/observer.recipe b/resources/recipes/observer.recipe new file mode 100644 index 0000000000..139d1ff7d4 --- /dev/null +++ b/resources/recipes/observer.recipe @@ -0,0 +1,31 @@ +from calibre.web.feeds.news import BasicNewsRecipe + +class NewsandObserver(BasicNewsRecipe): + title = u'News and Observer' + description = 'News from Raleigh, North Carolina' + language = 'en' + __author__ = 'Krittika Goyal' + oldest_article = 5 #days + max_articles_per_feed = 25 + + remove_stylesheets = True + remove_tags_before = dict(name='h1', attrs={'id':'story_headline'}) + remove_tags_after = dict(name='div', attrs={'id':'story_text_remaining'}) + remove_tags = [ + dict(name='iframe'), + dict(name='div', attrs={'id':['right-rail', 'story_tools']}), + dict(name='ul', attrs={'class':'bold_tabs_nav'}), + ] + + + feeds = [ + ('Cover', 'http://www.newsobserver.com/100/index.rss'), + ('News', 'http://www.newsobserver.com/102/index.rss'), + ('Politics', 'http://www.newsobserver.com/105/index.rss'), + ('Business', 'http://www.newsobserver.com/104/index.rss'), + ('Sports', 'http://www.newsobserver.com/103/index.rss'), + ('College Sports', 'http://www.newsobserver.com/119/index.rss'), + ('Lifestyles', 'http://www.newsobserver.com/106/index.rss'), + ('Editorials', 'http://www.newsobserver.com/158/index.rss')] + +