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

  1. from calibre.web.feeds.news import BasicNewsRecipe
  2.  
  3. class AdvancedUserRecipe1305547242(BasicNewsRecipe):
  4.     title          = u'Good to Know (uk)'
  5.     oldest_article = 14
  6.     max_articles_per_feed = 100
  7.     no_stylesheets         = True
  8.     use_embedded_content   = False
  9.     remove_javascript      = True
  10.     __author__  = 'Anonymous'
  11.     language = 'en_GB'
  12.     remove_tags = [dict(name='div', attrs={'class':'articles_footer', 'class':'printoptions'})]
  13.  
  14.     def print_version(self, url):
  15.         return url + '/print/1'
  16.  
  17.     def preprocess_html(self, soup):
  18.         for alink in soup.findAll('a'):
  19.             if alink.string is not None:
  20.                tstr = alink.string
  21.                alink.replaceWith(tstr)
  22.         return soup
  23.  
  24.     feeds  = [    (u'Family Conception Advice', u'http://www.goodtoknow.co.uk/feeds/family.rss'),
  25.     (u'Family Health Advice', u'http://www.goodtoknow.co.uk/feeds/health.rss'),
  26.     (u'Diet Advice', u'http://www.goodtoknow.co.uk/feeds/diet.rss'),
  27.                     (u'Food Advice', u'http://www.goodtoknow.co.uk/feeds/food.rss'),
  28.                     (u'Sex Advice', u'http://www.goodtoknow.co.uk/feeds/sex.rss'),
  29.                     (u'Easy Exercise', u'http://www.goodtoknow.co.uk/feeds/easyexercise.rss'),
  30.                     (u'Recipes', u'http://www.goodtoknow.co.uk/feeds/recipes.rss'),
  31.                     (u'Food Quick-tips', u'http://www.goodtoknow.co.uk/feeds/foodquicktips.rss'),
  32.                     ]
  33.