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

  1. from calibre.web.feeds.news import BasicNewsRecipe
  2.  
  3. class LondonFreePress(BasicNewsRecipe):
  4.     title          = u'London Free Press'
  5.     __author__            = 'rty'
  6.     oldest_article = 4
  7.     max_articles_per_feed = 100
  8.  
  9.     pubisher  = 'lfpress.com'
  10.     description           = 'Ontario Canada Newspaper'
  11.     category              = 'News, Ontario, Canada'
  12.     remove_javascript = True
  13.     use_embedded_content   = False
  14.     no_stylesheets = True
  15.     language = 'en_CA'
  16.     encoding               = 'utf-8'
  17.     conversion_options = {'linearize_tables':True}
  18.  
  19.     feeds          = [
  20.                     (u'News', u'http://www.lfpress.com/news/rss.xml'),
  21.                     (u'Comment', u'http://www.lfpress.com/comment/rss.xml'),
  22.                     (u'Entertainment', u'http://www.lfpress.com/entertainment/rss.xml '),
  23.                     (u'Money', u'http://www.lfpress.com/money/rss.xml '),
  24.                     (u'Life', u'http://www.lfpress.com/life/rss.xml '),
  25.                     (u'Sports', u'http://www.lfpress.com/sports/rss.xml ')
  26.                         ]
  27.  
  28.     keep_only_tags = [
  29.                               dict(name='div', attrs={'id':'article'}),
  30.                                ]
  31.     remove_tags = [
  32.                     dict(name='div', attrs={'id':'commentsBottom'}),
  33.                     dict(name='div', attrs={'class':['leftBox','bottomBox clear']}),
  34.        dict(name='ul', attrs={'class':'tabs dl contentSwap'}),
  35.                          ]
  36.     remove_tags_after = [
  37.                   dict(name='div', attrs={'class':'bottomBox clear'}),
  38.                          ]
  39.