From ad0cd870d3a4d1ddabb0019dbfd0b9e267fe685c Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 17 Sep 2011 14:24:33 -0600 Subject: [PATCH] Fix Cicero --- recipes/cicero.recipe | 63 ++++++++++++++++++++++--------------------- 1 file changed, 33 insertions(+), 30 deletions(-) diff --git a/recipes/cicero.recipe b/recipes/cicero.recipe index 2df6b68000..de6676ae44 100644 --- a/recipes/cicero.recipe +++ b/recipes/cicero.recipe @@ -1,35 +1,38 @@ from calibre.web.feeds.news import BasicNewsRecipe -class Cicero(BasicNewsRecipe): - timefmt = ' [%Y-%m-%d]' - title = u'Cicero' - __author__ = 'mad@sharktooth.de' - description = u'Magazin f\xfcr politische Kultur' - oldest_article = 7 - language = 'de' +class BasicUserRecipe1316245412(BasicNewsRecipe): + + title = u'Cicero Online' + description = u'Magazin f\xfcr politische Kultur' + publisher = 'Ringier Publishing GmbH' + category = 'news, politics, Germany' + language = 'de' + encoding = 'UTF-8' + __author__ = 'Armin Geller' # 2011-09-17 + + oldest_article = 7 max_articles_per_feed = 100 - no_stylesheets = True - use_embedded_content = False - publisher = 'Ringier Publishing' - category = 'news, politics, Germany' - encoding = 'iso-8859-1' - publication_type = 'magazine' - masthead_url = 'http://www.cicero.de/img2/cicero_logo_rss.gif' - feeds = [ -(u'Das gesamte Portfolio', u'http://www.cicero.de/rss/rss.php?ress_id='), -#(u'Alle Heft-Inhalte', u'http://www.cicero.de/rss/rss.php?ress_id=heft'), -#(u'Alle Online-Inhalte', u'http://www.cicero.de/rss/rss.php?ress_id=online'), -#(u'Berliner Republik', u'http://www.cicero.de/rss/rss.php?ress_id=4'), -#(u'Weltb\xfchne', u'http://www.cicero.de/rss/rss.php?ress_id=1'), -#(u'Salon', u'http://www.cicero.de/rss/rss.php?ress_id=7'), -#(u'Kapital', u'http://www.cicero.de/rss/rss.php?ress_id=6'), -#(u'Netzst\xfccke', u'http://www.cicero.de/rss/rss.php?ress_id=9'), -#(u'Leinwand', u'http://www.cicero.de/rss/rss.php?ress_id=12'), -#(u'Bibliothek', u'http://www.cicero.de/rss/rss.php?ress_id=15'), -(u'Kolumne - Alle Kolulmnen', u'http://www.cicero.de/rss/rss2.php?ress_id='), -#(u'Kolumne - Schreiber, Berlin', u'http://www.cicero.de/rss/rss2.php?ress_id=35'), -#(u'Kolumne - TV Kritik', u'http://www.cicero.de/rss/rss2.php?ress_id=34') -] + no_stylesheets = True + auto_cleanup = False + + remove_tags = [ + dict(name='div', attrs={'id':["header", "navigation", "skip-link", "header-print", "header-print-url", "meta-toolbar", "footer"]}), + dict(name='div', attrs={'class':["region region-sidebar-first column sidebar", "breadcrumb", "breadcrumb-title", "meta", "comment-wrapper", + "field field-name-field-show-teaser-right field-type-list-boolean field-label-above"]}), + dict(name='div', attrs={'title':["Dossier Auswahl"]}), + dict(name='h2', attrs={'class':["title comment-form"]}), + dict(name='form', attrs={'class':["comment-form user-info-from-cookie"]}), + ] + + feeds = [ + (u'Das gesamte Portfolio', u'http://www.cicero.de/rss.xml'), + (u'Berliner Republik', u'http://www.cicero.de/berliner-republik.xml'), + (u'Weltb\xfchne', u'http://www.cicero.de/weltbuehne.xml'), + (u'Kapital', u'http://www.cicero.de/kapital.xml'), + (u'Salon', u'http://www.cicero.de/salon.xml'), + (u'Blogs', u'http://www.cicero.de/blogs.xml'), #seems not to be in use at the moment + ] def print_version(self, url): - return 'http://www.cicero.de/page_print.php?' + url.rpartition('?')[2] + return url + '?print' +