mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Update Daily Mirror
This commit is contained in:
parent
097ea82129
commit
4954e91a62
@ -7,50 +7,50 @@ class AdvancedUserRecipe1306061239(BasicNewsRecipe):
|
|||||||
description = 'News as provided by The Daily Mirror -UK'
|
description = 'News as provided by The Daily Mirror -UK'
|
||||||
|
|
||||||
__author__ = 'Dave Asbury'
|
__author__ = 'Dave Asbury'
|
||||||
# last updated 19/10/12
|
# last updated 27/8/13
|
||||||
language = 'en_GB'
|
language = 'en_GB'
|
||||||
#cover_url = 'http://yookeo.com/screens/m/i/mirror.co.uk.jpg'
|
#cover_url = 'http://yookeo.com/screens/m/i/mirror.co.uk.jpg'
|
||||||
|
|
||||||
masthead_url = 'http://www.nmauk.co.uk/nma/images/daily_mirror.gif'
|
masthead_url = 'http://www.nmauk.co.uk/nma/images/daily_mirror.gif'
|
||||||
|
#recursions = 10
|
||||||
compress_news_images = True
|
compress_news_images = True
|
||||||
oldest_article = 1
|
compress_news_images_max_size = 30
|
||||||
max_articles_per_feed = 12
|
oldest_article = 1.5
|
||||||
|
max_articles_per_feed = 10
|
||||||
remove_empty_feeds = True
|
remove_empty_feeds = True
|
||||||
remove_javascript = True
|
remove_javascript = True
|
||||||
no_stylesheets = True
|
no_stylesheets = True
|
||||||
ignore_duplicate_articles = {'title'}
|
ignore_duplicate_articles = {'url'}
|
||||||
|
|
||||||
#auto_cleanup = True
|
#auto_cleanup = True
|
||||||
#conversion_options = { 'linearize_tables' : True }
|
#conversion_options = { 'linearize_tables' : True }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
keep_only_tags = [dict(name='h1'),
|
keep_only_tags = [dict(name='h1'),
|
||||||
dict(name='div',attrs={'class' : 'lead-text'}),
|
dict(name='div',attrs={'class' : 'lead-text'}),
|
||||||
dict(name='div',attrs={'class' : 'styleGroup clearfix'}),
|
dict(attrs={'class' : 'tools clearfix'}),
|
||||||
dict(name='div',attrs={'class' : 'widget relatedContents pictures widget-editable viziwyg-section-245 inpage-widget-158123'}),
|
dict(name='div',attrs={'class' : 'widget relatedContents pictures widget-editable viziwyg-section-245 inpage-widget-158123'}),
|
||||||
# dict(name='figure',attrs={'class' : 'clearfix'}),
|
# dict(name='figure',attrs={'class' : 'clearfix'}),
|
||||||
dict(name='div',attrs={'class' :'body '}),
|
dict(name='div',attrs={'class' :'body '}),
|
||||||
|
dict(name='div',attrs={'class' :'thumb'}),
|
||||||
|
dict(attrs={'img alt' : ['Perishers','Horace']}),
|
||||||
|
#dict(attrs={'class' : 'tmRow span-15-5 col-1 article-page'}),
|
||||||
#dict(attrs={'class' : ['article-attr','byline append-1','published']}),
|
#dict(attrs={'class' : ['article-attr','byline append-1','published']}),
|
||||||
# dict(name='p'),
|
# dict(name='p'),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
remove_tags = [
|
remove_tags = [
|
||||||
dict(attrs={'class' : ['article sa-teaser type-opinion','image-gallery','gallery-caption']}),
|
dict(attrs={'class' : ['article sa-teaser type-opinion','last','gallery-caption','gallery-data','ir btn-fullscreen','avatar']}), # ,'image-gallery'
|
||||||
dict(attrs={'class' : 'comment'}),
|
dict(attrs={'class' : 'comment'}),
|
||||||
dict(name='title'),
|
dict(name='title'),
|
||||||
dict(name='ul',attrs={'class' : 'clearfix breadcrumbs '}),
|
dict(name='ul',attrs={'class' : 'clearfix breadcrumbs '}),
|
||||||
dict(name='ul',attrs={'id' : 'login-201109171215'}),
|
dict(name='ul',attrs={'id' : 'login-201109171215'}),
|
||||||
dict(name='div',attrs={'class' : ['inline-ad span-16 last','caption']}),#'widget navigation breadcrumb widget-editable viziwyg-section-198 inpage-widget-80721 span-17','image-credit'
|
#'widget navigation breadcrumb widget-editable viziwyg-section-198 inpage-widget-80721 span-17','image-credit'
|
||||||
|
dict(name='div',attrs={'class' : ['inline-ad span-16 last','caption']}),
|
||||||
]
|
]
|
||||||
|
|
||||||
preprocess_regexps = [
|
preprocess_regexps = [
|
||||||
(re.compile(r'- mirror.co.uk', re.IGNORECASE | re.DOTALL), lambda match: '')]
|
(re.compile(r'- mirror.co.uk', re.IGNORECASE | re.DOTALL), lambda match: '')]
|
||||||
|
|
||||||
|
|
||||||
feeds = [
|
feeds = [
|
||||||
(u'News',u'http://www.mirror.co.uk/news/rss.xml'),
|
(u'News',u'http://www.mirror.co.uk/news/rss.xml'),
|
||||||
(u'Sports',u'http://www.mirror.co.uk/sport/rss.xml'),
|
(u'Sports',u'http://www.mirror.co.uk/sport/rss.xml'),
|
||||||
@ -63,10 +63,15 @@ class AdvancedUserRecipe1306061239(BasicNewsRecipe):
|
|||||||
# example of commented out feed not needed ,(u'Travel','http://www.mirror.co.uk/advice/travel/rss.xml')
|
# example of commented out feed not needed ,(u'Travel','http://www.mirror.co.uk/advice/travel/rss.xml')
|
||||||
]
|
]
|
||||||
extra_css = '''
|
extra_css = '''
|
||||||
h1{font-family:Arial,Helvetica,sans-serif; font-weight:bold;font-size:large;}
|
h1{font-family:Arial,Helvetica,sans-serif; font-weight:bold;font-size:170%;}
|
||||||
h2{font-family:Arial,Helvetica,sans-serif; font-weight:normal;font-size:small;}
|
.article figure figcaption {display: block;margin-left: auto;margin-right: auto;
|
||||||
p{font-family:Arial,Helvetica,sans-serif;font-size:small;}
|
width:100%;font-family:Arial,Helvetica,sans-serif;font-size:40%;}
|
||||||
body{font-family:Helvetica,Arial,sans-serif;font-size:small;}
|
|
||||||
|
#h2{font-family:Arial,Helvetica,sans-serif; font-weight:normal;}
|
||||||
|
p{font-family:Arial,Helvetica,sans-serif;}
|
||||||
|
body{font-family:Helvetica,Arial,sans-serif;}
|
||||||
|
.article figure{display: block;margin-left: auto;margin-right: auto;width:100%;}
|
||||||
|
.lead-text p {font-size:150%}
|
||||||
'''
|
'''
|
||||||
|
|
||||||
def get_cover_url(self):
|
def get_cover_url(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user