From 1b637e7f15e6220d3d3ad4ff5a283e518758e954 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20D=C5=82ugosz?= Date: Sun, 18 Nov 2012 18:52:19 +0100 Subject: [PATCH] myapple --- recipes/icons/myapple_pl.png | Bin 0 -> 1176 bytes recipes/myapple_pl.recipe | 50 +++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 recipes/icons/myapple_pl.png create mode 100644 recipes/myapple_pl.recipe diff --git a/recipes/icons/myapple_pl.png b/recipes/icons/myapple_pl.png new file mode 100644 index 0000000000000000000000000000000000000000..a68cf4e7efc3c395730cf255545eb990e9899993 GIT binary patch literal 1176 zcma))YfO_@7{?DH5$Ri6CeQ|uAp}^4Y;EPXru0T{FO*s;g`yCy1qv1zb~1=^al@b{ z(*-t3#JKeeEw`6a!E(P8Au1s1bdyChV73k06!@?i27B2)ZJ&0M=lst9g@o0LIS{<0|2!Z076BZHH8Miz5`-mDi=+-v2^i^yNayNh&&`l zHOQ8A9gXYt0uE3$mdd_?&ycZ^7iv{c-0tq~q;sUi9RGUmVTm;%r{@FZfZ*dnfk5Y{ zuyC?FKfGcqPVNZ)da*Xk607Wusk7w?G=XJ9aM=K?7~nK7)tsBiJZlwCIR_ru=emBp znc4Mz&8Y0Nse)^>CB;b8sV<7Fmz3B+Wa)4cQ%I4S)_6O*dMr(7Jj~YMlMKYn9tvzE z!X5q$EhIJtr*wv;bwxDTa@cB*crC=&5em$-`mvMw{nXMy!QA?UK<~@^7UCHQsm9Qa zjo+GVCH!_`dQW84on*d&02>43{q*HGGfFF;r}sHGeX7h%MT_$czS8dSsv)VcBT#G# zY8=lM>fdE(arynUsWl6;4VR$vDe8&se0=qUDV*C*%<79}-NdogUd8=%r{$HS;#>0UJj0}@nUIk3=KA^Js?5vP1j)Adc43$p*;oy5fz6vM0aE+6V|x!iRx0sPeonm$ z51SmRJRC;6o{@h1#rWcEtJ|bJnjC%XR-B@*G1R|xVLn$LZ=3n9%sAp2-n3x*#UAzG zd)pJGb?5-@+QPk8j_9f9cb_iQ@qjBs%nTwGmsB+66hFKF+WkmSb{wT7O$FT&oL*l4 zeSgX~^|HLBwpH&pkNfY;JKkZA7Vv%^?mXSmw)_WXV?)=lkK)#dxpFxv@t*Hj>9ZHs zTTGe5TBEhl(f0$jx>w`vyuOf)R7w-_n}esHBt9@bJ*rSBOVcmDP1I@3rXfSR&#$GH z(Vc@%$Q^)|X4=b#J*E)!wV^7mOjVGpl2h|5A-IO?&Oe+=EshCb8)V6KSM&Ca>-7Y2LPCjbBd literal 0 HcmV?d00001 diff --git a/recipes/myapple_pl.recipe b/recipes/myapple_pl.recipe new file mode 100644 index 0000000000..eee333012c --- /dev/null +++ b/recipes/myapple_pl.recipe @@ -0,0 +1,50 @@ +import re + +from calibre.web.feeds.news import BasicNewsRecipe + +class MyAppleRecipe(BasicNewsRecipe): + __license__ = 'GPL v3' + __author__ = u'Artur Stachecki ' + language = 'pl' + version = 1 + + title = u'MyApple.pl' + category = u'News' + description = u' Największy w Polsce serwis zajmujący się tematyką związaną z Apple i wszelkimi produktami tej firmy.' + cover_url='' + remove_empty_feeds= True + no_stylesheets=True + oldest_article = 7 + max_articles_per_feed = 100000 + recursions = 0 + + no_stylesheets = True + remove_javascript = True + simultaneous_downloads = 3 + + keep_only_tags =[] + keep_only_tags.append(dict(name = 'div', attrs = {'id' : 'article_content'})) + + remove_tags =[] + remove_tags.append(dict(name = 'div', attrs = {'class' : 'article_author_date_comment_container'})) + remove_tags.append(dict(name = 'div', attrs = {'class' : 'fullwidth'})) + remove_tags.append(dict(name = 'div', attrs = {'class' : 'cmslinks'})) + remove_tags.append(dict(name = 'div', attrs = {'class' : 'googleads-468'})) + remove_tags.append(dict(name = 'div', attrs = {'id' : 'comments'})) + + + extra_css = ''' + body {font-family: verdana, arial, helvetica, geneva, sans-serif ;} + td.contentheading{font-size: large; font-weight: bold;} + ''' + + feeds = [ + ('News', 'feed://myapple.pl/external.php?do=rss&type=newcontent§ionid=1&days=120&count=10'), + ] + + def preprocess_html(self, soup): + for alink in soup.findAll('a'): + if alink.string is not None: + tstr = alink.string + alink.replaceWith(tstr) + return soup \ No newline at end of file