import re, random from calibre import browser from calibre.web.feeds.recipes import BasicNewsRecipe class AdvancedUserRecipe1325006965(BasicNewsRecipe): title = u'The Sun UK' description = 'A Recipe for The Sun tabloid UK' __author__ = 'Dave Asbury' # last updated 29/4/12 language = 'en_GB' oldest_article = 1 max_articles_per_feed = 15 remove_empty_feeds = True no_stylesheets = True #auto_cleanup = True #articles_are_obfuscated = True masthead_url = 'http://www.thesun.co.uk/sol/img/global/Sun-logo.gif' encoding = 'UTF-8' remove_empty_feeds = True remove_javascript = True no_stylesheets = 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;} ''' preprocess_regexps = [ (re.compile(r'