From 798ad0002921bca1e8c3d34f0049047d3450195c Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 14 Nov 2011 09:47:00 +0530 Subject: [PATCH] Update cgm.pl, historia.pl and tablety.pl --- recipes/cgm_pl.recipe | 2 +- recipes/historia_pl.recipe | 11 ++++++++++- recipes/tablety_pl.recipe | 5 +++-- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/recipes/cgm_pl.recipe b/recipes/cgm_pl.recipe index 485cf45245..591155ff85 100644 --- a/recipes/cgm_pl.recipe +++ b/recipes/cgm_pl.recipe @@ -27,7 +27,7 @@ class CGM(BasicNewsRecipe): del item['style'] ad=soup.findAll('a') for r in ad: - if 'http://www.hustla.pl' in r['href']: + if 'http://www.hustla.pl' in r['href'] or 'http://www.ebilet.pl' in r['href']: r.extract() gallery=soup.find('div', attrs={'class':'galleryFlash'}) if gallery: diff --git a/recipes/historia_pl.recipe b/recipes/historia_pl.recipe index 26cda733b2..34ca158a96 100644 --- a/recipes/historia_pl.recipe +++ b/recipes/historia_pl.recipe @@ -8,6 +8,15 @@ class Historia_org_pl(BasicNewsRecipe): category = 'history' language = 'pl' oldest_article = 8 + remove_empty_feeds=True max_articles_per_feed = 100 - feeds = [(u'Artykuły', u'http://www.historia.org.pl/index.php?format=feed&type=rss')] + feeds = [(u'Wszystkie', u'http://www.historia.org.pl/index.php?format=feed&type=rss'), + (u'Wiadomości', u'http://www.historia.org.pl/index.php/wiadomosci.feed?type=rss'), + (u'Publikacje', u'http://www.historia.org.pl/index.php/publikacje.feed?type=rss'), + (u'Publicystyka', u'http://www.historia.org.pl/index.php/publicystyka.feed?type=rss'), + (u'Recenzje', u'http://historia.org.pl/index.php/recenzje.feed?type=rss'), + (u'Kultura i sztuka', u'http://www.historia.org.pl/index.php/kultura-i-sztuka.feed?type=rss'), + (u'Rekonstykcje', u'http://www.historia.org.pl/index.php/rekonstrukcje.feed?type=rss'), + (u'Projekty', u'http://www.historia.org.pl/index.php/projekty.feed?type=rss'), + (u'Konkursy'), (u'http://www.historia.org.pl/index.php/konkursy.feed?type=rss')] diff --git a/recipes/tablety_pl.recipe b/recipes/tablety_pl.recipe index af317d1b09..d06e32d9af 100644 --- a/recipes/tablety_pl.recipe +++ b/recipes/tablety_pl.recipe @@ -9,6 +9,7 @@ class Tablety_pl(BasicNewsRecipe): language = 'pl' oldest_article = 8 max_articles_per_feed = 100 - keep_only_tags=[dict(name='header', attrs={'class':'entry-header'}), dict(name='div', attrs={'class':'entry-content clearfix'})] - remove_tags=[dict(name='div', attrs={'class':'snap_nopreview sharing robots-nocontent'}), dict(name='span', attrs={'class':'dsq-postid'})] + remove_tags_before=dict(name="h1", attrs={'class':'entry-title'}) + remove_tags_after=dict(name="div", attrs={'class':'snap_nopreview sharing robots-nocontent'}) + remove_tags=[dict(name='div', attrs={'class':'snap_nopreview sharing robots-nocontent'})] feeds = [(u'Najnowsze posty', u'http://www.tablety.pl/feed/')]