mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Slovo by Abelturd
This commit is contained in:
parent
29bafdd8f0
commit
ddb593a814
41
resources/recipes/slovo.recipe
Normal file
41
resources/recipes/slovo.recipe
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
from calibre.web.feeds.news import BasicNewsRecipe
|
||||||
|
import re
|
||||||
|
|
||||||
|
class SlovoRecipe(BasicNewsRecipe):
|
||||||
|
__license__ = 'GPL v3'
|
||||||
|
__author__ = 'Abelturd'
|
||||||
|
language = 'sk'
|
||||||
|
version = 1
|
||||||
|
|
||||||
|
title = u'SLOVO'
|
||||||
|
publisher = u''
|
||||||
|
category = u'News, Newspaper'
|
||||||
|
description = u'Politicko-spolo\u010densk\xfd t\xfd\u017edenn\xedk'
|
||||||
|
encoding = 'Windows-1250'
|
||||||
|
|
||||||
|
oldest_article = 1
|
||||||
|
max_articles_per_feed = 100
|
||||||
|
use_embedded_content = False
|
||||||
|
remove_empty_feeds = True
|
||||||
|
|
||||||
|
no_stylesheets = True
|
||||||
|
remove_javascript = True
|
||||||
|
|
||||||
|
|
||||||
|
feeds = []
|
||||||
|
feeds.append((u'V\u0161etky \u010dl\xe1nky', u'http://www.noveslovo.sk/rss.asp'))
|
||||||
|
|
||||||
|
keep_only_tags = []
|
||||||
|
remove_tags = []
|
||||||
|
|
||||||
|
preprocess_regexps = [
|
||||||
|
(re.compile(r'<img src="gif/image1.gif">', re.DOTALL|re.IGNORECASE),
|
||||||
|
lambda match: ''),
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
def print_version(self, url):
|
||||||
|
m = re.search('(?<=id=)[0-9]*', url)
|
||||||
|
|
||||||
|
|
||||||
|
return u'http://www.noveslovo.sk/clanoktlac.asp?id=' + str(m.group(0))
|
Loading…
x
Reference in New Issue
Block a user