home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2010 November / maximum-cd-2010-11.iso / DiscContents / calibre-0.7.13.msi / file_3941 < prev    next >
Encoding:
Text File  |  2010-07-27  |  1.9 KB  |  43 lines

  1.  
  2. __license__   = 'GPL v3'
  3. __copyright__ = '2008-2010, Darko Miletic <darko.miletic at gmail.com>'
  4. '''
  5. novosti.rs
  6. '''
  7.  
  8. import re
  9. from calibre.web.feeds.news import BasicNewsRecipe
  10.  
  11. class Novosti(BasicNewsRecipe):
  12.     title                 = 'Vecernje Novosti'
  13.     __author__            = 'Darko Miletic'
  14.     description           = 'U po─ìetku su bile istinske ve─ìernje novine - pokrenute u vreme Tr┼í─çanske krize, Italijansko-jugoslovenskog konflikta oko grada Trsta - ali su brzo izrasle u dnevni informativno-politi─ìki list, koji ve─ç godinama ima najve─çi tira┼╛ u Srbiji.'
  15.     publisher             = 'Kompanija Novosti'
  16.     category              = 'news, politics, Serbia'
  17.     oldest_article        = 2
  18.     max_articles_per_feed = 100
  19.     no_stylesheets        = True
  20.     use_embedded_content  = False
  21.     encoding              = 'utf-8'
  22.     language              = 'sr'
  23.     publication_type      = 'newspaper'
  24.     extra_css             = """ @font-face {font-family: "sans1";src:url(res:///opt/sony/ebook/FONT/tt0003m_.ttf)} 
  25.                                 .article_description,body{font-family: Arial,Helvetica,sans1,sans-serif} 
  26.                                 .author{font-size: small}
  27.                                 .articleLead{font-size: large; font-weight: bold}
  28.                             """
  29.  
  30.     conversion_options = {
  31.                           'comment'   : description
  32.                         , 'tags'      : category
  33.                         , 'publisher' : publisher
  34.                         , 'language'  : language
  35.                         }
  36.  
  37.     preprocess_regexps = [(re.compile(u'\u0110'), lambda match: u'\u00D0')]
  38.  
  39.     keep_only_tags     = [dict(attrs={'class':['articleTitle','author','articleLead','articleBody']})]
  40.     remove_tags        = [dict(name=['embed','object','iframe','base'])]
  41.  
  42.     feeds              = [(u'Vesti', u'http://www.novosti.rs/rss/rss-vesti')]
  43.