From 86530031b1d254b0b470415b633288cb126cf192 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 27 Apr 2011 09:04:25 -0600 Subject: [PATCH] Social Diva by Soilviu Cotoara --- recipes/icons/socialdiva.png | Bin 0 -> 1071 bytes recipes/socialdiva.recipe | 54 +++++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 recipes/icons/socialdiva.png create mode 100644 recipes/socialdiva.recipe diff --git a/recipes/icons/socialdiva.png b/recipes/icons/socialdiva.png new file mode 100644 index 0000000000000000000000000000000000000000..262a94432d8aa1ed6e0df34e05bd4967650d3add GIT binary patch literal 1071 zcmV+~1kn45P)+q_s{IChvy~Ddc!u^{VtPl=9_oE=Xsy^`QCAW zI=e8E@hAW{Cf)Ic9n>3;JW2z0$glVK#ntG{E>QAS80jQRxrM9GN-)-{n9LxEclyWv7 z2zk{I9gM0PQl1=duCNL~HjxBi?DViARmDiIBW|Ik5yug8m zc5w}Wxq0pIa5x6QUfbKMudNmyECTS#>(2r3#<>>&@XI9t+(ZHZC$PxIM6IT)>q+&I zn6y;3Q?&UE%v6NDv!+um>!{9uGw)vr3Bf1tzYW0gr-V4Zs+>m>23b;K%hhu)>@{2? zQ6Y{-RTcLZ3P39`;FtprCE5VUx?-Z_R{`iwNd04jqX7J|{u2P{^}7HB_k`I0HLv&D z6)$z757^FqU_=#`bXI)&(FD)}3^-{wTnBh9rJk)TA~oMN4FrMe{&c1TfNx#-!};+c z07g2x6{ufc@Ac~aa7Io!KQ#@&FV|)O`10~q0G6iz1X_Rr&l(s4%T=4@{GlNa1zPdL zid1{K_zwV6pDC9UAG`^`k*8At)ErgK-?xQ)qa>fn9MgZol}qXsE560wZA4Exyr}hn zced1_3|ciL&B=Z&$tU{lRLpK_ecV&EB&{P_S(H;2*MvA~XGd4hApkDC^Em+JYGa4h zddOrZ3p1px5fcTXEYD&Psr_52Q-`4`de3T0x+{E zh7WbAYU=eC(SYMv0~|3eJnjLr)&X@|4|u&S1V?(*@86pI7=UZn^_Tn2q#W|Q$s53S pe^B$KrG@2!&E>FV>oc0pz`utgI)|LX4L|?@002ovPDHLkV1hk5{W$;t literal 0 HcmV?d00001 diff --git a/recipes/socialdiva.recipe b/recipes/socialdiva.recipe new file mode 100644 index 0000000000..1befd03d4a --- /dev/null +++ b/recipes/socialdiva.recipe @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +#!/usr/bin/env python + +__license__ = 'GPL v3' +__copyright__ = u'2011' +''' +socialdiva.ro +''' + +from calibre.web.feeds.news import BasicNewsRecipe + +class SocialDiva(BasicNewsRecipe): + title = u'Social Diva' + __author__ = u'Silviu Cotoara' + description = u'When in doubt, wear red' + publisher = 'Social Diva' + oldest_article = 5 + language = 'ro' + max_articles_per_feed = 100 + no_stylesheets = True + use_embedded_content = False + category = 'Ziare,Reviste,Femei' + encoding = 'utf-8' + cover_url = 'http://www.socialdiva.ro/images/logo.png' + + conversion_options = { + 'comments' : description + ,'tags' : category + ,'language' : language + ,'publisher' : publisher + } + + keep_only_tags = [ + dict(name='div', attrs={'class':'col-alpha mt5 content_articol'}), + dict(name='div', attrs={'class':'mt5'}) + ] + + remove_tags = [ + dict(name='a', attrs={'class':['comments float-left scroll mt5']}), + dict(name='a', attrs={'class':['comments float-left scroll']}), + dict(name='div', attrs={'class':['rating-container relative float-left']}), + dict(name='div', attrs={'class':['float-right social_articol']}) + ] + + remove_tags_after = [ + dict(name='a', attrs={'class':['comments float-left scroll mt5']}) + ] + + feeds = [ + (u'Feeds', u'http://www.socialdiva.ro/rss.html') + ] + + def preprocess_html(self, soup): + return self.adeify_images(soup)