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

  1. #!/usr/bin/env  python
  2. __license__   = 'GPL v3'
  3. __copyright__ = '2008, Kovid Goyal kovid@kovidgoyal.net'
  4. __docformat__ = 'restructuredtext en'
  5.  
  6. '''
  7. http://www.news.com.au/dailytelegraph/
  8. '''
  9. from calibre.web.feeds.news import BasicNewsRecipe
  10.  
  11. class DailyTelegraph(BasicNewsRecipe):
  12.     title          = u'Daily Telegraph'
  13.     __author__     = u'Adrian G.'
  14.     language = 'en_AU'
  15.  
  16.     description    = u'Daily Telegraph News'
  17.     oldest_article = 5
  18.     max_articles_per_feed = 100
  19.     no_stylesheets = True
  20.     use_embedded_content = False
  21.     no_javascript = True
  22.  
  23.  
  24.     timefmt               = ' [%A, %d %B, %Y]'
  25.     encoding = 'utf-8'
  26.  
  27.     keep_only_tags = [dict(name='div', attrs ={'id':'story'})]
  28.  
  29.     extra_css = '''
  30.                   h1{font-family:Georgia,"Times New Roman",Times,serif; font-weight:bold; font-size:large;}
  31.                   .cT-storyDetails{font-family:Arial,Helvetica,sans-serif; color:#666666;font-size:x-small;}
  32.                   .articleBody{font-family:Arial,Helvetica,sans-serif; color:black;font-size:small;}
  33.                   .cT-imageLandscape{font-family:Arial,Helvetica,sans-serif; color:#333333 ;font-size:x-small;}
  34.                   .source{font-family:Arial,Helvetica,sans-serif; color:#333333 ;font-size:xx-small;}
  35.                   #content{font-family:Arial,Helvetica,sans-serif;font-size:x-small;}
  36.                   .pageprint{font-family:Arial,Helvetica,sans-serif;font-size:small;}
  37.                   #bylineDetails{font-family:Arial,Helvetica,sans-serif; color:#666666;font-size:x-small;}
  38.                   .featurePic-wide{font-family:Arial,Helvetica,sans-serif;font-size:x-small;}
  39.                   #idfeaturepic{font-family:Arial,Helvetica,sans-serif;font-size:x-small;}
  40.                   h3{font-family:Georgia,"Times New Roman",Times,serif; font-size:small;}
  41.                   h2{font-family:Georgia,"Times New Roman",Times,serif; font-size:small;}
  42.                   h4{font-family:Georgia,"Times New Roman",Times,serif; font-size:small;}
  43.                   h5{font-family:Georgia,"Times New Roman",Times,serif; font-size:small;}
  44.                   body{font-family:Arial,Helvetica,sans-serif; font-size:x-small;}
  45.                 '''
  46.  
  47.     remove_tags     = [
  48.                         dict(name='div', attrs ={'id':['comments','story-related-coverage']}),
  49.                         dict(name='div', attrs ={'class':['story-header-tools','story-footer','story-extras','story-related']}),
  50.                         dict(name='div', attrs ={'class':['promo-image','story-extras story-extras-2']}),
  51.                         dict(name='div', attrs ={'class':['assistive sidebar-jump']})
  52.                        ]
  53.  
  54.     feeds          = [
  55.                       (u'Top Stories', u'http://feeds.news.com.au/public/rss/2.0/dtele_top_stories_253.xml'),
  56.                       (u'National News', u'http://feeds.news.com.au/public/rss/2.0/dtele_national_news_202.xml'),
  57.                       (u'World News', u'http://feeds.news.com.au/public/rss/2.0/dtele_world_news_204.xml'),
  58.                       (u'NSW and ACT', u'http://feeds.news.com.au/public/rss/2.0/dtele_nswact_225.xml'),
  59.                       (u'Arts', u'http://feeds.news.com.au/public/rss/2.0/dtele_art_444.xml'),
  60.                       (u'Business News', u'http://feeds.news.com.au/public/rss/2.0/dtele_business_226.xml'),
  61.                       (u'Entertainment News', u'http://feeds.news.com.au/public/rss/2.0/dtele_entertainment_news_201.xml'),
  62.                       (u'Lifestyle News', u'http://feeds.news.com.au/public/rss/2.0/dtele_lifestyle_227.xml'),
  63.                       (u'Music', u'http://feeds.news.com.au/public/rss/2.0/dtele_music_441.xml'),
  64.                       (u'Sport',
  65.                           u'http://feeds.news.com.au/public/rss/2.0/dtele_sport_203.xml'),
  66.                       (u'Soccer',
  67.                           u'http://feeds.news.com.au/public/rss/2.0/dtele_sports_soccer_344.xml'),
  68.                       (u'Rugby Union',
  69.                           u'http://feeds.news.com.au/public/rss/2.0/dtele_sports_rugby_union_342.xml'),
  70.                       (u'Property Confidential', u'http://feeds.news.com.au/public/rss/2.0/dtele_property_confidential_463.xml'),
  71.                       (u'Property - Your Space', u'http://feeds.news.com.au/public/rss/2.0/dtele_property_yourspace_462.xml'),
  72.                       (u'Confidential News', u'http://feeds.news.com.au/public/rss/2.0/dtele_entertainment_confidential_252.xml'),
  73.                       (u'Confidential Biographies', u'http://feeds.news.com.au/public/rss/2.0/dtele_confidential_biographies_491.xml'),
  74.                       (u'Confidential Galleries', u'http://feeds.news.com.au/public/rss/2.0/dtele_confidential_galleries_483.xml'),
  75.                       ]
  76.  
  77.  
  78.