mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #7252 (New recipe for The Economic Collapse blog)
This commit is contained in:
parent
0559826083
commit
2a2f1fd988
BIN
resources/images/news/theecocolapse.png
Normal file
BIN
resources/images/news/theecocolapse.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
46
resources/recipes/theecocolapse.recipe
Normal file
46
resources/recipes/theecocolapse.recipe
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
__license__ = 'GPL v3'
|
||||||
|
__copyright__ = '2010, Darko Miletic <darko.miletic at gmail.com>'
|
||||||
|
'''
|
||||||
|
theeconomiccollapseblog.com
|
||||||
|
'''
|
||||||
|
|
||||||
|
from calibre.web.feeds.news import BasicNewsRecipe
|
||||||
|
class TheEconomicCollapse(BasicNewsRecipe):
|
||||||
|
title = 'The Economic Collapse'
|
||||||
|
__author__ = 'Darko Miletic'
|
||||||
|
description = 'Are You Prepared For The Coming Economic Collapse And The Next Great Depression?'
|
||||||
|
publisher = 'The Economic Collapse'
|
||||||
|
category = 'news, politics, USA, economy'
|
||||||
|
oldest_article = 2
|
||||||
|
max_articles_per_feed = 200
|
||||||
|
no_stylesheets = True
|
||||||
|
encoding = 'utf8'
|
||||||
|
use_embedded_content = False
|
||||||
|
language = 'en'
|
||||||
|
remove_empty_feeds = True
|
||||||
|
extra_css = """
|
||||||
|
body{font-family: Tahoma,Arial,sans-serif }
|
||||||
|
img{margin-bottom: 0.4em}
|
||||||
|
"""
|
||||||
|
|
||||||
|
conversion_options = {
|
||||||
|
'comment' : description
|
||||||
|
, 'tags' : category
|
||||||
|
, 'publisher' : publisher
|
||||||
|
, 'language' : language
|
||||||
|
}
|
||||||
|
|
||||||
|
remove_tags = [
|
||||||
|
dict(attrs={'class':'sociable'})
|
||||||
|
,dict(name=['iframe','object','embed','meta','link','base'])
|
||||||
|
]
|
||||||
|
remove_attributes=['lang','onclick','width','height']
|
||||||
|
keep_only_tags=[dict(attrs={'class':['post-headline','post-bodycopy clearfix','']})]
|
||||||
|
|
||||||
|
feeds = [(u'Posts', u'http://theeconomiccollapseblog.com/feed')]
|
||||||
|
|
||||||
|
def preprocess_html(self, soup):
|
||||||
|
for item in soup.findAll(style=True):
|
||||||
|
del item['style']
|
||||||
|
return self.adeify_images(soup)
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user