home *** CD-ROM | disk | FTP | other *** search
/ Chip 2011 November / CHIP_2011_11.iso / Programy / Narzedzia / Calibre / calibre-0.8.18.msi / file_280 / heise_open.recipe < prev    next >
Text File  |  2011-09-09  |  1KB  |  39 lines

  1. __license__   = 'GPL v3'
  2. __copyright__ = '2010, Anton Gillert <atx at binaryninja.de>'
  3.  
  4. '''
  5. Fetch Heise Open.
  6. '''
  7. from calibre.web.feeds.news import BasicNewsRecipe
  8.  
  9.  
  10. class HeiseOpenDe(BasicNewsRecipe):
  11.  
  12.     title = 'Heise Open'
  13.     description = 'Opensource news from Germany'
  14.     __author__ = 'Anton Gillert'
  15.     use_embedded_content   = False
  16.     language = 'de'
  17.     timefmt = ' [%d %b %Y]'
  18.     max_articles_per_feed = 40
  19.     no_stylesheets = True
  20.  
  21.     feeds =  [ ('Heise Open', 'http://www.heise.de/open/news/news-atom.xml') ]
  22.  
  23.     def print_version(self, url):
  24.         return url + '?view=print'
  25.  
  26.     remove_tags = [dict(id='navi_top'),
  27.            dict(id='navi_bottom'),
  28.            dict(name='div', attrs={'class':'navi_top_logo'}),
  29.            dict(name='img', attrs={'src':'/open/icons/open_logo_2009_weiss.gif'}),
  30.            dict(name='h5', attrs={'style':'margin: 0.5em 0;'}),
  31.            dict(name='p', attrs={'class':'news_datum'}),
  32.            dict(name='p', attrs={'class':'size80'})]
  33.     remove_tags_after = [dict(name='p', attrs={'class':'size80'})]
  34.  
  35.     def get_cover_url(self):
  36.         return 'http://www.heise.de/open/icons/open_logo_2009_weiss.gif'
  37.  
  38.  
  39.