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

  1. from calibre.web.feeds.news import BasicNewsRecipe
  2.  
  3. class AdvancedUserRecipe1313512459(BasicNewsRecipe):
  4.     title          = u'NTVSpor'
  5.     __author__            = 'A Erdogan'
  6.     description           = 'News from Turkey'
  7.     publisher             = 'NTVSpor.net'
  8.     category              = 'sports, Turkey'
  9.     oldest_article        = 7
  10.     max_articles_per_feed = 100
  11.     no_stylesheets        = True
  12.     use_embedded_content  = False
  13.     masthead_url          = 'http://www.ntvspor.net/HTML/r/i/l.png'
  14.     language              = 'tr'
  15.  
  16.     extra_css             ='''
  17.                         body{font-family:Arial,Helvetica,sans-serif; font-size:small; align:left;  color:#000000}
  18.                         h1{font-size:large; color:#000000}
  19.          h2{font-size:small; color:#000000}
  20.         p{font-size:small; color:#000000}
  21.                      '''
  22.  
  23.     conversion_options = {
  24.                           'comment'   : description
  25.                         , 'tags'      : category
  26.                         , 'publisher' : publisher
  27.                         , 'language'  : language
  28.                         }
  29.  
  30.     remove_tags = [dict(name=['embed','il','ul','iframe','object','link','base']), dict(name='div', attrs={'id':'contentPhotoGallery'}), dict(name='div', attrs={'class':'SocialMediaWrapper'}), dict(name='div', attrs={'class':'grid2'}), dict(name='div', attrs={'class':'grid8'}), dict(name='div', attrs={'id':'anonsBar'}), dict(name='div', attrs={'id':'header'})]
  31.     remove_tags_before = dict(name='h1', attrs={'style':['margin-top: 6px;']})
  32.     remove_tags_after = dict(name='div', attrs={'id':'newsBody'})
  33.     feeds          = [(u'NTVSpor', u'http://www.ntvspor.net/Rss/anasayfa')]
  34.  
  35.