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

  1. #!/usr/bin/python
  2. # -*- coding: utf-8 -*-
  3.  
  4. __license__   = 'GPL v3'
  5. __copyright__ = '2010, Vadim Dyadkin, dyadkin@gmail.com'
  6. __author__ = 'Vadim Dyadkin'
  7.  
  8. from calibre.web.feeds.news import BasicNewsRecipe
  9.  
  10. class Computerra(BasicNewsRecipe):
  11.     title = u'\u041a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0440\u0430'
  12.     oldest_article = 100
  13.     __author__  = 'Vadim Dyadkin (edited by A. Chewi)'
  14.     max_articles_per_feed = 50
  15.     use_embedded_content  = False
  16.     remove_javascript = True
  17.     no_stylesheets = True
  18.     conversion_options = {'linearize_tables' : True}
  19.     simultaneous_downloads = 5
  20.     language = 'ru'
  21.     description = u'╨Ü╨╛╨╝╨┐╤î╤Ä╤é╨╡╤Ç╤Ç╨░: ╨▓╤ü╨╡ ╨╜╨╛╨▓╨╛╤ü╤é╨╕ ╨┐╤Ç╨╛ ╨║╨╛╨╝╨┐╤î╤Ä╤é╨╡╤Ç╤ï, ╨╢╨╡╨╗╨╡╨╖╨╛, ╨╜╨╛╨▓╤ï╨╡ ╤é╨╡╤à╨╜╨╛╨╗╨╛╨│╨╕╨╕, ╨╕╨╜╤ä╨╛╤Ç╨╝╨░╤å╨╕╨╛╨╜╨╜╤ï╨╡ ╤é╨╡╤à╨╜╨╛╨╗╨╛╨│╨╕╨╕'
  22.  
  23.     keep_only_tags = [dict(name='div', attrs={'id': 'content'}),]
  24.  
  25.     feeds = [(u'╨Ü╨╛╨╝╨┐╤î╤Ä╤é╨╡╤Ç╤Ç╨░-╨₧╨╜╨╗╨░╨╣╨╜', 'http://feeds.feedburner.com/ct_news/'),]
  26.  
  27.     remove_tags = [
  28.     dict(name='div', attrs={'id': ['fin', 'idc-container', 'idc-noscript',]}),
  29.     dict(name='ul', attrs={'class': "related_post"}),
  30.     dict(name='p', attrs={'class': 'info'}),
  31.     dict(name='a', attrs={'class': 'twitter-share-button'}),
  32.     dict(name='a', attrs={'type': 'button_count'}),
  33.     dict(name='h2', attrs={})
  34.     ]
  35.  
  36.     def print_version(self, url):
  37.         return url + '?print=true'
  38.