开发者

python feedparser <georss:point>55.32967 10.236263</georss:point>

I am trying to the universal feedparser to parse <georss:point>55.32967 10.236263</georss:point> but it's not working. I have tried accessing item['georss'], item['georss:point'] and item['point'] all resulting in a KeyError.

I have tried to follow can feedparser p开发者_开发知识库arse geo-rss but it's still not working


Feedparser does not support georss but there seems to be a patch available at http://code.google.com/p/feedparser/issues/detail?id=62


I had a look at the keys for each entry and found that the georss:point tag is listed as georss_point, so you can call the coordinate value for the entry with either feed.entry[i].georss_point or feed.entry[i]['georss_point'].

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜