calibre/recipes/newsobs.recipe
Kovid Goyal 567040ee1e Perform PEP8 compliance checks on the entire codebase
Some bits of PEP 8 are turned off via setup.cfg
2016-07-29 21:25:17 +05:30

31 lines
1.3 KiB
Plaintext

from calibre.web.feeds.news import BasicNewsRecipe
class NewsAndObserver(BasicNewsRecipe):
title = u'News And Observer'
language = 'en'
__author__ = 'Krittika Goyal'
oldest_article = 1 # days
max_articles_per_feed = 25
no_stylesheets = True
remove_tags_before = dict(name='div', attrs={'id': 'story_header'})
remove_tags_after = dict(name='div', attrs={'id': 'shirttail'})
remove_tags = [
dict(name='iframe'),
dict(name='div', attrs={'class': ['contained_round', 'contained']}),
dict(name='div', attrs={'id': ['story_tools', 'toolbox', 'shirttail', 'comment_widget',
'stories_widget', 'classifieds_widget', 'most_popular_widget', 'footer']}),
dict(name='ul', attrs={'id': 'story_tabs'}),
]
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')]