|
|
#1 |
|
Enthusiast
![]() Posts: 41
Karma: 10
Join Date: Dec 2010
Device: Kindle 3G/Wifi
|
Feed Elements
Anyone know the syntax for accessing the different feed elements?
There's a bit of info in the sample code sticky but it doesn't work (might be missing an import...feedparser?). I'm guessing this is the title of the article: curarticle.title Not sure what this is: curarticle.title.upper This is probably used for loops: curfeed.articles |
|
|
|
|
|
#2 | |||
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Quote:
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
Quote:
Quote:
Last edited by Starson17; 12-12-2010 at 12:12 PM. |
|||
|
|
|
| Advert | |
|
|
|
|
#3 |
|
Enthusiast
![]() Posts: 41
Karma: 10
Join Date: Dec 2010
Device: Kindle 3G/Wifi
|
Thanks for the quick response; that helps a lot.
Is "feed.title" the title of the feed? Also, does python care where I place the parse_feeds block of code (i.e. above/below the "feeds=[]" section) |
|
|
|
|
|
#4 | ||
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Quote:
Quote:
|
||
|
|
|
|
|
#5 | |
|
Enthusiast
![]() Posts: 41
Karma: 10
Join Date: Dec 2010
Device: Kindle 3G/Wifi
|
Quote:
|
|
|
|
|
| Advert | |
|
|
|
|
#6 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
|
|
|
|
|
|
#7 |
|
Enthusiast
![]() Posts: 41
Karma: 10
Join Date: Dec 2010
Device: Kindle 3G/Wifi
|
Yeah I've been reading through the sticky code to get some ideas. I should have something working for me soon...
|
|
|
|
![]() |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| HTML5 elements in iPad magazines | Chang | Workshop | 5 | 06-22-2011 05:25 AM |
| Styling Elements in CSS - ADE and Sony | toskpro | Sony Reader | 0 | 07-19-2010 02:55 PM |
| Help me out: First use of these 4 sci-fi literary elements | Steven Lake | Writers' Corner | 7 | 12-31-2009 11:02 AM |
| ePub elements pulled from the internet? | melisen | ePub | 1 | 12-08-2009 10:59 PM |
| Windows 7 To Incorporate Multitouch Elements | NatCh | News | 22 | 05-29-2008 01:15 PM |