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

  1. #!/usr/bin/env  python
  2.  
  3. __license__   = 'GPL v3'
  4. __copyright__ = u'2010-2011, Tomasz Dlugosz <tomek3d@gmail.com>'
  5. '''
  6. frazpc.pl
  7. '''
  8.  
  9. from calibre.web.feeds.news import BasicNewsRecipe
  10. import re
  11. class FrazPC(BasicNewsRecipe):
  12.     title          = u'frazpc.pl'
  13.     publisher      = u'frazpc.pl'
  14.     description    = u'Tw\xf3j Vortal Technologiczny'
  15.     language = 'pl'
  16.     __author__ = u'Tomasz D\u0142ugosz'
  17.     oldest_article = 7
  18.     max_articles_per_feed = 100
  19.     use_embedded_content = False
  20.     no_stylesheets = True
  21.  
  22.     feeds          = [
  23.         (u'Aktualno\u015bci', u'http://www.frazpc.pl/feed/aktualnosci'), 
  24.         (u'Artyku\u0142y', u'http://www.frazpc.pl/feed/artykuly')
  25.     ]
  26.  
  27.     keep_only_tags = [dict(name='div', attrs={'class':'article'})]
  28.  
  29.     remove_tags = [
  30.         dict(name='div', attrs={'class':'title-wrapper'}),
  31.         dict(name='p', attrs={'class':'tags'}),
  32.         dict(name='p', attrs={'class':'article-links'}),
  33.         dict(name='div', attrs={'class':'comments_box'})
  34.     ]
  35.  
  36.     preprocess_regexps = [(re.compile(r'\| <a href="#comments">Komentarze \([0-9]*\)</a>'), lambda match: '')]
  37.  
  38.     remove_attributes = [ 'width', 'height' ]
  39.