I have used feedparser library in python to read rss feeds from particlar URL.
the feeds are received in 'fee' variable by using following line of code:
fee = feedparser.parse('http://www.indiatimes.com/r/python/.rss')
fee
feeds_all = feedparser.parse('http://www.indiatimes.com/r/python/.rss')
I am not sure what kind of json it is, but the functions .keys()
and .values()
work fine on it. What I did is, for dynamically getting names of keys that are previously unknown (above answer gives static keys and it's values, you need to know the key names in advance), fee.keys()
and it worked!
So, the answer is in the following lines: channel_keys = feeds_all.keys()
and feed_keys = feeds_all.feed.keys()
, for getting value of those keys, feed_values = feeds_all.feed.values()
....