From bcac72cb7cc78ac8decd6fa784d4475ac70ca63c Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 4 Dec 2011 08:05:21 +0530 Subject: [PATCH] Improve Metro UK --- recipes/metro_uk.recipe | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/recipes/metro_uk.recipe b/recipes/metro_uk.recipe index 647e5633e7..8dc7008a68 100644 --- a/recipes/metro_uk.recipe +++ b/recipes/metro_uk.recipe @@ -5,8 +5,8 @@ class AdvancedUserRecipe1306097511(BasicNewsRecipe): description = 'News as provide by The Metro -UK' __author__ = 'Dave Asbury' + #last update 3/12/11 cover_url = 'http://profile.ak.fbcdn.net/hprofile-ak-snc4/276636_117118184990145_2132092232_n.jpg' - no_stylesheets = True oldest_article = 1 max_articles_per_feed = 20 @@ -26,15 +26,17 @@ class AdvancedUserRecipe1306097511(BasicNewsRecipe): keep_only_tags = [ - dict(name='h1'),dict(name='h2', attrs={'class':'h2'}), + dict(name='h1'),dict(name='h2', attrs={'class':'h2'}), dict(attrs={'class':['img-cnt figure']}), - dict(attrs={'class':['art-img']}), + dict(attrs={'class':['art-img']}), dict(name='div', attrs={'class':'art-lft'}), dict(name='p') ] - remove_tags = [dict(name='div', attrs={'class':[ 'news m12 clrd clr-b p5t shareBtm', 'commentForm', 'metroCommentInnerWrap', - 'art-rgt','pluck-app pluck-comm','news m12 clrd clr-l p5t', 'flt-r' ]}), - dict(attrs={'class':[ 'metroCommentFormWrap','commentText','commentsNav','avatar','submDateAndTime']}) + remove_tags = [ + dict(name = 'div',attrs={'id' : ['comments-news','formSubmission']}), + dict(name='div', attrs={'class':[ 'news m12 clrd clr-b p5t shareBtm', 'commentForm', 'metroCommentInnerWrap', + 'art-rgt','pluck-app pluck-comm','news m12 clrd clr-l p5t', 'flt-r','username','clrd' ]}), + dict(attrs={'class':['username', 'metroCommentFormWrap','commentText','commentsNav','avatar','submDateAndTime','addYourComment','displayName']}) ,dict(name='div', attrs={'class' : 'clrd art-fd fd-gr1-b'}) ] feeds = [ @@ -42,9 +44,9 @@ class AdvancedUserRecipe1306097511(BasicNewsRecipe): extra_css = ''' body {font: sans-serif medium;}' - h1 {text-align : center; font-family:Arial,Helvetica,sans-serif; font-size:20px; font-size-adjust:none; font-stretch:normal; font-style:normal; font-variant:normal; font-weight:bold;} - h2 {text-align : center;color:#4D4D4D;font-family:Arial,Helvetica,sans-serif; font-size:15px; font-size-adjust:none; font-stretch:normal; font-style:normal; font-variant:normal; font-weight:bold; } - span{ font-size:9.5px; font-weight:bold;font-style:italic} + h1 {text-align : center; font-family:Arial,Helvetica,sans-serif; font-size:20px; font-size-adjust:none; font-stretch:normal; font-style:normal; font-variant:normal; font-weight:bold;} + h2 {text-align : center;color:#4D4D4D;font-family:Arial,Helvetica,sans-serif; font-size:15px; font-size-adjust:none; font-stretch:normal; font-style:normal; font-variant:normal; font-weight:bold; } + span{ font-size:9.5px; font-weight:bold;font-style:italic} p { text-align: justify; font-family:Arial,Helvetica,sans-serif; font-size:11px; font-size-adjust:none; font-stretch:normal; font-style:normal; font-variant:normal; font-weight:normal;} - ''' + '''