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

  1. from calibre.web.feeds.news import BasicNewsRecipe
  2. import re
  3.  
  4. class SlovoRecipe(BasicNewsRecipe):
  5.     __license__  = 'GPL v3'
  6.     __author__ = 'Abelturd'
  7.     language = 'sk'
  8.     version = 1
  9.  
  10.     title = u'SLOVO'
  11.     publisher = u''
  12.     category = u'News, Newspaper'
  13.     description = u'Politicko-spolo\u010densk\xfd t\xfd\u017edenn\xedk'
  14.     encoding = 'Windows-1250'
  15.  
  16.     oldest_article = 1
  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'V\u0161etky \u010dl\xe1nky', u'http://www.noveslovo.sk/rss.asp'))
  27.  
  28.     keep_only_tags = []
  29.     remove_tags = []
  30.  
  31.     preprocess_regexps = [
  32.         (re.compile(r'<img src="gif/image1.gif">', re.DOTALL|re.IGNORECASE),
  33.         lambda match: ''),
  34.     ]
  35.  
  36.  
  37.     def print_version(self, url):
  38.         m = re.search('(?<=id=)[0-9]*', url)
  39.  
  40.  
  41.         return u'http://www.noveslovo.sk/clanoktlac.asp?id=' + str(m.group(0))
  42.