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

  1. __license__   = 'GPL v3'
  2. __copyright__ = '2008, Kovid Goyal <kovid at kovidgoyal.net>'
  3.  
  4. '''
  5. Fetch heise.
  6. '''
  7.  
  8. from calibre.web.feeds.news import BasicNewsRecipe
  9.  
  10.  
  11. class heiseDe(BasicNewsRecipe):
  12.  
  13.     title = 'heise'
  14.     description = 'Computernews from Germany'
  15.     __author__ = 'Oliver Niesner'
  16.     use_embedded_content   = False
  17.     language = 'de'
  18.     timefmt = ' [%d %b %Y]'
  19.     max_articles_per_feed = 40
  20.     no_stylesheets = True
  21.  
  22.     extra_css = '''
  23.     .bild_links, .bild_bu_links {
  24.         float:left;
  25.         line-height:105%;
  26.         margin:12px 1.4em 12px 0;
  27.     }
  28.  
  29.     .bild_rechts, .bild_bu {
  30.             float:right;
  31.             line-height:105%;
  32.             margin:12px 0 12px 1em;
  33.             text-align:right;
  34.     }
  35.  
  36.     .bild_zentriert {
  37.             clear:both;
  38.             line-height:105%;
  39.             margin:.2em auto;
  40.             text-align:center;
  41.     }
  42.  
  43.     span.bild_links, span.bild_rechts, span.bild_zentriert {
  44.             display:block;
  45.     }
  46.     '''
  47.  
  48.     remove_tags = [dict(id='navi_top'),
  49.            dict(id='navi_bottom'),
  50.            dict(id='logo'),
  51.            dict(id='login_suche'),
  52.            dict(id='navi_login'),
  53.            dict(id='navigation'),
  54.            dict(id='breadcrumb'),
  55.            dict(id='adblockerwarnung'),
  56.            dict(id=''),
  57.            dict(id='sitemap'),
  58.            dict(id='bannerzone'),
  59.            dict(name='span', attrs={'class':'rsaquo'}),
  60.            dict(name='div', attrs={'class':'news_logo'}),
  61.            dict(name='div', attrs={'class':'bcadv ISI_IGNORE'}),
  62.            dict(name='p', attrs={'class':'news_option'}),
  63.            dict(name='p', attrs={'class':'news_navi'}),
  64.            dict(name='div', attrs={'class':'news_foren'})]
  65.     remove_tags_after = [dict(name='div', attrs={'class':'news_foren'})]
  66.  
  67.     feeds =  [ ('heise', 'http://www.heise.de/newsticker/heise.rdf') ]
  68.  
  69.  
  70.  
  71.  
  72.