View Single Post
Old 08-03-2011, 10:37 AM   #1
rjchew
Junior Member
rjchew began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Aug 2011
Device: Kindle 3
Modifying different feeds in one recipe

Hello, I've just bought a Kindle 3, and am really enjoying using it with calibre to read news and things. I have been trying to create a news source that combines the various blogs I like to read, and email it to my Kindle. I have managed to do this with the following recipe:
Spoiler:
class AdvancedUserRecipe1312376781(BasicNewsRecipe):
title = u'Blogs'
oldest_article = 1
max_articles_per_feed = 200

feeds = [
(u"Guy Fawkes' blog", u'http://feeds2.feedburner.com/guidofawkes'),
(u'Comment is Free', u'http://www.guardian.co.uk/commentisfree/all/rss'),
(u'Political Betting', u'http://politicalbetting.com/index.php/feed/')
]



However, I want to add some more feeds to this recipe, but they need modification to be readable. For example, the Spectator blog works this code:
Spoiler:
class AdvancedUserRecipe1312371137(BasicNewsRecipe):
title = u'Spectator Coffee House'
oldest_article = 7
max_articles_per_feed = 100
no_stylesheets = True
extra_css = '.headline {font-size: x-large;} \n .fact { padding-top: 10pt }'
keep_only_tags = [
dict(name='div', attrs={'class':'text'})]

feeds = [(u'Coffee House', u'http://www.spectator.co.uk/coffeehouse/index.txml')]


Is there anyway I can modify different feeds within the same recipe? So I can make the 'keep_only_tags' for the Spectator blog not affect the other feeds?


I hope this makes sense! I'd be really grateful for any help anyone could offer,
Cheers
rjchew is offline   Reply With Quote