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

  1. #!/usr/bin/python
  2.  
  3. from calibre.web.feeds.news import BasicNewsRecipe
  4. import re
  5.  
  6. class AdvancedUserRecipe1307556816(BasicNewsRecipe):
  7.     title          = u'Geek and Poke'
  8.     __author__     = u'DrMerry'
  9.     description    = u'Geek and Poke Cartoons'
  10.     oldest_article = 31
  11.     max_articles_per_feed = 100
  12.     language       = u'en'
  13.     simultaneous_downloads = 5
  14.     #delay          = 1
  15.     timefmt        = ' [%A, %d %B, %Y]'
  16.     summary_length = -1
  17.     no_stylesheets = True
  18.     cover_url = 'http://geekandpoke.typepad.com/aboutcoders.jpeg'
  19.     remove_javascript = True
  20.     remove_empty_feeds = True
  21.     publication_type = 'blog'
  22.  
  23.     preprocess_regexps = [ (re.compile(r'(<p> </p>|<iframe.*</iframe>|<a[^>]*>Tweet</a>|<a[^>]*>|</a>)', re.DOTALL|re.IGNORECASE),lambda match: ''),
  24.                                           (re.compile(r'( |  )', re.DOTALL|re.IGNORECASE),lambda match: ' '),
  25.                                           (re.compile(r'<br( /)?>(<br( /)?>)+', re.DOTALL|re.IGNORECASE),lambda match: '<br>')
  26.                                          ]
  27.  
  28.     extra_css = 'body, h3, p, h2, h1, div, span{margin:0px} h2.date-header {font-size: 0.7em; color:#eee;} h3.entry-header{font-size: 1.0em} div.entry-body{font-size: 0.9em}'
  29.  
  30.  
  31.     remove_tags_before = dict(name='h2', attrs={'class':'date-header'})
  32.     remove_tags_after = dict(name='div', attrs={'class':'entry-body'})
  33.  
  34.  
  35.     feeds          = [(u'Geek and Poke', u'http://feeds.feedburner.com/GeekAndPoke?format=xml')]
  36.