home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2010 November / maximum-cd-2010-11.iso / DiscContents / calibre-0.7.13.msi / file_3925 < prev    next >
Encoding:
Text File  |  2010-03-15  |  963 b   |  36 lines

  1. #!/usr/bin/env  python
  2.  
  3. __license__   = 'GPL v3'
  4. __copyright__ = '2010, Tomasz Dlugosz <tomek3d@gmail.com>'
  5. '''
  6. nczas.com
  7. '''
  8.  
  9. from calibre.web.feeds.news import BasicNewsRecipe
  10.  
  11.  
  12. class NCzas(BasicNewsRecipe):
  13.     title          = u'Najwy\u017cszy Czas!'
  14.     description    = u'Najwy\u017cszy Czas!\nwydanie internetowe'
  15.     __author__     = u'Tomasz D\u0142ugosz'
  16.     language       = 'pl'
  17.     oldest_article = 7
  18.     max_articles_per_feed = 100
  19.     no_stylesheets = True
  20.     cover_url      = 'http://nczas.com/wp-content/themes/default/grafika/logo.png'
  21.  
  22.     keep_only_tags = [dict(name='div', attrs={'class':'trescartykulu'})]
  23.  
  24.     feeds          = [(u'Najwy\u017cszy Czas!', u'http://nczas.com/feed/')]
  25.  
  26.     def postprocess_html(self, soup, first):
  27.  
  28.             for tag in soup.findAll(name= 'img', alt=""):
  29.                     tag.extract()
  30.  
  31.             for item in soup.findAll(align = "right"):
  32.                 del item['align']
  33.  
  34.             return soup
  35.