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

  1. #!/usr/bin/env  python
  2.  
  3. __license__   = 'GPL v3'
  4. __copyright__ = '2008, Darko Miletic <darko.miletic at gmail.com>'
  5. '''
  6. liberation.fr
  7. '''
  8.  
  9. from calibre.web.feeds.news import BasicNewsRecipe
  10.  
  11. class Liberation(BasicNewsRecipe):
  12.     title                 = u'Liberation'
  13.     __author__            = 'Darko Miletic'
  14.     description           = 'News from France'
  15.     language = 'fr'
  16.  
  17.     oldest_article        = 7
  18.     max_articles_per_feed = 100
  19.     no_stylesheets        = True
  20.     use_embedded_content  = False
  21.     
  22.     html2lrf_options = ['--base-font-size', '10']
  23.  
  24.     keep_only_tags    = [
  25.                            dict(name='h1')
  26.                           ,dict(name='div', attrs={'class':'articleContent'})
  27.                           ,dict(name='div', attrs={'class':'entry'})
  28.                         ]
  29.     remove_tags    = [
  30.                         dict(name='p', attrs={'class':'clear'})
  31.                        ,dict(name='ul', attrs={'class':'floatLeft clear'})
  32.                        ,dict(name='div', attrs={'class':'clear floatRight'})
  33.                        ,dict(name='object')
  34.                      ]
  35.     
  36.     feeds          = [
  37.                          (u'La une', u'http://www.liberation.fr/rss/laune')
  38.                         ,(u'Monde' , u'http://www.liberation.fr/rss/monde')
  39.                         ,(u'Sports', u'http://www.liberation.fr/rss/sports')
  40.                      ]
  41.