home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2010 November / maximum-cd-2010-11.iso / DiscContents / calibre-0.7.13.msi / file_4051 < prev    next >
Encoding:
Text File  |  2010-08-04  |  2.3 KB  |  50 lines

  1. __license__   = 'GPL v3'
  2. __copyright__ = '2009-2010, Darko Miletic <darko.miletic at gmail.com>'
  3. '''
  4. staradvertiser.com
  5. '''
  6.  
  7. from calibre.web.feeds.news import BasicNewsRecipe
  8.  
  9. class Starbulletin(BasicNewsRecipe):
  10.     title                 = 'Honolulu Star Advertiser'
  11.     __author__            = 'Darko Miletic'
  12.     description           = "Latest national and local Hawaii sports news"
  13.     publisher             = 'Honolulu Star-Advertiser'
  14.     category              = 'news, Honolulu, Hawaii'
  15.     oldest_article        = 2
  16.     max_articles_per_feed = 100
  17.     language              = 'en'
  18.     no_stylesheets        = True
  19.     use_embedded_content  = False
  20.     encoding              = 'utf8'
  21.     publication_type      = 'newspaper'
  22.     extra_css             = ' body{font-family: Verdana,Arial,Helvetica,sans-serif} h1,.brown,.postCredit{color: #663300} .storyDeck{font-size: 1.2em; font-weight: bold} '
  23.  
  24.     conversion_options = {
  25.                           'comment'          : description
  26.                         , 'tags'             : category
  27.                         , 'publisher'        : publisher
  28.                         , 'language'         : language
  29.                         , 'linearize_tables' : True
  30.                         }
  31.  
  32.     remove_tags_before = dict(attrs={'id':'storyTitle'})
  33.     remove_tags_after  = dict(name='div',attrs={'class':'storytext'})
  34.     remove_tags = [
  35.                      dict(name=['object','link','script','span'])
  36.                     ,dict(attrs={'class':'insideStoryImage'})
  37.                     ,dict(attrs={'name':'fb_share'})
  38.                     ,dict(name='div',attrs={'class':'storytext'})
  39.                   ]
  40.  
  41.     feeds = [
  42.               (u'Headlines' , u'http://www.staradvertiser.com/staradvertiser_headlines.rss' )
  43.              ,(u'News'      , u'http://www.staradvertiser.com/news/index.rss'               )
  44.              ,(u'Sports'    , u'http://www.staradvertiser.com/sports/index.rss'             )
  45.              ,(u'Features'  , u'http://www.staradvertiser.com/features/index.rss'           )
  46.              ,(u'Editorials', u'http://www.staradvertiser.com/editorials/index.rss'         )
  47.              ,(u'Business'  , u'http://www.staradvertiser.com/business/index.rss'           )
  48.              ,(u'Travel'    , u'http://www.staradvertiser.com/travel/index.rss'             )
  49.             ]
  50.