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

  1. #!/usr/bin/env  python
  2.  
  3. __license__   = 'GPL v3'
  4. __copyright__ = '2010 Starson17'
  5. '''
  6. fudzilla.com
  7. '''
  8.  
  9. import re
  10. from calibre.web.feeds.news import BasicNewsRecipe
  11.  
  12. class Fudzilla(BasicNewsRecipe):
  13.     title                 = u'Fudzilla'
  14.     __author__            = 'Starson17'
  15.     language = 'en'
  16.  
  17.     description           = 'Tech news'
  18.     oldest_article        = 7
  19.     remove_javascript = True
  20.     max_articles_per_feed = 100
  21.     no_stylesheets        = True
  22.     use_embedded_content  = False
  23.  
  24.  
  25.     remove_tags_before = dict(name='div', attrs={'class':['padding']})
  26.  
  27.     remove_tags = [dict(name='td', attrs={'class':['left','right']}),
  28.                    dict(name='div', attrs={'id':['toolbar','buttons']}),
  29.                    dict(name='div', attrs={'class':['artbannersxtd','back_button']}),
  30.                    dict(name='span', attrs={'class':['pathway']}),
  31.                    dict(name='th', attrs={'class':['pagenav_next','pagenav_prev']}),
  32.                    dict(name='table', attrs={'class':['headlines']}),
  33.                    ]
  34.  
  35.     feeds = [
  36.             (u'Posts', u'http://www.fudzilla.com/?format=feed')
  37.              ]
  38.  
  39.     preprocess_regexps = [
  40.         (re.compile(r'<p class="MsoNormal"> Welcome.*</p> ', re.DOTALL|re.IGNORECASE), lambda match: '')
  41.         ]
  42.