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

  1. #!/usr/bin/env  python
  2.  
  3. __license__   = 'GPL v3'
  4. __copyright__ = '2008, Lionel Bergeret <lbergeret at gmail.com>'
  5. '''
  6. lalibre.be
  7. '''
  8.  
  9. from calibre import strftime
  10. from calibre.web.feeds.news import BasicNewsRecipe
  11.  
  12. class LaLibre(BasicNewsRecipe):
  13.     title                 = u'La Libre Belgique'
  14.     __author__            = u'Lionel Bergeret'
  15.     description           = u'News from Belgium in French'
  16.     publisher             = u'lalibre.be'
  17.     category              = 'news, Belgium'
  18.     oldest_article        = 3
  19.     language              = 'fr_BE'
  20.  
  21.     max_articles_per_feed = 20
  22.     no_stylesheets        = True
  23.     use_embedded_content  = False
  24.     timefmt               = ' [%d %b %Y]'
  25.  
  26.     keep_only_tags = [
  27.      dict(name = 'div', attrs = {'id': 'articleHat'})
  28.     ,dict(name = 'p', attrs = {'id': 'publicationDate'})
  29.         ,dict(name = 'div', attrs = {'id': 'articleText'})
  30.     ]
  31.  
  32.     feeds = [
  33.          (u'L\'actu'           , u'http://www.lalibre.be/rss/?section=10' )
  34.         ,(u'Culture'           , u'http://www.lalibre.be/rss/?section=5' )
  35.         ,(u'Economie'          , u'http://www.lalibre.be/rss/?section=3' )
  36.         ,(u'Libre Entreprise'  , u'http://www.lalibre.be/rss/?section=904' )
  37.         ,(u'Sports'            , u'http://www.lalibre.be/rss/?section=2' )
  38.         ,(u'Societe'           , u'http://www.lalibre.be/rss/?section=12' )
  39.     ]
  40.  
  41.     def get_cover_url(self):
  42.         cover_url = strftime('http://pdf-online.lalibre.be/pdfonline/image/%Y%m%d/llb_%Y%m%d_nam_libre_001.pdf.L.jpg')
  43.         return cover_url
  44.