View Single Post
Old 05-30-2011, 04:29 PM   #6
scissors
Addict
scissors ought to be getting tired of karma fortunes by now.scissors ought to be getting tired of karma fortunes by now.scissors ought to be getting tired of karma fortunes by now.scissors ought to be getting tired of karma fortunes by now.scissors ought to be getting tired of karma fortunes by now.scissors ought to be getting tired of karma fortunes by now.scissors ought to be getting tired of karma fortunes by now.scissors ought to be getting tired of karma fortunes by now.scissors ought to be getting tired of karma fortunes by now.scissors ought to be getting tired of karma fortunes by now.scissors ought to be getting tired of karma fortunes by now.
 
Posts: 241
Karma: 1001369
Join Date: Sep 2010
Device: prs300, kindle keyboard 3g
Editted again... More pictures grabbed from feeds...

======================================
Spoiler:

Code:
class AdvancedUserRecipe1306097511(BasicNewsRecipe):
    title          = u'Metro UK'
    remove_empty_feeds = True
    no_stylesheets = True
    oldest_article = 1
    max_articles_per_feed = 200

    author = 'Dave Asbury'
    simultaneous_downloads= 3

    masthead_url        = 'http://e-edition.metro.co.uk/images/metro_logo.gif'
    
    keep_only_tags = [
                    dict(attrs={'class':['img-cnt figure']}),
	dict(attrs={'class':['art-img']}),
                    dict(name='h1'),
	dict(name='h2', attrs={'class':'h2'}),
                    dict(name='div', attrs={'class':'art-lft'})
	]
    remove_tags    = [dict(name='div', attrs={'class':[ 'metroCommentFormWrap',
                                                                             'commentForm', 'metroCommentInnerWrap',
			                 'art-rgt','pluck-app pluck-comm','news m12 clrd clr-l p5t', 'flt-r' ]})]
        
    feeds          = [
		(u'News', u'http://www.metro.co.uk/rss/news/'), (u'Money', u'http://www.metro.co.uk/rss/money/'), (u'Sport', u'http://www.metro.co.uk/rss/sport/'), (u'Film', u'http://www.metro.co.uk/rss/metrolife/film/'), (u'Music', u'http://www.metro.co.uk/rss/metrolife/music/'), (u'TV', u'http://www.metro.co.uk/rss/tv/'), (u'Showbiz', u'http://www.metro.co.uk/rss/showbiz/'), (u'Weird News', u'http://www.metro.co.uk/rss/weird/'), (u'Travel', u'http://www.metro.co.uk/rss/travel/'), (u'Lifestyle', u'http://www.metro.co.uk/rss/lifestyle/'), (u'Books', u'http://www.metro.co.uk/rss/lifestyle/books/'), (u'Food', u'http://www.metro.co.uk/rss/lifestyle/restaurants/')]

Last edited by scissors; 06-19-2011 at 01:58 PM. Reason: remove_empty_feeds = True added
scissors is offline   Reply With Quote