From a0942198acb97419569a83bd10ce4462cfaf8155 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 17 May 2011 13:06:56 -0600 Subject: [PATCH] Good to Know by Anonymous --- recipes/good_to_know.recipe | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 recipes/good_to_know.recipe diff --git a/recipes/good_to_know.recipe b/recipes/good_to_know.recipe new file mode 100644 index 000000000000..cf374128ce32 --- /dev/null +++ b/recipes/good_to_know.recipe @@ -0,0 +1,32 @@ +from calibre.web.feeds.news import BasicNewsRecipe + +class AdvancedUserRecipe1305547242(BasicNewsRecipe): + title = u'Good to Know (uk)' + oldest_article = 14 + max_articles_per_feed = 100 + no_stylesheets = True + use_embedded_content = False + remove_javascript = True + __author__ = 'Anonymous' + language = 'en_GB' + remove_tags = [dict(name='div', attrs={'class':'articles_footer', 'class':'printoptions'})] + + def print_version(self, url): + return url + '/print/1' + + def preprocess_html(self, soup): + for alink in soup.findAll('a'): + if alink.string is not None: + tstr = alink.string + alink.replaceWith(tstr) + return soup + + feeds = [ (u'Family Conception Advice', u'http://www.goodtoknow.co.uk/feeds/family.rss'), + (u'Family Health Advice', u'http://www.goodtoknow.co.uk/feeds/health.rss'), + (u'Diet Advice', u'http://www.goodtoknow.co.uk/feeds/diet.rss'), + (u'Food Advice', u'http://www.goodtoknow.co.uk/feeds/food.rss'), + (u'Sex Advice', u'http://www.goodtoknow.co.uk/feeds/sex.rss'), + (u'Easy Exercise', u'http://www.goodtoknow.co.uk/feeds/easyexercise.rss'), + (u'Recipes', u'http://www.goodtoknow.co.uk/feeds/recipes.rss'), + (u'Food Quick-tips', u'http://www.goodtoknow.co.uk/feeds/foodquicktips.rss'), + ]