Thread: vBulletin
View Single Post
Old 05-23-2011, 02:25 PM   #10
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by wintoid View Post
Great! Now my recipe looks like this:

class AdvancedUserRecipe1305902518(BasicNewsRecipe):
title = u'Rangefinder Forum'
oldest_article = 7
max_articles_per_feed = 100

feeds = [(u'RFF', u'http://www.rangefinderforum.com/forums/external.php?type=rss2')]
use_embedded_content= False
keep_only_tags = [dict(name='div', attrs={'id':'posts'})]

However, the problem now is that the RSS is only returning 15 articles, but how has it determined that 15 is "since I last read it"?
An RSS feed page has links to web pages called "articles." In your case the article is the forum page with one or more posts. Your recipe gets everything on that article page. It gets all the articles on the feed. So, if there were 15 links on your feed page, you'd get 15 articles.

Trying to write a recipe to only retrieve unread articles will be much more complex. I don't even know if the RSS page has that info. I suspect it doesn't. Have you looked into the RSS aggregator recipes like Google Reader?
Starson17 is offline   Reply With Quote