Fix Jezebel and Kotaku. Fixes #773782 (jezebel and kotaku not pulling in article text)

This commit is contained in:
Kovid Goyal 2011-04-30 10:07:23 -06:00
parent 78697d7967
commit 2a3fd745c1
2 changed files with 12 additions and 14 deletions

View File

@ -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)

View File

@ -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)