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

  1. from __future__ import with_statement
  2. __license__ = 'GPL 3'
  3. __copyright__ = 'zotzot'
  4. __docformat__ = 'restructuredtext en'
  5.  
  6. from calibre.web.feeds.news import BasicNewsRecipe
  7.  
  8.  
  9. class Oregonian(BasicNewsRecipe):
  10.     title = u'The Oregonian'
  11.     oldest_article = 2
  12.     max_articles_per_feed = 100
  13.     language = 'en'
  14.     __author__ = 'Zotzot'
  15.     description = 'Portland, Oregon local newspaper'
  16.     publisher = 'Advance Publications'
  17.     category = 'news, Portland'
  18.     cover_url = 'http://bit.ly/gUgxGd'
  19.     no_stylesheets = True
  20.     masthead_url = 'http://bit.ly/eocL70'
  21.     remove_tags = [dict(name='div', attrs={'class':['footer', 'content']})]
  22.     use_embedded_content = False
  23.     remove_tags_before = dict(id='article')
  24.     remove_tags_after = dict(id='article')
  25.     feeds = [
  26. #(u'Timbers', u'feed://blog.oregonlive.com/timbers_impact/atom.xml'),
  27. (u'News', u'http://blog.oregonlive.com/news_impact/atom.xml'),
  28. (u'Opinion', u'http://blog.oregonlive.com/opinion_impact/atom.xml'),
  29. (u'Living', u'http://blog.oregonlive.com/living_impact/atom.xml'),
  30. (u'Sports', u'http://blog.oregonlive.com/sports_impact/atom.xml'),
  31. (u'Business', u'http://blog.oregonlive.com/business_impact/atom.xml')]
  32.  
  33.     extra_css = '''
  34.                     h1{font-family:Arial,Helvetica,sans-serif; font-weight:bold;font-size:large;}
  35.                     h2{font-family:Arial,Helvetica,sans-serif; font-weight:normal;font-size:small;}
  36.                     p{font-family:Arial,Helvetica,sans-serif;font-size:small;}
  37.                     body{font-family:Helvetica,Arial,sans-serif;font-size:small;}
  38. '''
  39.  
  40.  
  41. def get_article_url(self, article):
  42.         url = BasicNewsRecipe.get_article_url(self, article)
  43.         if '/video/' not in url:
  44.             return url
  45.