From ddb593a81476242e942e543ac96c5a8170a9f367 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 31 Jan 2010 09:15:54 -0700 Subject: [PATCH] Slovo by Abelturd --- resources/recipes/slovo.recipe | 41 ++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 resources/recipes/slovo.recipe diff --git a/resources/recipes/slovo.recipe b/resources/recipes/slovo.recipe new file mode 100644 index 0000000000..88babdb7b6 --- /dev/null +++ b/resources/recipes/slovo.recipe @@ -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'', 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))