Message139888
| Author |
juan.gonzalez |
| Recipients |
georg.brandl, jcea, juan.gonzalez |
| Date |
2011年07月05日.16:06:24 |
| SpamBayes Score |
0.00012515257 |
| Marked as misclassified |
No |
| Message-id |
<1309881985.27.0.794028777652.issue12492@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Hi Georg,
This is the python code listing:
from RSS import ns, CollectionChannel, TrackingChannel
#Create a tracking channel, which is a data structure that
#Indexes RSS data by item URL
tc = TrackingChannel()
str = 'j3-nspire-prd-validation'
index = 0
#Returns the RSSParser instance used, which can usually be ignored
#tc.parse("http://www.python.org/channews.rdf")
tc.parse("http://pdt-california.eps.ti.com:8080/dashboard/rss.xml")
RSS10_TITLE = (ns.rss10, 'title')
RSS10_DESC = (ns.rss10, 'description')
#You can also use tc.keys()
items = tc.listItems()
for item in items:
#Each item is a (url, order_index) tuple
url = item[index]
#print "RSS Item:",
#str.find(str, beg=0 end=len(string))
if url.find(str) > 0:
print "RSS Item:", url
break;
#Get all the data for the item as a Python dictionary
index = index + 1
item_data = tc.getItem(item)
print "Title:", item_data.get(RSS10_TITLE, "(none)")
print "Description:", item_data.get(RSS10_DESC, "(none)") |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2011年07月05日 16:06:25 | juan.gonzalez | set | recipients:
+ juan.gonzalez, georg.brandl, jcea |
| 2011年07月05日 16:06:25 | juan.gonzalez | set | messageid: <1309881985.27.0.794028777652.issue12492@psf.upfronthosting.co.za> |
| 2011年07月05日 16:06:24 | juan.gonzalez | link | issue12492 messages |
| 2011年07月05日 16:06:24 | juan.gonzalez | create |
|