diff --git a/recipes/scmp.recipe b/recipes/scmp.recipe index f2981ca667..6c66231da7 100644 --- a/recipes/scmp.recipe +++ b/recipes/scmp.recipe @@ -4,7 +4,6 @@ scmp.com ''' -import re from calibre.web.feeds.news import BasicNewsRecipe class SCMP(BasicNewsRecipe): @@ -18,10 +17,11 @@ class SCMP(BasicNewsRecipe): max_articles_per_feed = 200 no_stylesheets = True encoding = 'utf-8' + auto_cleanup = True use_embedded_content = False language = 'en_CN' remove_empty_feeds = True - needs_subscription = True + needs_subscription = 'optional' publication_type = 'newspaper' masthead_url = 'http://www.scmp.com/images/logo_scmp_home.gif' extra_css = ' body{font-family: Arial,Helvetica,sans-serif } ' @@ -46,17 +46,17 @@ def get_browser(self): br.submit() return br - remove_attributes=['width','height','border'] + #remove_attributes=['width','height','border'] - keep_only_tags = [ - dict(attrs={'id':['ART','photoBox']}) - ,dict(attrs={'class':['article_label','article_byline','article_body']}) - ] + #keep_only_tags = [ + #dict(attrs={'id':['ART','photoBox']}) + #,dict(attrs={'class':['article_label','article_byline','article_body']}) + #] - preprocess_regexps = [ - (re.compile(r'