From 78cc12fe0e59745b89e7a3974133ca596ae39285 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20D=C5=82ugosz?= Date: Tue, 2 Apr 2013 00:16:33 +0200 Subject: [PATCH] minor fixes --- recipes/adventure_zone_pl.recipe | 1 - recipes/km_blog.recipe | 1 - recipes/sport_pl.recipe | 2 +- recipes/wirtualnemedia_pl.recipe | 2 +- recipes/wprost.recipe | 13 ++++------ recipes/wprost_rss.recipe | 42 ++++++++++++++++---------------- 6 files changed, 28 insertions(+), 33 deletions(-) diff --git a/recipes/adventure_zone_pl.recipe b/recipes/adventure_zone_pl.recipe index 00b4a8753e..50a980dc92 100644 --- a/recipes/adventure_zone_pl.recipe +++ b/recipes/adventure_zone_pl.recipe @@ -66,4 +66,3 @@ class Adventure_zone(BasicNewsRecipe): if a.has_key('href') and 'http://' not in a['href'] and 'https://' not in a['href']: a['href']=self.index + a['href'] return soup - diff --git a/recipes/km_blog.recipe b/recipes/km_blog.recipe index 614dbc03e5..8910ee060a 100644 --- a/recipes/km_blog.recipe +++ b/recipes/km_blog.recipe @@ -20,7 +20,6 @@ class km_blog(BasicNewsRecipe): remove_javascript=True no_stylesheets=True remove_empty_feeds = True - feeds = [(u'blog', u'http://korwin-mikke.pl/blog/rss')] keep_only_tags =[] diff --git a/recipes/sport_pl.recipe b/recipes/sport_pl.recipe index 622a3675bd..4095817a6b 100644 --- a/recipes/sport_pl.recipe +++ b/recipes/sport_pl.recipe @@ -21,7 +21,7 @@ class sport_pl(BasicNewsRecipe): remove_javascript=True no_stylesheets=True remove_empty_feeds = True - + ignore_duplicate_articles = {'title', 'url'} keep_only_tags =[] keep_only_tags.append(dict(name = 'div', attrs = {'id' : 'article'})) diff --git a/recipes/wirtualnemedia_pl.recipe b/recipes/wirtualnemedia_pl.recipe index 28278c2e24..ed3b3787f8 100644 --- a/recipes/wirtualnemedia_pl.recipe +++ b/recipes/wirtualnemedia_pl.recipe @@ -1,7 +1,7 @@ from calibre.web.feeds.news import BasicNewsRecipe class WirtualneMedia(BasicNewsRecipe): - title = u'wirtualnemedia.pl' + title = u'Wirtualnemedia.pl' oldest_article = 7 max_articles_per_feed = 100 no_stylesheets = True diff --git a/recipes/wprost.recipe b/recipes/wprost.recipe index 90dde251ca..d923f64a3f 100644 --- a/recipes/wprost.recipe +++ b/recipes/wprost.recipe @@ -1,10 +1,9 @@ #!/usr/bin/env python __license__ = 'GPL v3' -__copyright__ = '2010, matek09, matek09@gmail.com' -__copyright__ = 'Modified 2011, Mariusz Wolek ' -__copyright__ = 'Modified 2012, Artur Stachecki ' - +__copyright__ = '''2010, matek09, matek09@gmail.com + Modified 2011, Mariusz Wolek + Modified 2012, Artur Stachecki ''' from calibre.web.feeds.news import BasicNewsRecipe import re @@ -16,12 +15,12 @@ class Wprost(BasicNewsRecipe): ICO_BLOCKED = 'http://www.wprost.pl/G/layout2/ico_blocked.png' title = u'Wprost' __author__ = 'matek09' - description = 'Weekly magazine' + description = u'Popularny tygodnik ogólnopolski - Wprost. Najlepszy wśród polskich tygodników - opiniotwórczy - społeczno-informacyjny - społeczno-kulturalny.' encoding = 'ISO-8859-2' no_stylesheets = True language = 'pl' remove_javascript = True - recursions = 0 + recursions = 0 remove_tags_before = dict(dict(name = 'div', attrs = {'id' : 'print-layer'})) remove_tags_after = dict(dict(name = 'div', attrs = {'id' : 'print-layer'})) ''' @@ -94,5 +93,3 @@ class Wprost(BasicNewsRecipe): 'description' : '' }) return articles - - diff --git a/recipes/wprost_rss.recipe b/recipes/wprost_rss.recipe index bffbacc474..59c130fc75 100644 --- a/recipes/wprost_rss.recipe +++ b/recipes/wprost_rss.recipe @@ -1,10 +1,9 @@ -#!/usr/bin/env python - -__license__ = 'GPL v3' -__copyright__ = '2010, matek09, matek09@gmail.com' -__copyright__ = 'Modified 2011, Mariusz Wolek ' -__copyright__ = 'Modified 2012, Artur Stachecki ' +#!/usr/bin/env python +__license__ = 'GPL v3' +__copyright__ = '''2010, matek09, matek09@gmail.com + Modified 2011, Mariusz Wolek + Modified 2012, Artur Stachecki ''' from calibre.web.feeds.news import BasicNewsRecipe import re @@ -12,13 +11,14 @@ import re class Wprost(BasicNewsRecipe): title = u'Wprost (RSS)' __author__ = 'matek09' - description = 'Weekly magazine' + description = u'Portal informacyjny. Najświeższe wiadomości, najciekawsze komentarze i opinie. Blogi najlepszych publicystów.' encoding = 'ISO-8859-2' no_stylesheets = True language = 'pl' remove_javascript = True recursions = 0 use_embedded_content = False + ignore_duplicate_articles = {'title', 'url'} remove_empty_feeds = True remove_tags_before = dict(dict(name = 'div', attrs = {'id' : 'print-layer'})) remove_tags_after = dict(dict(name = 'div', attrs = {'id' : 'print-layer'})) @@ -48,20 +48,20 @@ class Wprost(BasicNewsRecipe): #h2 {font-size: x-large; font-weight: bold} feeds = [(u'Tylko u nas', u'http://www.wprost.pl/rss/rss_wprostextra.php'), - (u'Wydarzenia', u'http://www.wprost.pl/rss/rss.php'), - (u'Komentarze', u'http://www.wprost.pl/rss/rss_komentarze.php'), - (u'Wydarzenia: Kraj', u'http://www.wprost.pl/rss/rss_kraj.php'), - (u'Komentarze: Kraj', u'http://www.wprost.pl/rss/rss_komentarze_kraj.php'), - (u'Wydarzenia: Świat', u'http://www.wprost.pl/rss/rss_swiat.php'), - (u'Komentarze: Świat', u'http://www.wprost.pl/rss/rss_komentarze_swiat.php'), - (u'Wydarzenia: Gospodarka', u'http://www.wprost.pl/rss/rss_gospodarka.php'), - (u'Komentarze: Gospodarka', u'http://www.wprost.pl/rss/rss_komentarze_gospodarka.php'), - (u'Wydarzenia: Życie', u'http://www.wprost.pl/rss/rss_zycie.php'), - (u'Komentarze: Życie', u'http://www.wprost.pl/rss/rss_komentarze_zycie.php'), - (u'Wydarzenia: Sport', u'http://www.wprost.pl/rss/rss_sport.php'), - (u'Komentarze: Sport', u'http://www.wprost.pl/rss/rss_komentarze_sport.php'), - (u'Przegląd prasy', u'http://www.wprost.pl/rss/rss_prasa.php') - ] + (u'Wydarzenia', u'http://www.wprost.pl/rss/rss.php'), + (u'Komentarze', u'http://www.wprost.pl/rss/rss_komentarze.php'), + (u'Wydarzenia: Kraj', u'http://www.wprost.pl/rss/rss_kraj.php'), + (u'Komentarze: Kraj', u'http://www.wprost.pl/rss/rss_komentarze_kraj.php'), + (u'Wydarzenia: Świat', u'http://www.wprost.pl/rss/rss_swiat.php'), + (u'Komentarze: Świat', u'http://www.wprost.pl/rss/rss_komentarze_swiat.php'), + (u'Wydarzenia: Gospodarka', u'http://www.wprost.pl/rss/rss_gospodarka.php'), + (u'Komentarze: Gospodarka', u'http://www.wprost.pl/rss/rss_komentarze_gospodarka.php'), + (u'Wydarzenia: Życie', u'http://www.wprost.pl/rss/rss_zycie.php'), + (u'Komentarze: Życie', u'http://www.wprost.pl/rss/rss_komentarze_zycie.php'), + (u'Wydarzenia: Sport', u'http://www.wprost.pl/rss/rss_sport.php'), + (u'Komentarze: Sport', u'http://www.wprost.pl/rss/rss_komentarze_sport.php'), + (u'Przegląd prasy', u'http://www.wprost.pl/rss/rss_prasa.php') + ] def get_cover_url(self): soup = self.index_to_soup('http://www.wprost.pl/tygodnik')