1from calibre.web.feeds.recipes import BasicNewsRecipe 2 3'''Calibre recipe to convert the RSS feeds of the PNN to an ebook.''' 4 5 6class SportsIllustratedRecipe(BasicNewsRecipe): 7 __author__ = 'n.kucklaender' 8 __copyright__ = 'a.peter' 9 __license__ = 'GPL v3' 10 language = 'de' 11 description = 'PNN RSS' 12 version = 1 13 title = u'PNN' 14 timefmt = ' [%d.%m.%Y]' 15 16 oldest_article = 7.0 17 no_stylesheets = True 18 remove_javascript = True 19 use_embedded_content = False 20 publication_type = 'newspaper' 21 22 remove_empty_feeds = True 23 remove_tags = [dict(attrs={'class': ['um-weather um-header-weather', 'um-has-sub um-mainnav', 'um-box', 'ts-products', 24 'um-meta-nav', 'um-box um-last', 'um-footer', 'um-footer-links', 'share hidden', 'um-buttons']}), dict(id=['dinsContainer'])] # noqa 25 26 feeds = [(u'Titelseite', u'http://www.pnn.de/rss.xml'), 27 (u'Dritte Seite', u'http://www.pnn.de/dritte-seite/rss.xml'), 28 (u'Politik', u'http://www.pnn.de/politik/rss.xml'), 29 (u'Meinung', u'http://www.pnn.de/meinung/rss.xml'), 30 (u'Potsdam', u'http://www.pnn.de/potsdam/rss.xml'), 31 (u'Havel-Spree', u'http://www.pnn.de/havel-spree/rss.xml'), 32 (u'Potsdam-Mittelmark', u'http://www.pnn.de/pm/rss.xml'), 33 (u'Berlin-Brandenburg', u'http://www.pnn.de/brandenburg-berlin/rss.xml'), 34 (u'Wirtschaft', u'http://www.pnn.de/wirtschaft/rss.xml'), 35 (u'Sport', u'http://www.pnn.de/sport/rss.xml'), 36 (u'Regionalsport', u'http://www.pnn.de/regionalsport/rss.xml'), 37 (u'Kultur', u'http://www.pnn.de/kultur/rss.xml'), 38 (u'Potsdam-Kultur', u'http://www.pnn.de/potsdam-kultur/rss.xml'), 39 (u'Wissen', u'http://www.pnn.de/wissen/rss.xml'), 40 (u'Medien', u'http://www.pnn.de/medien/rss.xml'), 41 (u'Weltspiegel', u'http://www.pnn.de/weltspiegel/rss.xml'), 42 (u'Wissenschaft', u'http://www.pnn.de/campus/rss.xml'), 43 (u'Mobil', u'http://www.pnn.de/mobil/rss.xml'), 44 (u'Reise', u'http://www.pnn.de/reise/rss.xml'), 45 (u'Ratgeber', u'http://www.pnn.de/ratgeber/rss.xml'), 46 (u'Fragen des Tages', u'http://www.pnn.de/fragen-des-tages/rss.xml'), 47 # (u'Potsdam bin ich', u'http://www.pnn.de/potsdam-bin-ich/rss.xml'), 48 (u'Leserbriefe', u'http://www.pnn.de/leserbriefe/rss.xml')] 49 50 def get_masthead_url(self): 51 return 'http://www.pnn.de/app/base/img/pnn_logo.png' 52 53 def print_version(self, url): 54 return url.replace('.html', ',view,printVersion.html') 55