mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
f1 ultra
This commit is contained in:
parent
fc2023911f
commit
87b166c934
35
recipes/f1_ultra.recipe
Normal file
35
recipes/f1_ultra.recipe
Normal file
@ -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 <mrstefaan@gmail.com>, Artur Stachecki <artur.stachecki@gmail.com>'
|
||||||
|
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'\<table .*?\>'), 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')]
|
BIN
recipes/icons/f1_ultra.png
Normal file
BIN
recipes/icons/f1_ultra.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 490 B |
Loading…
x
Reference in New Issue
Block a user