diff --git a/src/calibre/web/feeds/recipes/recipe_daily_mail.py b/src/calibre/web/feeds/recipes/recipe_daily_mail.py index 3dba0c8d4c..669c256161 100644 --- a/src/calibre/web/feeds/recipes/recipe_daily_mail.py +++ b/src/calibre/web/feeds/recipes/recipe_daily_mail.py @@ -5,15 +5,28 @@ class TheDailyMail(BasicNewsRecipe): oldest_article = 2 language = 'en_GB' - author = 'RufusA' + author = 'RufusA and Sujata Raman' simultaneous_downloads= 1 max_articles_per_feed = 50 - extra_css = 'h1 {text-align: left;}' + extra_css = '''#js-article-text{font-family:Arial,Helvetica,sans-serif;} + h1{font-size:large; font-weight:bold;} + a.author{color:#003580;} + .js-article-text{font-size:50%;} + .imageCaption{font-size:x-small; font-weight:bold} + + + ''' + + remove_tags = [ dict(name='div', attrs={'class':['article-icon-links-container','print-or-mail-links cleared', + 'social-links cleared','explore-links','relatedItems','intellicrumbs box','travel','moduleHalf']}), + dict(name='div', attrs={'id':['link-unit-wrapper','pushdown-ad','reader-comments','googleAds',]}), + dict(name='h3', attrs={'class':['social-links-title']}), + dict(name='span', attrs={'class':['clickToEnlargeTop']}), + ] + #remove_tags_before = dict(name='div', attrs={'id':'content'}) + keep_only_tags = [dict(name='div', attrs={'id':'js-article-text'})] - remove_tags = [ dict(name='ul', attrs={'class':'article-icons-links'}) ] - remove_tags_after = dict(name='h3', attrs={'class':'social-links-title'}) - remove_tags_before = dict(name='div', attrs={'id':'content'}) no_stylesheets = True feeds = [ @@ -27,8 +40,11 @@ class TheDailyMail(BasicNewsRecipe): (u'Money', u'http://www.dailymail.co.uk/money/index.rss'), (u'Property', u'http://www.dailymail.co.uk/property/index.rss'), (u'Motoring', u'http://www.dailymail.co.uk/motoring/index.rss'), - (u'Travel', u'http://www.dailymail.co.uk/travel/index.rss')] + (u'Travel', u'http://www.dailymail.co.uk/travel/index.rss') + ] + + #def print_version(self, url): + # main = url.partition('?')[0] + # return main + '?printingPage=true' + - def print_version(self, url): - main = url.partition('?')[0] - return main + '?printingPage=true'