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

  1. import re
  2. from calibre.web.feeds.news import BasicNewsRecipe
  3.  
  4. class autogids(BasicNewsRecipe):
  5.     title = u'Automatiseringgids IT'
  6.     oldest_article = 7
  7.     __author__     = 'DrMerry'
  8.     description    = 'IT-nieuws van Automatiseringgids'
  9.     language       = 'nl'
  10.     publisher              = 'AutomatiseringGids'
  11.     category               = 'Nieuws, IT, Nederlandstalig'
  12.     simultaneous_downloads = 5
  13.     #delay          = 1
  14.     timefmt        = ' [%A, %d %B, %Y]'
  15.     #timefmt        = ''
  16.     no_stylesheets = True
  17.     remove_javascript = True
  18.     remove_empty_feeds = True
  19.     publication_type = 'newspaper'
  20.     encoding              = 'utf-8'
  21.     cover_url    = 'http://www.automatiseringgids.nl/siteimg/header_logo.gif'
  22.     keep_only_tags = [dict(id=['content'])]
  23.     extra_css = '.artikelheader {font-size:0.8em; color: #666;} .artikelintro {font-weight:bold} div.imgArticle {float: right; margin: 0 0em 1em 1em; display: block; position: relative; } \
  24.         h2 { margin: 0 0 0.5em; min-height: 30px; font-size: 1.5em; letter-spacing: -0.2px; margin: 0 0 0.5em; color: black; font-weight: bold; line-height: 1.2em; padding: 4px 3px 0; }'
  25.  
  26.  
  27.  
  28.     remove_tags = [dict(name='div', attrs={'id':['loginbox','reactiecollapsible','reactiebox']}),
  29.         dict(name='div', attrs={'class':['column_a','column_c','bannerfullsize','reactieheader','reactiecollapsible','formulier','artikel_headeroptions']}),
  30.         dict(name='ul', attrs={'class':['highlightlist']}),
  31.         dict(name='input', attrs={'type':['button']}),
  32.         dict(name='div', attrs={'style':['display:block; width:428px; height:30px; float:left;']}),
  33.     ]
  34.     preprocess_regexps = [
  35.         (re.compile(r'(<h3>Reacties</h3>|<h2>Zie ook:</h2>|<div style=".*</div>|<a[^>]*>|</a>)', re.DOTALL|re.IGNORECASE),
  36.         lambda match: ''),
  37.     ]
  38.  
  39.     feeds          = [(u'Actueel', u'http://www.automatiseringgids.nl/rss.aspx')]
  40.