diff --git a/recipes/kosmonauta_pl.recipe b/recipes/kosmonauta_pl.recipe index 42c8f1b75a..8cc7258c1b 100644 --- a/recipes/kosmonauta_pl.recipe +++ b/recipes/kosmonauta_pl.recipe @@ -10,30 +10,11 @@ class Kosmonauta(BasicNewsRecipe): category = 'astronomy' language = 'pl' cover_url = 'http://bi.gazeta.pl/im/4/10393/z10393414X,Kosmonauta-net.jpg' - extra_css = '.thumb-left {float:left; margin-right:5px;} .calibre_navbar {clear: both;}' no_stylesheets = True - INDEX = 'http://www.kosmonauta.net' oldest_article = 7 no_stylesheets = True remove_javascript = True remove_attributes = ['style'] max_articles_per_feed = 100 - keep_only_tags = [dict(name='div', attrs={'class': 'item-page'})] - remove_tags = [dict(attrs={'class': ['article-tools clearfix', 'cedtag', 'nav clearfix', - 'jwDisqusForm']}), dict(attrs={'alt': ['Poprzednia strona', 'Następna strona']})] - remove_tags_after = dict(name='div', attrs={'class': 'cedtag'}) - feeds = [(u'Kosmonauta.net', u'http://www.kosmonauta.net/?format=feed&type=atom')] + feeds = [(u'Kosmonauta.net', u'http://www.kosmonauta.net/feed')] - def print_version(self, url): - return url + '?tmpl=component&print=1&layout=default&page=' - - def preprocess_html(self, soup): - for a in soup.findAll(name='a'): - if a.has_key('href'): # noqa - href = a['href'] - if not href.startswith('http'): - a['href'] = self.INDEX + href - for a in soup.findAll(name='img'): - if a.has_key('style') and 'float:' in a['style']: # noqa - a['class'] = 'thumb-left' - return soup