diff --git a/recipes/richmond_times_dispatch.recipe b/recipes/richmond_times_dispatch.recipe index 2208dafc98..163a6317ff 100644 --- a/recipes/richmond_times_dispatch.recipe +++ b/recipes/richmond_times_dispatch.recipe @@ -1,58 +1,59 @@ -import re -from calibre.web.feeds.recipes import BasicNewsRecipe - -class AdvancedUserRecipe1308591763(BasicNewsRecipe): - title = u'Richmond Times-Dispatch' - description = 'News from Richmond, Virginia' - - language = 'en' - __author__ = 'jde' - oldest_article = 3 #days - max_articles_per_feed = 25 - summary_length = 150 - no_stylesheets = True - remove_javascript = True - use_embedded_content = False - encoding = 'utf8' - publisher = 'Richmond Times-Dispatch' - category = 'news, Virginia, world' - publication_type = 'newsportal' - extra_css = ' body{ font-family: Verdana,Helvetica,Arial,sans-serif } .introduction{font-weight: bold} .story-feature{display: block; padding: 0; border: 1px solid; width: 40%; font-size: small} .story-feature h2{text-align: center; text-transform: uppercase} ' - preprocess_regexps = [(re.compile(r'', re.DOTALL), lambda m: '')] - conversion_options = { - 'comments' : description - ,'tags' : category - ,'language' : language - ,'publisher' : publisher - ,'linearize_tables': True - } - - remove_attributes = ['width','height'] - remove_tags_before = dict(name='h1', attrs={'id':'story_headline'}) - remove_tags_after = dict(name='class', attrs={'id':'content_fbrecommend'}) - - remove_tags = [ - dict(name='iframe'), - dict(name='div', attrs={'id':['topslider', 'top_links', 'top_links_center', 'top_links_right', 'mast', 'mainnav', 'search', 'searchbar_box', 'dateline', 'breadcrumb']}), - dict(name='div', attrs={'id':['sectionheader', 'comments_list', 'comment_form', 'sr_b', 'mg_ft', 'bottomad', 'mgproperties', 'copyright', 'bottomnow']}), - dict(name='div', attrs={'id':['comments_left']}), - dict(name='div', attrs={'class':['related_content', 'article_comments', 'article_foot', 'content_fbrecommend']}), - dict(name='div', attrs={'class':['bottom_social addthis_toolbox', 'featurebox', 'article_bottom']}), - dict(name='ul', attrs={'class':['jd_menu']}) - ] - - feeds = [ - (u'News', u'http://www2.timesdispatch.com/list/feed/rss/news-archive/'), - (u'Breaking News', u'http://www2.timesdispatch.com/list/feed/rss/breaking-news/'), - (u'National News', u'http://www2.timesdispatch.com/list/feed/rss/national-news/'), - (u'Local News', u'http://www2.timesdispatch.com/list/feed/rss/local-news/'), - (u'Business', u'http://www2.timesdispatch.com/list/feed/rss/business/'), - (u'Local Business', u'http://www2.timesdispatch.com/list/feed/rss/local-business/'), - (u'Politics', u'http://www2.timesdispatch.com/list/feed/rss/politics/'), - (u'Virginia Politics', u'http://www2.timesdispatch.com/list/feed/rss/virginia-politics/'), - (u'Editorials', u'http://www2.timesdispatch.com/list/feed/rss/editorial-desk/'), - (u'Columnists and Blogs', u'http://www2.timesdispatch.com/list/feed/rss/news-columnists-blogs//'), - (u'Opinion Columnists', u'http://www2.timesdispatch.com/list/feed/rss/opinion-editorial-columnists/'), - (u'Letters to the Editor', u'http://www2.timesdispatch.com/list/feed/rss/opinion-letters/'), - (u'Traffic', u'http://www2.timesdispatch.com/list/feed/rss/traffic/'), - ] +from calibre.web.feeds.recipes import BasicNewsRecipe + +class AdvancedUserRecipe1335532466(BasicNewsRecipe): + title = u'Richmond Times-Dispatch' + description = 'News from Richmond, Virginia, USA' + __author__ = 'jde' + cover_url = 'http://static2.dukecms.com/va_tn/timesdispatch_com/site-media/img/icons/logo252x97.png' + language = 'en' + encoding = 'utf8' + oldest_article = 1 #days + max_articles_per_feed = 25 + needs_subscription = False + remove_javascript = True + recursions = 0 + use_embedded_content = False + no_stylesheets = True + auto_cleanup = True + + feeds = [ + +('News', +'http://www2.timesdispatch.com/list/feed/rss/news-archive'), +('Breaking News', +'http://www2.timesdispatch.com/list/feed/rss/breaking-news'), +('National News', +'http://www2.timesdispatch.com/list/feed/rss/national-news'), +('Local News', +'http://www2.timesdispatch.com/list/feed/rss/local-news'), +('Business', +'http://www2.timesdispatch.com/list/feed/rss/business'), +('Local Business', +'http://www2.timesdispatch.com/list/feed/rss/local-business'), +('Politics', +'http://www2.timesdispatch.com/list/feed/rss/politics'), +('Virginia Politics', +'http://www2.timesdispatch.com/list/feed/rss/virginia-politics'), +('Editorials', +'http://www2.timesdispatch.com/list/feed/rss/editorial-desk'), +('Columnists and Blogs', +'http://www2.timesdispatch.com/list/feed/rss/news-columnists-blogs'), +('Opinion Columnists', +'http://www2.timesdispatch.com/list/feed/rss/opinion-editorial-columnists'), +('Letters to the Editor', +'http://www2.timesdispatch.com/list/feed/rss/opinion-letters'), +('Traffic', +'http://www2.timesdispatch.com/list/feed/rss/traffic'), +('Sports', +'http://www2.timesdispatch.com/list/feed/rss/sports2'), +('Entertainment/Life', +'http://www2.timesdispatch.com/list/feed/rss/entertainment'), +('Movies', +'http://www2.timesdispatch.com/list/feed/rss/movies'), +('Music', +'http://www2.timesdispatch.com/list/feed/rss/music'), +('Dining & Food', +'http://www2.timesdispatch.com/list/feed/rss/dining'), + + ] +