From 2a3fd745c1b1ffbec1beff4c5604ec3facc86722 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 30 Apr 2011 10:07:23 -0600 Subject: [PATCH] Fix Jezebel and Kotaku. Fixes #773782 (jezebel and kotaku not pulling in article text) --- recipes/jezebel.recipe | 13 ++++++------- recipes/kotaku.recipe | 13 ++++++------- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/recipes/jezebel.recipe b/recipes/jezebel.recipe index e8a983c261..7cadfcad35 100644 --- a/recipes/jezebel.recipe +++ b/recipes/jezebel.recipe @@ -16,7 +16,7 @@ class Jezebel(BasicNewsRecipe): max_articles_per_feed = 100 no_stylesheets = True encoding = 'utf-8' - use_embedded_content = False + use_embedded_content = True language = 'en' masthead_url = 'http://cache.gawkerassets.com/assets/jezebel.com/img/logo.png' extra_css = ''' @@ -32,13 +32,12 @@ class Jezebel(BasicNewsRecipe): , 'language' : language } - remove_attributes = ['width','height'] - keep_only_tags = [dict(attrs={'class':'content permalink'})] - remove_tags_before = dict(name='h1') - remove_tags = [dict(attrs={'class':'contactinfo'})] - remove_tags_after = dict(attrs={'class':'contactinfo'}) + feeds = [(u'Articles', u'http://feeds.gawker.com/jezebel/vip?format=xml')] + + remove_tags = [ + {'class': 'feedflare'}, + ] - feeds = [(u'Articles', u'http://feeds.gawker.com/jezebel/full')] def preprocess_html(self, soup): return self.adeify_images(soup) diff --git a/recipes/kotaku.recipe b/recipes/kotaku.recipe index 87f1ab6578..47f7656c23 100644 --- a/recipes/kotaku.recipe +++ b/recipes/kotaku.recipe @@ -16,7 +16,7 @@ class Kotaku(BasicNewsRecipe): max_articles_per_feed = 100 no_stylesheets = True encoding = 'utf-8' - use_embedded_content = False + use_embedded_content = True language = 'en' masthead_url = 'http://cache.gawkerassets.com/assets/kotaku.com/img/logo.png' extra_css = ''' @@ -31,13 +31,12 @@ class Kotaku(BasicNewsRecipe): , 'language' : language } - remove_attributes = ['width','height'] - keep_only_tags = [dict(attrs={'class':'content permalink'})] - remove_tags_before = dict(name='h1') - remove_tags = [dict(attrs={'class':'contactinfo'})] - remove_tags_after = dict(attrs={'class':'contactinfo'}) + feeds = [(u'Articles', u'http://feeds.gawker.com/kotaku/vip?format=xml')] + + remove_tags = [ + {'class': 'feedflare'}, + ] - feeds = [(u'Articles', u'http://feeds.gawker.com/kotaku/full')] def preprocess_html(self, soup): return self.adeify_images(soup)