From 022ea017d770d4a29b6133a1c413a109cabaa3bf Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 12 Oct 2010 22:55:13 -0600 Subject: [PATCH] frazpc.pl by Tomasz Dlugosz --- resources/recipes/frazpc.recipe | 35 +++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 resources/recipes/frazpc.recipe diff --git a/resources/recipes/frazpc.recipe b/resources/recipes/frazpc.recipe new file mode 100644 index 0000000000..56e45076ac --- /dev/null +++ b/resources/recipes/frazpc.recipe @@ -0,0 +1,35 @@ +#!/usr/bin/env python + +__license__ = 'GPL v3' +__copyright__ = u'2010, Tomasz Dlugosz ' +''' +frazpc.pl +''' + +from calibre.web.feeds.news import BasicNewsRecipe +import re +class FrazPC(BasicNewsRecipe): + title = u'frazpc.pl' + publisher = u'frazpc.pl' + description = u'Tw\xf3j Vortal Technologiczny' + language = 'pl' + __author__ = u'Tomasz D\u0142ugosz' + oldest_article = 7 + max_articles_per_feed = 100 + use_embedded_content = False + no_stylesheets = True + + feeds = [(u'Aktualno\u015bci', u'http://www.frazpc.pl/feed'), (u'Recenzje', u'http://www.frazpc.pl/kat/recenzje-2/feed') ] + + keep_only_tags = [dict(name='div', attrs={'id':'FRAZ_CONTENT'})] + + remove_tags = [dict(name='p', attrs={'class':'gray tagsP fs11'})] + + preprocess_regexps = [ + (re.compile(i[0], re.IGNORECASE | re.DOTALL), i[1]) for i in + [(r'
(Skomentuj|Komentarz(e)?\([0-9]*\))  \|', lambda match: '')] + ] + + remove_attributes = [ 'width', 'height' ]