From b4d4133c6d2cd2ec1cf3496e8a885b74f049ecad Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 30 Sep 2012 09:03:56 +0530 Subject: [PATCH] Fix #1058840 (Updated recipe for Twitch films) --- recipes/twitchfilms.recipe | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/recipes/twitchfilms.recipe b/recipes/twitchfilms.recipe index 1ecfed172d..423dead311 100644 --- a/recipes/twitchfilms.recipe +++ b/recipes/twitchfilms.recipe @@ -1,5 +1,5 @@ __license__ = 'GPL v3' -__copyright__ = '2009-2011, Darko Miletic ' +__copyright__ = '2009-2012, Darko Miletic ' ''' twitchfilm.net/news/ ''' @@ -13,10 +13,8 @@ class Twitchfilm(BasicNewsRecipe): max_articles_per_feed = 100 no_stylesheets = True use_embedded_content = False - auto_cleanup = True encoding = 'utf-8' publisher = 'Twitch' - masthead_url = 'http://twitchfilm.com/img/logo.png' category = 'twitch, twitchfilm, movie news, movie reviews, cult cinema, independent cinema, anime, foreign cinema, geek talk' language = 'en' @@ -27,18 +25,18 @@ class Twitchfilm(BasicNewsRecipe): , 'language' : language } - #keep_only_tags=[dict(attrs={'class':'asset-header'})] - #remove_tags_after=dict(attrs={'class':'asset-body'}) - #remove_tags = [ dict(name='div', attrs={'class':['social','categories']}) - #, dict(attrs={'id':'main-asset'}) - #, dict(name=['meta','link','iframe','embed','object']) - #] + keep_only_tags=[dict(attrs={'class':'entry'})] + remove_tags_after=dict(attrs={'class':'text'}) + remove_tags = [ dict(name='div', attrs={'class':['social','categories']}) + , dict(attrs={'id':'main-asset'}) + , dict(name=['meta','link','iframe','embed','object']) + ] feeds = [(u'News', u'http://feeds.twitchfilm.net/TwitchEverything')] def preprocess_html(self, soup): for item in soup.findAll(style=True): - del item['style'] + del item['style'] for item in soup.findAll('a'): limg = item.find('img') if item.string is not None: