View Single Post
Old 09-17-2011, 03:41 PM   #1
Divingduck
Wizard
Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.
 
Posts: 1,166
Karma: 1410083
Join Date: Nov 2010
Location: Germany
Device: Sony PRS-650
Cicero (DE) update

The recipe "Cicero" is broken and need to be replace. I made a new working version called "Cicero Online". Feel free to use it. Let me know if something is wrong.

Spoiler:
Code:

class BasicUserRecipe1316245412(AutomaticNewsRecipe):
#    from calibre.utils.magick import Image, PixelWand
    title = u'Cicero Online'
    description = u'Magazin f\xfcr politische Kultur (RSS Version)'
    publisher = 'Ringier Publishing GmbH'
    category = 'news, politics, Germany'
    language = 'de'
    encoding = 'UTF-8'
    __author__ = 'Armin Geller' # Upd. 2011-09-23
        
    oldest_article        = 7
    max_articles_per_feed = 100
    no_stylesheets = True 
    auto_cleanup = False
    
#    remove_javascript = True    

    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",
                                                      "page-header",
                                                      "view view-alle-karikaturen view-id-alle_karikaturen view-display-id-default view-dom-id-1",
                                                      "pagination",
                                                      "view view-letzte-videos view-id-letzte_videos view-display-id-default view-dom-id-1",
                                                      "view view-letzte-videos view-id-letzte_videos view-display-id-default view-dom-id-2", # 2011-09-23
                                                      "view view-alle-karikaturen view-id-alle_karikaturen view-display-id-default view-dom-id-2", # 2011-09-23
                                                      ]}),
                    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"]}),
                    dict(name='table', attrs={'class':["mcx-social-horizontal", "page-header"]}),
                   ]
    
    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 url + '?print'
          
#    def get_cover_url(self):
#          return 'http://www.cicero.de/sites/all/themes/cicero/logo.png' # need to find a good logo on their home page!



Edit 2011-09-18 change to Code view
Edit 2011-09-19 update because of clean-up on first feed historical caricature- and video preview pictures and social icons
Edit 2011-09-23 update because of new classes on historical caricature- and video preview pictures and social icons
Attached Files
File Type: txt Cicero_AGe.recipe.txt (2.9 KB, 145 views)

Last edited by Divingduck; 09-23-2011 at 04:37 AM.
Divingduck is offline   Reply With Quote