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

  1. from calibre.web.feeds.news import BasicNewsRecipe
  2. import re
  3.  
  4. class SmeRecipe(BasicNewsRecipe):
  5.     __license__  = 'GPL v3'
  6.     __author__ = 'Abelturd'
  7.     language = 'cs'
  8.     version = 1
  9.  
  10.     title = u'iLiteratura.cz'
  11.     publisher = u''
  12.     category = u'News, Newspaper'
  13.     description = u'O LITERATU\u0158E V CEL\xc9M SV\u011aT\u011a A DOMA'
  14.     cover_url = 'http://www.iliteratura.cz/1_vzhled/1/iliteratura.gif'
  15.  
  16.     oldest_article = 7
  17.     max_articles_per_feed = 100
  18.     use_embedded_content = False
  19.     remove_empty_feeds = True
  20.  
  21.     no_stylesheets = True
  22.     remove_javascript = True
  23.  
  24.  
  25.     feeds = []
  26.     feeds.append((u'\u010cl\xe1nky', u'http://www.iliteratura.cz/rss.asp'))
  27.  
  28.  
  29.     keep_only_tags = []
  30.  
  31.     remove_tags = [dict(name='table'),dict(name='h3')]
  32.  
  33.  
  34.     preprocess_regexps = [
  35.         (re.compile(r'<h3>Souvisej.*</body>', re.DOTALL|re.IGNORECASE),
  36.         lambda match: ''),
  37.      ]
  38.  
  39.     def print_version(self, url):
  40.          m = re.search('(?<=ID=)[0-9]*', url)
  41.  
  42.          return u'http://www.iliteratura.cz/clanek.asp?polozkaID=' + str(m.group(0)) + '&c=tisk'
  43.  
  44.     extra_css = '''
  45.                   h1 {font-size:140%;font-family:georgia,serif; font-weight:bold}
  46.                   h3 {font-size:115%;font-family:georgia,serif; font-weight:bold}
  47.                 '''
  48.