Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Recipes

Notices

Reply
 
Thread Tools Search this Thread
Old 05-17-2011, 01:53 PM   #1
xXxXxXxXxXx
Enthusiast
xXxXxXxXxXx began at the beginning.
 
Posts: 37
Karma: 10
Join Date: Apr 2011
Device: none
Recipe for goodtoknow.co.uk

Code:
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__  = 'xXxXxXxXxXx'
    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'),
                    ]
xXxXxXxXxXx is offline   Reply With Quote
Reply

Tags
recipe


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Recipe works when mocked up as Python file, fails when converted to Recipe ode Recipes 7 09-04-2011 04:57 AM
New Recipe UtahJames Recipes 2 04-18-2011 06:32 PM
Recipe Please gagw Recipes 0 01-24-2011 07:24 AM
recipe please Torx Recipes 0 01-22-2011 12:18 PM
Recipe Help hellonewman Calibre 1 01-23-2010 03:45 AM


All times are GMT -4. The time now is 02:13 PM.


MobileRead.com is a privately owned, operated and funded community.