From d27fc5a06e94df4736b0cfed24e7c3d8541656c6 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 29 Sep 2011 09:58:39 -0600 Subject: [PATCH] Fix American Spectator --- recipes/amspec.recipe | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/recipes/amspec.recipe b/recipes/amspec.recipe index e5a76a4f86..684b28cf5c 100644 --- a/recipes/amspec.recipe +++ b/recipes/amspec.recipe @@ -18,25 +18,16 @@ class TheAmericanSpectator(BasicNewsRecipe): use_embedded_content = False language = 'en' INDEX = 'http://spectator.org' - - conversion_options = { + auto_cleanup = True + encoding = 'utf-8' + + conversion_options = { 'comments' : description ,'tags' : category ,'language' : language ,'publisher' : publisher } - keep_only_tags = [ - dict(name='div', attrs={'class':'post inner'}) - ,dict(name='div', attrs={'class':'author-bio'}) - ] - - remove_tags = [ - dict(name='object') - ,dict(name='div', attrs={'class':['col3','post-options','social']}) - ,dict(name='p' , attrs={'class':['letter-editor','meta']}) - ] - feeds = [ (u'Articles', u'http://feeds.feedburner.com/amspecarticles')] def get_cover_url(self): @@ -48,10 +39,10 @@ class TheAmericanSpectator(BasicNewsRecipe): link_item2 = soup2.find('div',attrs={'class':'post inner issues'}) cover_url = self.INDEX + link_item2.img['src'] return cover_url - + def print_version(self, url): return url + '/print' - + def get_article_url(self, article): return article.get('guid', None) - +