home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2011 January / maximum-cd-2011-01.iso / DiscContents / calibre-0.7.26.msi / file_4013 < prev    next >
Encoding:
Text File  |  2010-10-21  |  2.3 KB  |  58 lines

  1. __license__   = 'GPL v3'
  2. __copyright__ = '2010, Darko Miletic <darko.miletic at gmail.com>'
  3. '''
  4. foxnews.com
  5. '''
  6.  
  7. from calibre.web.feeds.news import BasicNewsRecipe
  8.  
  9. class FoxNews(BasicNewsRecipe):
  10.     title                 = 'FOX News'
  11.     __author__            = 'Darko Miletic'
  12.     description           = 'Breaking News from FOX'
  13.     publisher             = 'FOXNews.com'
  14.     category              = 'news, breaking news, latest news, current news, world news, national news, USA'
  15.     oldest_article        = 2
  16.     max_articles_per_feed = 200
  17.     no_stylesheets        = True
  18.     encoding              = 'utf8'
  19.     use_embedded_content  = False
  20.     language              = 'en'
  21.     publication_type      = 'newsportal'
  22.     remove_empty_feeds    = True
  23.     extra_css             = """
  24.                                 body{font-family: Arial,sans-serif }
  25.                                 .caption{font-size: x-small}
  26.                             """
  27.  
  28.     conversion_options = {
  29.                           'comment'   : description
  30.                         , 'tags'      : category
  31.                         , 'publisher' : publisher
  32.                         , 'language'  : language
  33.                         }
  34.  
  35.     remove_attributes = ['xmlns','lang']
  36.  
  37.     remove_tags = [
  38.                      dict(name=['object','embed','link','script','iframe','meta','base'])
  39.                     ,dict(attrs={'class':['user-control','url-description','ad-context']})
  40.                   ]
  41.  
  42.     remove_tags_before=dict(name='h1')
  43.     remove_tags_after =dict(attrs={'class':'url-description'})
  44.  
  45.     feeds = [
  46.               (u'Latest Headlines', u'http://feeds.foxnews.com/foxnews/latest'        )
  47.              ,(u'National'        , u'http://feeds.foxnews.com/foxnews/national'      )
  48.              ,(u'World'           , u'http://feeds.foxnews.com/foxnews/world'         )
  49.              ,(u'Politics'        , u'http://feeds.foxnews.com/foxnews/politics'      )
  50.              ,(u'Business'        , u'http://feeds.foxnews.com/foxnews/business'      )
  51.              ,(u'SciTech'         , u'http://feeds.foxnews.com/foxnews/scitech'       )
  52.              ,(u'Health'          , u'http://feeds.foxnews.com/foxnews/health'        )
  53.              ,(u'Entertainment'   , u'http://feeds.foxnews.com/foxnews/entertainment' )
  54.             ]
  55.  
  56.     def print_version(self, url):
  57.         return url + 'print'
  58.