mirror of
				https://github.com/kovidgoyal/calibre.git
				synced 2025-11-03 19:17:02 -05:00 
			
		
		
		
	...
This commit is contained in:
		
							parent
							
								
									0226d58448
								
							
						
					
					
						commit
						7e00bcd456
					
				@ -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'
 | 
				
			||||||
 | 
					    language        = 'en'
 | 
				
			||||||
 | 
					    encoding        = 'utf8'
 | 
				
			||||||
 | 
					    oldest_article = 1 #days
 | 
				
			||||||
    max_articles_per_feed = 25
 | 
					    max_articles_per_feed = 25
 | 
				
			||||||
    summary_length = 150
 | 
					    needs_subscription = False
 | 
				
			||||||
    no_stylesheets    = True
 | 
					 | 
				
			||||||
    remove_javascript = True
 | 
					    remove_javascript = True
 | 
				
			||||||
    use_embedded_content   = False
 | 
					    recursions      = 0
 | 
				
			||||||
    encoding               = 'utf8'
 | 
					    use_embedded_content = False
 | 
				
			||||||
    publisher              = 'Richmond Times-Dispatch'
 | 
					    no_stylesheets = True
 | 
				
			||||||
    category               = 'news, Virginia, world'
 | 
					    auto_cleanup = True
 | 
				
			||||||
    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']
 | 
					    feeds          =   [
 | 
				
			||||||
    remove_tags_before = dict(name='h1', attrs={'id':'story_headline'})
 | 
					
 | 
				
			||||||
    remove_tags_after   = dict(name='class', attrs={'id':'content_fbrecommend'})
 | 
					('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'),
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    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/'),
 | 
					 | 
				
			||||||
    ]
 | 
					 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user