mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Zive.sk and iliterature.cz by Abelturd
This commit is contained in:
parent
411b796ba1
commit
3ae86efb6f
45
resources/recipes/ZIVE.sk.recipe
Normal file
45
resources/recipes/ZIVE.sk.recipe
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
from calibre.web.feeds.news import BasicNewsRecipe
|
||||||
|
import re
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class ZiveRecipe(BasicNewsRecipe):
|
||||||
|
__license__ = 'GPL v3'
|
||||||
|
__author__ = 'Abelturd'
|
||||||
|
language = 'sk'
|
||||||
|
version = 1
|
||||||
|
|
||||||
|
title = u'ZIVE.sk'
|
||||||
|
publisher = u''
|
||||||
|
category = u'News, Newspaper'
|
||||||
|
description = u'Naj\u010d\xedtanej\u0161\xed denn\xedk opo\u010d\xedta\u010doch, IT a internete. '
|
||||||
|
encoding = 'UTF-8'
|
||||||
|
|
||||||
|
oldest_article = 7
|
||||||
|
max_articles_per_feed = 100
|
||||||
|
use_embedded_content = False
|
||||||
|
remove_empty_feeds = True
|
||||||
|
|
||||||
|
no_stylesheets = True
|
||||||
|
remove_javascript = True
|
||||||
|
cover_url = 'http://www.zive.sk/Client.Images/Logos/logo-zive-sk.gif'
|
||||||
|
|
||||||
|
feeds = []
|
||||||
|
feeds.append((u'V\u0161etky \u010dl\xe1nky', u'http://www.zive.sk/rss/sc-47/default.aspx'))
|
||||||
|
|
||||||
|
preprocess_regexps = [
|
||||||
|
(re.compile(r'<p><p><strong>Pokra.*ie</strong></p>', re.DOTALL|re.IGNORECASE),
|
||||||
|
lambda match: ''),
|
||||||
|
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
remove_tags = []
|
||||||
|
|
||||||
|
keep_only_tags = [dict(name='h1'), dict(name='span', attrs={'class':'arlist-data-info-author'}), dict(name='div', attrs={'class':'bbtext font-resizer-area'}),]
|
||||||
|
extra_css = '''
|
||||||
|
h1 {font-size:140%;font-family:georgia,serif; font-weight:bold}
|
||||||
|
h3 {font-size:115%;font-family:georgia,serif; font-weight:bold}
|
||||||
|
'''
|
||||||
|
|
||||||
|
|
47
resources/recipes/iliteratura_cz.recipe
Normal file
47
resources/recipes/iliteratura_cz.recipe
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
from calibre.web.feeds.news import BasicNewsRecipe
|
||||||
|
import re
|
||||||
|
|
||||||
|
class SmeRecipe(BasicNewsRecipe):
|
||||||
|
__license__ = 'GPL v3'
|
||||||
|
__author__ = 'Abelturd'
|
||||||
|
language = 'cz'
|
||||||
|
version = 1
|
||||||
|
|
||||||
|
title = u'iLiteratura.cz'
|
||||||
|
publisher = u''
|
||||||
|
category = u'News, Newspaper'
|
||||||
|
description = u'O LITERATU\u0158E V CEL\xc9M SV\u011aT\u011a A DOMA'
|
||||||
|
cover_url = 'http://www.iliteratura.cz/1_vzhled/1/iliteratura.gif'
|
||||||
|
|
||||||
|
oldest_article = 7
|
||||||
|
max_articles_per_feed = 100
|
||||||
|
use_embedded_content = False
|
||||||
|
remove_empty_feeds = True
|
||||||
|
|
||||||
|
no_stylesheets = True
|
||||||
|
remove_javascript = True
|
||||||
|
|
||||||
|
|
||||||
|
feeds = []
|
||||||
|
feeds.append((u'\u010cl\xe1nky', u'http://www.iliteratura.cz/rss.asp'))
|
||||||
|
|
||||||
|
|
||||||
|
keep_only_tags = []
|
||||||
|
|
||||||
|
remove_tags = [dict(name='table'),dict(name='h3')]
|
||||||
|
|
||||||
|
|
||||||
|
preprocess_regexps = [
|
||||||
|
(re.compile(r'<h3>Souvisej.*</body>', re.DOTALL|re.IGNORECASE),
|
||||||
|
lambda match: ''),
|
||||||
|
]
|
||||||
|
|
||||||
|
def print_version(self, url):
|
||||||
|
m = re.search('(?<=ID=)[0-9]*', url)
|
||||||
|
|
||||||
|
return u'http://www.iliteratura.cz/clanek.asp?polozkaID=' + str(m.group(0)) + '&c=tisk'
|
||||||
|
|
||||||
|
extra_css = '''
|
||||||
|
h1 {font-size:140%;font-family:georgia,serif; font-weight:bold}
|
||||||
|
h3 {font-size:115%;font-family:georgia,serif; font-weight:bold}
|
||||||
|
'''
|
Loading…
x
Reference in New Issue
Block a user