diff --git a/recipes/richmond_times_dispatch.recipe b/recipes/richmond_times_dispatch.recipe new file mode 100644 index 0000000000..2208dafc98 --- /dev/null +++ b/recipes/richmond_times_dispatch.recipe @@ -0,0 +1,58 @@ +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/'), + ]