mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Update Consumerist
This commit is contained in:
parent
596f58bbcd
commit
eb0eb79801
@ -17,6 +17,8 @@ class Consumerist(BasicNewsRecipe):
|
|||||||
no_stylesheets = True
|
no_stylesheets = True
|
||||||
encoding = 'utf-8'
|
encoding = 'utf-8'
|
||||||
use_embedded_content = False
|
use_embedded_content = False
|
||||||
|
auto_cleanup = True
|
||||||
|
auto_cleanup_keep = '//div[@class="wp-caption alignleft"]'
|
||||||
language = 'en'
|
language = 'en'
|
||||||
masthead_url = 'http://consumerist.com/css/images/footer_man.gif'
|
masthead_url = 'http://consumerist.com/css/images/footer_man.gif'
|
||||||
extra_css = '''
|
extra_css = '''
|
||||||
@ -32,22 +34,5 @@ class Consumerist(BasicNewsRecipe):
|
|||||||
, 'language' : language
|
, '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')]
|
feeds = [(u'Articles', u'http://consumerist.com/index.xml')]
|
||||||
|
|
||||||
def preprocess_html(self, soup):
|
|
||||||
return self.adeify_images(soup)
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user