mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Update Consumerist again
This commit is contained in:
parent
cf7412fc0a
commit
5f3267d3eb
@ -1,3 +1,5 @@
|
|||||||
|
## Last Edit: 2013-08-23
|
||||||
|
## From: Armin Geller
|
||||||
__license__ = 'GPL v3'
|
__license__ = 'GPL v3'
|
||||||
__copyright__ = '2010, NA'
|
__copyright__ = '2010, NA'
|
||||||
'''
|
'''
|
||||||
@ -17,10 +19,9 @@ 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://consumermediallc.files.wordpress.com/2013/02/consumerist.png'# AGe 2013-08-23
|
||||||
|
|
||||||
extra_css = '''
|
extra_css = '''
|
||||||
body{font-family: "Lucida Grande",Helvetica,Arial,sans-serif}
|
body{font-family: "Lucida Grande",Helvetica,Arial,sans-serif}
|
||||||
img{margin-bottom: 1em}
|
img{margin-bottom: 1em}
|
||||||
@ -28,11 +29,24 @@ class Consumerist(BasicNewsRecipe):
|
|||||||
h2{font-family :Arial,Helvetica,sans-serif; font-size:large}
|
h2{font-family :Arial,Helvetica,sans-serif; font-size:large}
|
||||||
'''
|
'''
|
||||||
conversion_options = {
|
conversion_options = {
|
||||||
'comment' : description
|
'comment' : description,
|
||||||
, 'tags' : category
|
'tags' : category,
|
||||||
, 'publisher' : publisher
|
'publisher' : publisher,
|
||||||
, 'language' : language
|
'language' : language,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
remove_attributes = ['width','height']
|
||||||
|
|
||||||
|
keep_only_tags = dict(name='div', attrs={'class':['hfeed',]}) # AGe 2013-08-23
|
||||||
|
|
||||||
|
remove_tags = [dict(name='div', attrs={'class':['navigation', # AGe 2013-08-23
|
||||||
|
'wpcom-related-posts widget widget_related_posts', # AGe 2013-08-23
|
||||||
|
'sharedaddy sd-like-enabled sd-sharing-enabled',]}), # AGe 2013-08-23
|
||||||
|
dict(name='div', attrs={'id':['comments',]}), # AGe 2013-08-23
|
||||||
|
]
|
||||||
|
|
||||||
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