From baf4b1ee3e0864a262f95cda260703ffc4bd10a3 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 29 Apr 2011 08:40:15 -0600 Subject: [PATCH] Autobild.ro by Silviu Cotoara --- recipes/autobild.recipe | 55 +++++++++++++++++++++ recipes/icons/autobild.png | Bin 0 -> 614 bytes src/calibre/gui2/store/foyles_uk_plugin.py | 2 +- 3 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 recipes/autobild.recipe create mode 100644 recipes/icons/autobild.png diff --git a/recipes/autobild.recipe b/recipes/autobild.recipe new file mode 100644 index 0000000000..bc45336f46 --- /dev/null +++ b/recipes/autobild.recipe @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +#!/usr/bin/env python + +__license__ = 'GPL v3' +__copyright__ = u'2011, Silviu Cotoar\u0103' +''' +auto-bild.ro +''' + +from calibre.web.feeds.news import BasicNewsRecipe + +class AutoBild(BasicNewsRecipe): + title = u'Auto Bild' + __author__ = u'Silviu Cotoar\u0103' + description = 'Auto' + publisher = 'Auto Bild' + oldest_article = 50 + language = 'ro' + max_articles_per_feed = 100 + no_stylesheets = True + use_embedded_content = False + category = 'Ziare,Reviste,Auto' + encoding = 'utf-8' + cover_url = 'http://www.auto-bild.ro/images/autobild.gif' + + conversion_options = { + 'comments' : description + ,'tags' : category + ,'language' : language + ,'publisher' : publisher + } + + + keep_only_tags = [ + dict(name='div', attrs={'class':'box_2 articol clearfix'}) + ] + + remove_tags = [ + dict(name='div', attrs={'class':['detail']}) + , dict(name='a', attrs={'id':['zoom_link']}) + , dict(name='div', attrs={'class':['icons clearfix']}) + , dict(name='div', attrs={'class':['pub_articol clearfix']}) + + ] + + remove_tags_after = [ + dict(name='div', attrs={'class':['pub_articol clearfix']}) + ] + + feeds = [ + (u'Feeds', u'http://www.auto-bild.ro/rss/toate') + ] + + def preprocess_html(self, soup): + return self.adeify_images(soup) diff --git a/recipes/icons/autobild.png b/recipes/icons/autobild.png new file mode 100644 index 0000000000000000000000000000000000000000..ed4d2c8c4558803e264f11d7e315a782624db077 GIT binary patch literal 614 zcmV-s0-61ZP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!~g&e!~vBn4jTXf0sBcrK~y+Tm6J_R z6Hyd~pL=`z1-96ru`380g5pAd0SP4h0gWbXSSl-4>PEMlbB3~bkB!Y3+0F$>UG%PN3E7A?ui3z4vjh){q^wQYCk8tuJg@IcB>J||hzQJwkLaBpI5i?s~xu9^JJ1-3XJ$UTlMzAJHc0thj0A{lmfyqw^qF4ydq2s2-I9lBHbbLEMk0d1 z7Kzsl9okrCE5(2Rj&|t_^5`MripR#ncMcExc4FcWfs(gxq%r*%Wwp9RqFTk+e