diff --git a/recipes/forsal.recipe b/recipes/forsal.recipe index 4ebbb5a2a8..22a1ddcda5 100644 --- a/recipes/forsal.recipe +++ b/recipes/forsal.recipe @@ -9,6 +9,7 @@ class ForsalPL(BasicNewsRecipe): oldest_article = 7 max_articles_per_feed = 100 use_embedded_content = False + remove_empty_feeds = True ignore_duplicate_articles = {'title', 'url'} cover_url = 'http://www.bizneswnieruchomosciach.pl/wp-content/uploads/2010/07/logo_forsal.jpg' no_stylesheets = True diff --git a/recipes/kosmonauta_pl.recipe b/recipes/kosmonauta_pl.recipe index d943739832..e93853bd57 100644 --- a/recipes/kosmonauta_pl.recipe +++ b/recipes/kosmonauta_pl.recipe @@ -8,7 +8,7 @@ class Kosmonauta(BasicNewsRecipe): category = 'astronomy' language = 'pl' cover_url = 'http://bi.gazeta.pl/im/4/10393/z10393414X,Kosmonauta-net.jpg' - extra_css = '.thumbnail {float:left;margin-right:5px;}' + extra_css = '.thumb-left {float:left; margin-right:5px;} .calibre_navbar {clear: both;}' no_stylesheets = True INDEX = 'http://www.kosmonauta.net' oldest_article = 7 diff --git a/recipes/national_geographic_pl.recipe b/recipes/national_geographic_pl.recipe index 07fc0da666..be02ce4ebd 100644 --- a/recipes/national_geographic_pl.recipe +++ b/recipes/national_geographic_pl.recipe @@ -10,8 +10,8 @@ class recipeMagic(BasicNewsRecipe): title = 'National Geographic PL' __author__ = 'Marcin Urban 2011' __modified_by__ = 'fenuks' - description = 'legenda wśród magazynów z historią sięgającą 120 lat' - #cover_url = 'http://www.guj.pl/var/guj/storage/images/media/nasze_magazyny/national_geographic/logo/ng_logo/2606-1-pol-PL/ng_logo.jpg' + description = 'Legenda wśród magazynów z historią sięgającą 120 lat' + #cover_url = 'http://www.guj.pl/var/guj/storage/images/media/nasze_magazyny/national_geographic/logo/ng_logo/2606-1-pol-PL/ng_logo.jpg' oldest_article = 7 max_articles_per_feed = 100 no_stylesheets = True @@ -21,13 +21,14 @@ class recipeMagic(BasicNewsRecipe): publisher = 'G+J Gruner+Jahr Polska' category = 'news, PL,' language = 'pl' + remove_empty_feeds = True publication_type = 'newsportal' extra_css = ''' body {font-family: verdana, arial, helvetica, geneva, sans-serif ;} - h1{text-align: center;} - h2{font-size: medium; font-weight: bold;} - .authordate {font-size: small; color: #696969;} - p.lead {font-weight: bold; text-align: center;} - .fot{font-size: x-small; color: #666666;} ''' + h1{text-align: center;} + h2{font-size: medium; font-weight: bold;} + .authordate {font-size: small; color: #696969;} + p.lead {font-weight: bold; text-align: center;} + .fot{font-size: x-small; color: #666666;} ''' preprocess_regexps = [(re.compile(r'', re.DOTALL), lambda m: '')] conversion_options = { 'comments' : description @@ -37,9 +38,9 @@ class recipeMagic(BasicNewsRecipe): ,'linearize_tables': True } - remove_tags = [ - dict(name='div', attrs={'class':'add_inf'}), - dict(name='div', attrs={'class':'add_f'}), + remove_tags = [ + dict(name='div', attrs={'class':'add_inf'}), + dict(name='div', attrs={'class':'add_f'}), ] remove_attributes = ['width','height'] @@ -47,14 +48,16 @@ class recipeMagic(BasicNewsRecipe): def find_articles(self, url): articles = [] - soup=self.index_to_soup(url) - tag=soup.find(attrs={'class':'arl'}) - art=tag.ul.findAll('li') + soup = self.index_to_soup(url) + tag = soup.find(attrs={'class':'arl'}) + if not tag: + return articles + art = tag.ul.findAll('li') for i in art: - title=i.a['title'] - url=i.a['href'] + title = i.a['title'] + url = i.a['href'] #date=soup.find(id='footer').ul.li.string[41:-1] - desc=i.div.p.string + desc = i.div.p.string articles.append({'title' : title, 'url' : url, 'date' : '', diff --git a/recipes/polter_pl.recipe b/recipes/polter_pl.recipe index aea21dca9c..fdebcbc269 100644 --- a/recipes/polter_pl.recipe +++ b/recipes/polter_pl.recipe @@ -2,7 +2,7 @@ __license__ = 'GPL v3' import re from calibre.web.feeds.news import BasicNewsRecipe -class Poltergeist(BasicNewsRecipe): +class Polter(BasicNewsRecipe): title = u'Polter.pl' __author__ = 'fenuks' description = u'Największy polski serwis poświęcony ogólno pojętej fantastyce - grom fabularnym (RPG), książkom, filmowi, komiksowi, grom planszowym, karcianym i bitewnym.' @@ -10,21 +10,26 @@ class Poltergeist(BasicNewsRecipe): #publication_type = '' language = 'pl' #encoding = '' - extra_css = '.image, .floatright {float: right; margin-left: 10px;} .floatleft {float: left; margin-right: 10px;}' + extra_css = '.image, .floatright {float: right; margin-left: 10px;} .floatleft {float: left; margin-right: 10px;} .calibre_navbar {clear: both;} .p_title {font-weight: bold;} .p_image {margin-left: auto; margin-right: auto; display: block;} .italic {font-style: italic;}' cover_url = 'http://static.polter.pl/sub/promo/bpromo2524.jpg' #masthead_url = '' use_embedded_content = False oldest_article = 7 - preprocess_regexps = [(re.compile(ur'