Quote:
Originally Posted by mean_gene
Anyone know the syntax for accessing the different feed elements?
|
There are 4 elements in an article of a feed - This will print them:
Code:
def parse_feeds (self):
feeds = BasicNewsRecipe.parse_feeds(self)
for feed in feeds:
for article in feed.articles[:]:
print 'article.title is: ', article.title
print 'article.url is: ', article.url
print 'article.date is: ', article.date
print 'article.text_summary is: ', article.text_summary
return feeds
A Feed has a feed name and a list of articles. You set the feed name in the recipe.
Quote:
I'm guessing this is the title of the article:
curarticle.title
|
"title" is the title and "curarticle" is the article being processed in a loop - see above.
Quote:
Not sure what this is:
curarticle.title.upper
|
The title has been forced to upper case.