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

  1. __license__   = 'GPL v3'
  2. __copyright__ = '2008, Kovid Goyal <kovid at kovidgoyal.net>'
  3.  
  4. '''
  5. Fetch tomshardware.
  6. '''
  7.  
  8. from calibre.web.feeds.news import BasicNewsRecipe
  9.  
  10.  
  11. class cdnet(BasicNewsRecipe):
  12.  
  13.     title = 'tomshardware'
  14.     description = 'computer news in german'
  15.     __author__ = 'Oliver Niesner'
  16.     use_embedded_content   = False
  17.     timefmt = ' [%d %b %Y]'
  18.     max_articles_per_feed = 50
  19.     no_stylesheets = True
  20.     encoding = 'utf-8'
  21.     language = 'de'
  22.  
  23.  
  24.     remove_tags = [dict(id='outside-advert'),
  25.            dict(id='advertRightWhite'),
  26.            dict(id='header-advert'),
  27.            dict(id='header-banner'),
  28.            dict(id='header-menu'),
  29.            dict(id='header-top'),
  30.            dict(id='header-tools'),
  31.            dict(id='nbComment'),
  32.            dict(id='commentTools'),
  33.            dict(id='internalSidebar'),
  34.            dict(id='header-news-infos'),
  35.            dict(id='header-news-tools'),
  36.            dict(id='breadcrumbs'),
  37.            dict(id='emailTools'),
  38.            dict(id='bookmarkTools'),
  39.            dict(id='printTools'),
  40.            dict(id='header-nextNews'),
  41.            dict(id='commentsBox'),
  42.            dict(id='showComments'),
  43.            dict(id='footer'),
  44.            dict(id=''),
  45.            dict(name='div', attrs={'class':'pyjama'}),
  46.            dict(name='div', attrs={'class':'basicCentral'}),
  47.            dict(name='li', attrs={'class':'simplePagination-previous'}),
  48.            dict(name='form', attrs={'id':'commentForm'}),
  49.            dict(name='href', attrs={'class':'comment'}),
  50.            dict(name='div', attrs={'class':'greyBoxR clearfix'}),
  51.            dict(name='div', attrs={'class':'greyBoxL clearfix'}),
  52.            dict(name='div', attrs={'class':'greyBox clearfix'}),
  53.            dict(name='div', attrs={'class':'labelized'}),
  54.            dict(id='')]
  55.     #remove_tags_before = [dict(id='header-news-title')]
  56.     remove_tags_after = [dict(name='div', attrs={'class':'labelized'})]
  57.     #remove_tags_after = [dict(name='div', attrs={'class':'intelliTXT'})]
  58.  
  59.     feeds =  [ ('tomshardware', 'http://www.tomshardware.com/de/feeds/rss2/tom-s-hardware-de,12-1.xml') ]
  60.  
  61.  
  62.  
  63.  
  64.