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, 03:46 PM   #1
xXxXxXxXxXx
Enthusiast
xXxXxXxXxXx began at the beginning.
 
Posts: 37
Karma: 10
Join Date: Apr 2011
Device: none
Recipe for Glamour (US)

Code:
class AdvancedUserRecipe1305547242(BasicNewsRecipe):
    title          = u'Glamour (US)'
    oldest_article = 21
    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 + '?printable=true'

    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'All Fashion', u'http://feeds.glamour.com/glamour/all_fashion'),
                    (u'All Beauty', u'http://feeds.glamour.com/glamour/all_beauty'),
                    (u'All Sex, Love & Life', u'http://feeds.glamour.com/glamour/sex_love_life'),
                    (u'All Health & Fitness', u'http://feeds.glamour.com/glamour/health_fitness'),
                    (u'Shopping', u'http://feeds.glamour.com/glamour/shopping'),
                    (u'Slaves to Fashion blog', u'http://feeds.glamour.com/glamour/slavestofashion'),
                    (u'The Girls in the Beauty Department', u'http://feeds.glamour.com/glamour/thegirlsinthebeautydepartment'),
                    (u'Smitten blog', u'http://feeds.glamour.com/glamour/smitten'),
                    (u'Save the Date', u'http://feeds.feedburner.com/glamour/save-the-date'),
                    (u'Single-ish blog', u'http://feeds.glamour.com/glamour/glamoursingle-ish'),
                    (u'Save the Date', u'http://feeds.feedburner.com/glamour/save-the-date'),
                    (u'Vitamin G blog', u'http://feeds.glamour.com/glamour/vitamin-g'),
                    (u'Margarita Shapes Up blog', u'http://feeds.glamour.com/glamour/margaritashapesup'),
                    (u'Little Miss Fortune blog', u'http://feeds.glamour.com/glamour/little-miss-fortune'),
 ]
xXxXxXxXxXx is offline   Reply With Quote
Reply


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 3 04-18-2011 08:02 PM
Need Help with Recipe UtahJames Recipes 1 04-12-2011 09:50 AM
New recipe kiklop74 Recipes 0 10-05-2010 04:41 PM
iPad BusinessInsider: iPad Helps Glamour Produce Its "Biggest Issue In 20 Years" kjk Apple Devices 0 07-19-2010 11:09 AM


All times are GMT -4. The time now is 09:25 AM.


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