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_mail.recipe < prev    next >
Encoding:
Text File  |  2011-09-09  |  2.1 KB  |  51 lines

  1. from calibre.web.feeds.news import BasicNewsRecipe
  2.  
  3. class TheDailyMail(BasicNewsRecipe):
  4.     title          = u'The Daily Mail'
  5.     oldest_article = 2
  6.     language = 'en_GB'
  7.  
  8.     author = 'RufusA and Sujata Raman'
  9.     simultaneous_downloads= 1
  10.     max_articles_per_feed = 50
  11.  
  12.     extra_css = '''#js-article-text{font-family:Arial,Helvetica,sans-serif;}
  13.                     h1{font-size:x-large; font-weight:bold;}
  14.                     a.author{color:#003580;}
  15.                     .js-article-text{font-size:50%;}
  16.                     .imageCaption{font-size:x-small; font-weight:bold}
  17.  
  18.  
  19.                 '''
  20.  
  21.     remove_tags = [ dict(name='div', attrs={'class':['article-icon-links-container','print-or-mail-links cleared',
  22.                                                      'social-links cleared','explore-links','relatedItems','intellicrumbs box','travel','moduleHalf']}),
  23.                     dict(name='div', attrs={'id':['link-unit-wrapper','pushdown-ad','reader-comments','googleAds',]}),
  24.                     dict(name='h3', attrs={'class':['social-links-title']}),
  25.                      dict(name='span', attrs={'class':['clickToEnlargeTop']}),
  26.                     ]
  27.     #remove_tags_before  = dict(name='div', attrs={'id':'content'})
  28.     keep_only_tags = [dict(name='div', attrs={'id':'js-article-text'})]
  29.  
  30.     no_stylesheets = True
  31.  
  32.     feeds          = [
  33.     (u'Home', u'http://www.dailymail.co.uk/home/index.rss'),
  34.     (u'News', u'http://www.dailymail.co.uk/news/index.rss'),
  35.     (u'Sport', u'http://www.dailymail.co.uk/sport/index.rss'),
  36.     (u'TV and Showbiz', u'http://www.dailymail.co.uk/tvshowbiz/index.rss'),
  37.     (u'Femail', u'http://www.dailymail.co.uk/femail/index.rss'),
  38.     (u'Health', u'http://www.dailymail.co.uk/health/index.rss'),
  39.     (u'Science and Technology', u'http://www.dailymail.co.uk/sciencetech/index.rss'),
  40.     (u'Money', u'http://www.dailymail.co.uk/money/index.rss'),
  41.     (u'Property', u'http://www.dailymail.co.uk/property/index.rss'),
  42.     (u'Motoring', u'http://www.dailymail.co.uk/motoring/index.rss'),
  43.     (u'Travel', u'http://www.dailymail.co.uk/travel/index.rss')
  44.         ]
  45.  
  46.     #def print_version(self, url):
  47.     #    main = url.partition('?')[0]
  48.     #    return main + '?printingPage=true'
  49.  
  50.  
  51.