diff --git a/recipes/spiegel_int.recipe b/recipes/spiegel_int.recipe index 2950c37556..8e07274732 100644 --- a/recipes/spiegel_int.recipe +++ b/recipes/spiegel_int.recipe @@ -1,3 +1,4 @@ + __license__ = 'GPL v3' __copyright__ = '2008-2011, Darko Miletic ' ''' @@ -15,6 +16,8 @@ class Spiegel_int(BasicNewsRecipe): language = 'en_DE' no_stylesheets = True use_embedded_content = False + auto_cleanup = True + auto_cleanup_keep = '//*[@id="spArticleTopAsset"]' encoding = 'cp1252' publisher = 'SPIEGEL ONLINE GmbH' category = 'news, politics, Germany' @@ -43,25 +46,25 @@ class Spiegel_int(BasicNewsRecipe): .spPhotoGallery{font-size:x-small; color:#990000 ;} ''' - keep_only_tags = [dict(attrs={'id':'spArticleContent'})] - remove_tags_after = dict(attrs={'id':'spArticleBody'}) - remove_tags = [dict(name=['meta','base','iframe','embed','object'])] - remove_attributes = ['clear'] + #keep_only_tags = [dict(attrs={'id':'spArticleContent'})] + #remove_tags_after = dict(attrs={'id':'spArticleBody'}) + #remove_tags = [dict(name=['meta','base','iframe','embed','object'])] + #remove_attributes = ['clear'] feeds = [(u'Spiegel Online', u'http://www.spiegel.de/international/index.rss')] - def print_version(self, url): - main, sep, rest = url.rpartition(',') - rmain, rsep, rrest = main.rpartition(',') - return rmain + ',druck-' + rrest + ',' + rest + #def print_version(self, url): + #main, sep, rest = url.rpartition(',') + #rmain, rsep, rrest = main.rpartition(',') + #return rmain + ',druck-' + rrest + ',' + rest - def preprocess_html(self, soup): - for item in soup.findAll(style=True): - del item['style'] - for item in soup.findAll('a'): - if item.string is not None: - str = item.string - item.replaceWith(str) - else: - str = self.tag_to_string(item) - item.replaceWith(str) - return soup + #def preprocess_html(self, soup): + #for item in soup.findAll(style=True): + #del item['style'] + #for item in soup.findAll('a'): + #if item.string is not None: + #str = item.string + #item.replaceWith(str) + #else: + #str = self.tag_to_string(item) + #item.replaceWith(str) + #return soup