From 87b166c9340365c4c3129edaa27f749a6fab430c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20D=C5=82ugosz?= Date: Sun, 18 Nov 2012 18:51:39 +0100 Subject: [PATCH] f1 ultra --- recipes/f1_ultra.recipe | 35 +++++++++++++++++++++++++++++++++++ recipes/icons/f1_ultra.png | Bin 0 -> 490 bytes 2 files changed, 35 insertions(+) create mode 100644 recipes/f1_ultra.recipe create mode 100644 recipes/icons/f1_ultra.png diff --git a/recipes/f1_ultra.recipe b/recipes/f1_ultra.recipe new file mode 100644 index 0000000000..ada82542fc --- /dev/null +++ b/recipes/f1_ultra.recipe @@ -0,0 +1,35 @@ +from calibre.web.feeds.news import BasicNewsRecipe +import re + +class f1ultra(BasicNewsRecipe): + title = u'Formuła 1 - F1 ultra' + __license__ = 'GPL v3' + __author__ = 'MrStefan , Artur Stachecki ' + language = 'pl' + description =u'Formuła 1, Robert Kubica, F3, GP2 oraz inne serie wyścigowe.' + masthead_url='http://www.f1ultra.pl/templates/f1ultra/images/logo.gif' + remove_empty_feeds= True + oldest_article = 1 + max_articles_per_feed = 100 + remove_javascript=True + no_stylesheets=True + + keep_only_tags =[(dict(name = 'div', attrs = {'id' : 'main'}))] + remove_tags_after =[dict(attrs = {'style' : 'margin-top:5px;margin-bottom:5px;display: inline;'})] + remove_tags =[(dict(attrs = {'class' : ['buttonheading', 'avPlayerContainer', 'createdate']}))] + remove_tags.append(dict(attrs = {'title' : ['PDF', 'Drukuj', 'Email']})) + remove_tags.append(dict(name = 'form', attrs = {'method' : 'post'})) + remove_tags.append(dict(name = 'hr', attrs = {'size' : '2'})) + + preprocess_regexps = [(re.compile(r'align="left"'), lambda match: ''), + (re.compile(r'align="right"'), lambda match: ''), + (re.compile(r'width=\"*\"'), lambda match: ''), + (re.compile(r'\'), lambda match: '')] + + + extra_css = '''.contentheading { font-size: 1.4em; font-weight: bold; } + img { display: block; clear: both;} + ''' + remove_attributes = ['width','height','position','float','padding-left','padding-right','padding','text-align'] + + feeds = [(u'F1 Ultra', u'http://www.f1ultra.pl/index.php?option=com_rd_rss&id=1&Itemid=245')] diff --git a/recipes/icons/f1_ultra.png b/recipes/icons/f1_ultra.png new file mode 100644 index 0000000000000000000000000000000000000000..f45a94f53adf1189058039c877c0735420896e5f GIT binary patch literal 490 zcmV8|3!g$Vuv>%y+2U5YC| zA`@DiXqjoac-n6931U&*nNUrJ}D%ss^pm9PV<3 z)XpbbN|96z>a`k)=!bufk4PULa9*v(3h0K#V&xs4eE~OIH!KQEi}3=T(G3d#TWT~* zQ(&5;BYe1Aju*HzO@7vD;o-T}6$YQb0HE*51lq?B)NeSzgM1ztJh+bIXHO18XiJUU zt0nrUXGQzeY^jlcHreh#`~3?|HSk;)fU$obV!R;k;sD;@P`kk2W|LH8oZ{n$ zTrIrx0o>(EjO&KQKg1<}ce%jI@~PJzJ&=C`+ayT5m<;9xtkH3ougsWI~U4T(%f1Q$d(T(33k;Og`{ zN!1A9K(QDezK_dJfx2OZg2K*va2W`UCJ+>)7ncCJrt11dqv^$k>o|UWro`^q^^A4b g<-Oy?1oq