diff --git a/recipes/foreign_policy.recipe b/recipes/foreign_policy.recipe index 0d6f9984fd..893d055a05 100644 --- a/recipes/foreign_policy.recipe +++ b/recipes/foreign_policy.recipe @@ -6,40 +6,19 @@ www.foreignpolicy.com from calibre.web.feeds.news import BasicNewsRecipe -class ForeignPolicy(BasicNewsRecipe): - title = 'Foreign Policy' +class AdvancedUserRecipe1349086293(BasicNewsRecipe): + title = u'Foreign Policy' __author__ = 'Darko Miletic' description = 'International News' publisher = 'Washingtonpost.Newsweek Interactive, LLC' category = 'news, politics, USA' - oldest_article = 31 + oldest_article = 31 max_articles_per_feed = 200 - no_stylesheets = True - encoding = 'utf8' - use_embedded_content = False - language = 'en' - remove_empty_feeds = True - extra_css = ' body{font-family: Georgia,"Times New Roman",Times,serif } img{margin-bottom: 0.4em} h1,h2,h3,h4,h5,h6{font-family: Arial,Helvetica,sans-serif} ' + auto_cleanup = True - conversion_options = { - 'comment' : description - , 'tags' : category - , 'publisher' : publisher - , 'language' : language - } - - keep_only_tags = [dict(attrs={'id':['art-mast','art-body','auth-bio']})] - remove_tags = [dict(name='iframe'),dict(attrs={'id':['share-box','base-ad']})] - remove_attributes = ['height','width'] - - - feeds = [(u'Articles', u'http://www.foreignpolicy.com/node/feed')] + feeds = [(u'Foreign_Policy', u'http://www.foreignpolicy.com/node/feed')] def print_version(self, url): - return url + '?print=yes&page=full' + return url + '?print=yes&hidecomments=yes&page=full' - def preprocess_html(self, soup): - for item in soup.findAll(style=True): - del item['style'] - return soup