From 2a2f1fd988e6e35ef4c71d5b9c2343c1c0570ba7 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 21 Oct 2010 07:56:16 -0700 Subject: [PATCH] Fix #7252 (New recipe for The Economic Collapse blog) --- resources/images/news/theecocolapse.png | Bin 0 -> 1264 bytes resources/recipes/theecocolapse.recipe | 46 ++++++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 resources/images/news/theecocolapse.png create mode 100644 resources/recipes/theecocolapse.recipe diff --git a/resources/images/news/theecocolapse.png b/resources/images/news/theecocolapse.png new file mode 100644 index 0000000000000000000000000000000000000000..1c45ec14bf41c20c9a86311f4af9ccd47de799df GIT binary patch literal 1264 zcmeAS@N?(olHy`uVBq!ia0vp^0w65F1|AWFkDz^H9*yf;%kG#rN>m48Y1xyIaN$&n8)EXe}nRBoyVD>IS z-#0E7udq$NamUy=eV^+KH%`xcPal5RbAIN}x!)5mr1bXgt$JF-%Ohi%WF%|!zx&R;|JQGI^}YApDl0ZK{r-0G%fG*Q+fTX#rfrV9f6p&ajN4bS?jC#klu<6-#|8AM~r)OlO zJ^Pf}w(|JVSGhY%vkMC=DoVC2f4={JRrP$kP%TcUwfAy44t(Ya)nYJ`>^q&purp@q zr1Q)vo1Ye$ac|fp)UU5!z4!9v=4So4JG;M|&tIW_;cBYUT#JVvS6nT!bY&FbS`?wd za3tyFm+kp7)4fEySBe~$DhUC z86ByfK?^TrWJnz^_m9wc^M;}3#{>@-rMq|S?mu{Ndiu*ae9gttq|&K${No;tFf9fSPa!7;t1@O3^UH^>Z(n?8@HPOWB%ilC%MHXo?TE}{PDrTgbQhl zGiUcEvN#H`Fgh%sJ^y+ZJKMHxlTN;U+sf)WNyYP##p? zyz*Y2y64V0Dw(sEg=(!8YfxEz-DtAr^vjtITerF-)dE4XvQ)22-o2Q(eZ|l3?six( z&Ec}5jLe+5rB;U@&Xb${_R31*^s@U+SFg(3hlShM&6&5aBr|Q<>eYd9cLV>F|NS-9 zCok8wUamXv%5?p^cR7HbW&HDJ=hmqndnzyMysx+8IJeT=>Ei}qiJ@BJ8c~vxSdwa$ zT$Bo=7>o=I4RnFX$S}mf+{)C%%Fsd=$S^Rt;`i$jiiX_$l+3hB6b+VECWclfW)KYt Sz52mG4Gf;HelF{r5}E+n8aB)T literal 0 HcmV?d00001 diff --git a/resources/recipes/theecocolapse.recipe b/resources/recipes/theecocolapse.recipe new file mode 100644 index 0000000000..6743ca68b5 --- /dev/null +++ b/resources/recipes/theecocolapse.recipe @@ -0,0 +1,46 @@ +__license__ = 'GPL v3' +__copyright__ = '2010, Darko Miletic ' +''' +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) +