From f62c2bec86b0cfdcb4ca235b1f27e5ab7e741f34 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 4 Apr 2013 20:08:42 +0530 Subject: [PATCH] Add compress images to various UK news recipes --- recipes/birmingham_post.recipe | 4 ++-- recipes/countryfile.recipe | 3 ++- recipes/daily_mirror.recipe | 4 ++-- recipes/metro_uk.recipe | 8 ++++---- recipes/nme.recipe | 3 ++- recipes/the_sun.recipe | 2 +- 6 files changed, 13 insertions(+), 11 deletions(-) diff --git a/recipes/birmingham_post.recipe b/recipes/birmingham_post.recipe index db2e29c821..86db7504fe 100644 --- a/recipes/birmingham_post.recipe +++ b/recipes/birmingham_post.recipe @@ -9,14 +9,14 @@ class AdvancedUserRecipe1306097511(BasicNewsRecipe): __author__ = 'Dave Asbury' cover_url = 'http://profile.ak.fbcdn.net/hprofile-ak-snc4/161987_9010212100_2035706408_n.jpg' oldest_article = 2 - max_articles_per_feed = 12 + max_articles_per_feed = 20 linearize_tables = True remove_empty_feeds = True remove_javascript = True no_stylesheets = True auto_cleanup = True language = 'en_GB' - + compress_news_images = True cover_url = 'http://profile.ak.fbcdn.net/hprofile-ak-snc4/161987_9010212100_2035706408_n.jpg' masthead_url = 'http://www.trinitymirror.com/images/birminghampost-logo.gif' diff --git a/recipes/countryfile.recipe b/recipes/countryfile.recipe index 86769b78cd..717f81afce 100644 --- a/recipes/countryfile.recipe +++ b/recipes/countryfile.recipe @@ -7,13 +7,14 @@ class AdvancedUserRecipe1325006965(BasicNewsRecipe): #cover_url = 'http://www.countryfile.com/sites/default/files/imagecache/160px_wide/cover/2_1.jpg' __author__ = 'Dave Asbury' description = 'The official website of Countryfile Magazine' - # last updated 8/12/12 + # last updated 19/10/12 language = 'en_GB' oldest_article = 30 max_articles_per_feed = 25 remove_empty_feeds = True no_stylesheets = True auto_cleanup = True + compress_news_images = True ignore_duplicate_articles = {'title', 'url'} #articles_are_obfuscated = True #article_already_exists = False diff --git a/recipes/daily_mirror.recipe b/recipes/daily_mirror.recipe index bff337bcf7..91a274ab8c 100644 --- a/recipes/daily_mirror.recipe +++ b/recipes/daily_mirror.recipe @@ -13,9 +13,9 @@ class AdvancedUserRecipe1306061239(BasicNewsRecipe): masthead_url = 'http://www.nmauk.co.uk/nma/images/daily_mirror.gif' - + compress_news_images = True oldest_article = 1 - max_articles_per_feed = 1 + max_articles_per_feed = 12 remove_empty_feeds = True remove_javascript = True no_stylesheets = True diff --git a/recipes/metro_uk.recipe b/recipes/metro_uk.recipe index 78db75daf8..6b5ee3bf4b 100644 --- a/recipes/metro_uk.recipe +++ b/recipes/metro_uk.recipe @@ -6,10 +6,10 @@ import time class AdvancedUserRecipe1306097511(BasicNewsRecipe): title = u'Metro UK' - description = 'News as provided by The Metro -UK' + description = 'News from The Metro, UK' #timefmt = '' - __author__ = 'fleclerc & Dave Asbury' - #last update 20/1/13 + __author__ = 'Dave Asbury' + #last update 4/4/13 #cover_url = 'http://profile.ak.fbcdn.net/hprofile-ak-snc4/276636_117118184990145_2132092232_n.jpg' cover_url = 'https://twimg0-a.akamaihd.net/profile_images/1638332595/METRO_LETTERS-01.jpg' @@ -22,7 +22,7 @@ class AdvancedUserRecipe1306097511(BasicNewsRecipe): language = 'en_GB' masthead_url = 'http://e-edition.metro.co.uk/images/metro_logo.gif' - + compress_news_images = True def parse_index(self): articles = {} key = None diff --git a/recipes/nme.recipe b/recipes/nme.recipe index 6a62b00902..b652cb5e5f 100644 --- a/recipes/nme.recipe +++ b/recipes/nme.recipe @@ -12,6 +12,7 @@ class AdvancedUserRecipe1306061239(BasicNewsRecipe): max_articles_per_feed = 20 #auto_cleanup = True language = 'en_GB' + compress_news_images = True def get_cover_url(self): soup = self.index_to_soup('http://www.nme.com/component/subscribe') @@ -27,7 +28,7 @@ class AdvancedUserRecipe1306061239(BasicNewsRecipe): br.open_novisit(cov2) cover_url = str(cov2) except: - cover_url = 'http://tawanda3000.files.wordpress.com/2011/02/nme-logo.jpg' + cover_url = 'http://tawanda3000.files.wordpress.com/2011/02/nme-logo.jpg' return cover_url masthead_url = 'http://tawanda3000.files.wordpress.com/2011/02/nme-logo.jpg' diff --git a/recipes/the_sun.recipe b/recipes/the_sun.recipe index 3155bce3f2..10027d4583 100644 --- a/recipes/the_sun.recipe +++ b/recipes/the_sun.recipe @@ -20,7 +20,7 @@ class AdvancedUserRecipe1325006965(BasicNewsRecipe): no_stylesheets = True ignore_duplicate_articles = {'title','url'} - + compress_news_images = True extra_css = ''' body{ 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;}