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

  1.  
  2. __license__   = 'GPL v3'
  3. __copyright__ = '2009-2010, Darko Miletic <darko.miletic at gmail.com>'
  4. '''
  5. beta.rs
  6. '''
  7. import re
  8. from calibre.web.feeds.news import BasicNewsRecipe
  9.  
  10. class Danas(BasicNewsRecipe):
  11.     title                 = 'BETA'
  12.     __author__            = 'Darko Miletic'
  13.     description           = 'Novinska Agencija'
  14.     publisher             = 'Beta'
  15.     category              = 'news, politics, Serbia'
  16.     oldest_article        = 2
  17.     max_articles_per_feed = 100
  18.     no_stylesheets        = False
  19.     use_embedded_content  = True
  20.     language              = 'sr'
  21.     publication_type      = 'newsportal'    
  22.     extra_css             = '@font-face {font-family: "serif1";src:url(res:///opt/sony/ebook/FONT/tt0011m_.ttf)} @font-face {font-family: "sans1";src:url(res:///opt/sony/ebook/FONT/tt0003m_.ttf)} body{font-family: serif1, serif} .article_description{font-family: sans1, sans-serif} img{margin-bottom: 0.8em} '
  23.  
  24.     conversion_options = {
  25.                           'comment'          : description
  26.                         , 'tags'             : category
  27.                         , 'publisher'        : publisher
  28.                         , 'language'         : language
  29.                         }
  30.  
  31.  
  32.     preprocess_regexps = [(re.compile(u'\u0110'), lambda match: u'\u00D0')]
  33.  
  34.     feeds          = [
  35.                         (u'Vesti dana', u'http://www.beta.rs/rssvd.asp')
  36.                        ,(u'Ekonomija' , u'http://www.beta.rs/rssek.asp')
  37.                        ,(u'Sport'     , u'http://www.beta.rs/rsssp.asp')
  38.                      ]
  39.  
  40.     def preprocess_html(self, soup):
  41.         return self.adeify_images(soup)
  42.