开发者

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

开发者 https://www.devze.com 2023-02-12 02:19 出处:网络
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

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

精彩评论

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

关注公众号