home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2011 January / maximum-cd-2011-01.iso / DiscContents / calibre-0.7.26.msi / file_3872 < prev    next >
Encoding:
Text File  |  2010-09-30  |  2.2 KB  |  48 lines

  1.  
  2. __license__   = 'GPL v3'
  3. __copyright__ = '2008-2010, Darko Miletic <darko.miletic at gmail.com>'
  4. '''
  5. blic.rs
  6. '''
  7.  
  8. import re
  9. from calibre.web.feeds.news import BasicNewsRecipe
  10.  
  11. class Blic(BasicNewsRecipe):
  12.     title                 = 'Blic'
  13.     __author__            = 'Darko Miletic'
  14.     description           = 'Blic.rs online verzija najtiraznije novine u Srbiji donosi najnovije vesti iz Srbije i sveta, komentare, politicke analize, poslovne i ekonomske vesti, vesti iz regiona, intervjue, informacije iz kulture, reportaze, pokriva sve sportske dogadjaje, detaljan tv program, nagradne igre, zabavu, fenomenalni Blic strip, dnevni horoskop, arhivu svih dogadjaja'
  15.     publisher             = 'RINGIER d.o.o.'
  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.     masthead_url          = 'http://www.blic.rs/resources/images/header/header_back.png'
  22.     language              = 'sr'
  23.     publication_type      = 'newspaper'
  24.     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: Georgia, serif1, serif} .article_description{font-family: Arial, sans1, sans-serif} .img_full{float: none} img{margin-bottom: 0.8em} '
  25.  
  26.     conversion_options = {
  27.                           'comment'  : description
  28.                         , 'tags'     : category
  29.                         , 'publisher': publisher
  30.                         , 'language' : language
  31.                         }
  32.  
  33.     preprocess_regexps = [(re.compile(u'\u0110'), lambda match: u'\u00D0')]
  34.     remove_tags_before = dict(name='div', attrs={'id':'article_info'})
  35.     remove_tags        = [dict(name=['object','link'])]
  36.     remove_attributes  = ['width','height']
  37.  
  38.     feeds              = [(u'Danasnje Vesti', u'http://www.blic.rs/rss/danasnje-vesti')]
  39.  
  40.  
  41.     def print_version(self, url):
  42.         return url + '/print'
  43.  
  44.     def preprocess_html(self, soup):
  45.         for item in soup.findAll(style=True):
  46.             del item['style']    
  47.         return self.adeify_images(soup)
  48.