Update Consumerist

This commit is contained in:
Kovid Goyal 2013-08-22 22:10:42 +05:30
parent 596f58bbcd
commit eb0eb79801

View File

@ -17,14 +17,16 @@ class Consumerist(BasicNewsRecipe):
no_stylesheets = True
encoding = 'utf-8'
use_embedded_content = False
auto_cleanup = True
auto_cleanup_keep = '//div[@class="wp-caption alignleft"]'
language = 'en'
masthead_url = 'http://consumerist.com/css/images/footer_man.gif'
extra_css = '''
body{font-family: "Lucida Grande",Helvetica,Arial,sans-serif}
img{margin-bottom: 1em}
h1{font-family :Arial,Helvetica,sans-serif; font-size:x-large}
h2{font-family :Arial,Helvetica,sans-serif; font-size:large}
'''
body{font-family: "Lucida Grande",Helvetica,Arial,sans-serif}
img{margin-bottom: 1em}
h1{font-family :Arial,Helvetica,sans-serif; font-size:x-large}
h2{font-family :Arial,Helvetica,sans-serif; font-size:large}
'''
conversion_options = {
'comment' : description
, 'tags' : category
@ -32,22 +34,5 @@ class Consumerist(BasicNewsRecipe):
, 'language' : language
}
remove_attributes = ['width','height']
#keep_only_tags = [dict(attrs={'class':['', 'category-breadcrumb']}),]
remove_tags_before = dict(name='h2')
remove_tags = [
#dict(name='iframe'),
dict(name='div', attrs={'class':['e-comments', 'more-about', 'entry-tags']}),
#dict(name='div', attrs={'id':['IEContainer', 'clickIncludeBox']}),
#dict(name='ul', attrs={'class':'article-tools'}),
#dict(name='ul', attrs={'class':'articleTools'}),
]
remove_tags_after = dict(attrs={'class':'e-body'})
feeds = [(u'Articles', u'http://consumerist.com/index.xml')]
def preprocess_html(self, soup):
return self.adeify_images(soup)