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

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