This commit is contained in:
Kovid Goyal 2012-04-27 21:48:54 +05:30
parent 0226d58448
commit 7e00bcd456

View File

@ -1,58 +1,59 @@
import re
from calibre.web.feeds.recipes import BasicNewsRecipe from calibre.web.feeds.recipes import BasicNewsRecipe
class AdvancedUserRecipe1308591763(BasicNewsRecipe): class AdvancedUserRecipe1335532466(BasicNewsRecipe):
title = u'Richmond Times-Dispatch' title = u'Richmond Times-Dispatch'
description = 'News from Richmond, Virginia' description = 'News from Richmond, Virginia, USA'
language = 'en'
__author__ = 'jde' __author__ = 'jde'
oldest_article = 3 #days cover_url = 'http://static2.dukecms.com/va_tn/timesdispatch_com/site-media/img/icons/logo252x97.png'
max_articles_per_feed = 25 language = 'en'
summary_length = 150
no_stylesheets = True
remove_javascript = True
use_embedded_content = False
encoding = 'utf8' encoding = 'utf8'
publisher = 'Richmond Times-Dispatch' oldest_article = 1 #days
category = 'news, Virginia, world' max_articles_per_feed = 25
publication_type = 'newsportal' needs_subscription = False
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} ' remove_javascript = True
preprocess_regexps = [(re.compile(r'<!--.*?-->', re.DOTALL), lambda m: '')] recursions = 0
conversion_options = { use_embedded_content = False
'comments' : description no_stylesheets = True
,'tags' : category auto_cleanup = True
,'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 = [ 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/'), ('News',
(u'National News', u'http://www2.timesdispatch.com/list/feed/rss/national-news/'), 'http://www2.timesdispatch.com/list/feed/rss/news-archive'),
(u'Local News', u'http://www2.timesdispatch.com/list/feed/rss/local-news/'), ('Breaking News',
(u'Business', u'http://www2.timesdispatch.com/list/feed/rss/business/'), 'http://www2.timesdispatch.com/list/feed/rss/breaking-news'),
(u'Local Business', u'http://www2.timesdispatch.com/list/feed/rss/local-business/'), ('National News',
(u'Politics', u'http://www2.timesdispatch.com/list/feed/rss/politics/'), 'http://www2.timesdispatch.com/list/feed/rss/national-news'),
(u'Virginia Politics', u'http://www2.timesdispatch.com/list/feed/rss/virginia-politics/'), ('Local News',
(u'Editorials', u'http://www2.timesdispatch.com/list/feed/rss/editorial-desk/'), 'http://www2.timesdispatch.com/list/feed/rss/local-news'),
(u'Columnists and Blogs', u'http://www2.timesdispatch.com/list/feed/rss/news-columnists-blogs//'), ('Business',
(u'Opinion Columnists', u'http://www2.timesdispatch.com/list/feed/rss/opinion-editorial-columnists/'), 'http://www2.timesdispatch.com/list/feed/rss/business'),
(u'Letters to the Editor', u'http://www2.timesdispatch.com/list/feed/rss/opinion-letters/'), ('Local Business',
(u'Traffic', u'http://www2.timesdispatch.com/list/feed/rss/traffic/'), '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'),
] ]