鱼C论坛

 找回密码
 立即注册
查看: 1319|回复: 4

不知道为什么这个字典没法提取出来键值

[复制链接]
发表于 2018-1-23 14:55:17 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能^_^

您需要 登录 才可以下载或查看,没有账号?立即注册

x
    try:
         result = json.loads(image.group(1))
         print(result)
         im = result.get('sub_images')
    except:
        print('没有"sub_images"')


字典如下:
{"count":30,"sub_images":[{"url":"http:\/\/p3.pstatp.com\/origin\/1c620004b14726ce5d0a","width":1024,"url_list":[{"url":"http:\/\/p3.pstatp.com\/origin\/1c620004b14726ce5d0a"},{"url":"http:\/\/pb9.pstatp.com\/origin\/1c620004b14726ce5d0a"},{"url":"http:\/\/pb1.pstatp.com\/origin\/1c620004b14726ce5d0a"}],"uri":"origin\/1c620004b14726ce5d0a","height":683},{"url":"http:\/\/p1.pstatp.com\/origin\/1c660004abe020ca0e60","width":1024,"url_list":[{"url":"http:\/\/p1.pstatp.com\/origin\/1c660004abe020ca0e60"},{"url":"http:\/\/pb3.pstatp.com\/origin\/1c660004abe020ca0e60"},{"url":"http:\/\/pb9.pstatp.com\/origin\/1c660004abe020ca0e60"}],"uri":"origin\/1c660004abe020ca0e60","height":683},{"url":"http:\/\/p3.pstatp.com\/origin\/1c670000c8e4dc91a0c2","width":1024,"url_list":[{"url":"http:\/\/p3.pstatp.com\/origin\/1c670000c8e4dc91a0c2"},{"url":"http:\/\/pb9.pstatp.com\/origin\/1c670000c8e4dc91a0c2"},{"url":"http:\/\/pb1.pstatp.com\/origin\/1c670000c8e4dc91a0c2"}],"uri":"origin\/1c670000c8e4dc91a0c2","height":683},{"url":"http:\/\/p3.pstatp.com\/origin\/1c660004abe4eec83391","width":1024,"url_list":[{"url":"http:\/\/p3.pstatp.com\/origin\/1c660004abe4eec83391"},{"url":"http:\/\/pb9.pstatp.com\/origin\/1c660004abe4eec83391"},{"url":"http:\/\/pb1.pstatp.com\/origin\/1c660004abe4eec83391"}],"uri":"origin\/1c660004abe4eec83391","height":1534},{"url":"http:\/\/p1.pstatp.com\/origin\/1c640004d20f92bdd69b","width":1024,"url_list":[{"url":"http:\/\/p1.pstatp.com\/origin\/1c640004d20f92bdd69b"},{"url":"http:\/\/pb3.pstatp.com\/origin\/1c640004d20f92bdd69b"},{"url":"http:\/\/pb9.pstatp.com\/origin\/1c640004d20f92bdd69b"}],"uri":"origin\/1c640004d20f92bdd69b","height":1534},{"url":"http:\/\/p9.pstatp.com\/origin\/1c660004abe6c2a18f43","width":1024,"url_list":[{"url":"http:\/\/p9.pstatp.com\/origin\/1c660004abe6c2a18f43"},{"url":"http:\/\/pb1.pstatp.com\/origin\/1c660004abe6c2a18f43"},{"url":"http:\/\/pb3.pstatp.com\/origin\/1c660004abe6c2a18f43"}],"uri":"origin\/1c660004abe6c2a18f43","height":683},{"url":"http:\/\/p1.pstatp.com\/origin\/1c650004c03bf38d7093","width":1024,"url_list":[{"url":"http:\/\/p1.pstatp.com\/origin\/1c650004c03bf38d7093"},{"url":"http:\/\/pb3.pstatp.com\/origin\/1c650004c03bf38d7093"},{"url":"http:\/\/pb9.pstatp.com\/origin\/1c650004c03bf38d7093"}],"uri":"origin\/1c650004c03bf38d7093","height":1534},{"url":"http:\/\/p1.pstatp.com\/origin\/1c680000bb7c53534db8","width":1024,"url_list":[{"url":"http:\/\/p1.pstatp.com\/origin\/1c680000bb7c53534db8"},{"url":"http:\/\/pb3.pstatp.com\/origin\/1c680000bb7c53534db8"},{"url":"http:\/\/pb9.pstatp.com\/origin\/1c680000bb7c53534db8"}],"uri":"origin\/1c680000bb7c53534db8","height":1534},{"url":"http:\/\/p3.pstatp.com\/origin\/1c670000c8ec665e60d3","width":1024,"url_list":[{"url":"http:\/\/p3.pstatp.com\/origin\/1c670000c8ec665e60d3"},{"url":"http:\/\/pb9.pstatp.com\/origin\/1c670000c8ec665e60d3"},{"url":"http:\/\/pb1.pstatp.com\/origin\/1c670000c8ec665e60d3"}],"uri":"origin\/1c670000c8ec665e60d3","height":1534},{"url":"http:\/\/p3.pstatp.com\/origin\/1c660004abedc61a500a","width":1024,"url_list":[{"url":"http:\/\/p3.pstatp.com\/origin\/1c660004abedc61a500a"},{"url":"http:\/\/pb9.pstatp.com\/origin\/1c660004abedc61a500a"},{"url":"http:\/\/pb1.pstatp.com\/origin\/1c660004abedc61a500a"}],"uri":"origin\/1c660004abedc61a500a","height":683},{"url":"http:\/\/p3.pstatp.com\/origin\/1c670000c8ef9b03e9e5","width":1024,"url_list":[{"url":"http:\/\/p3.pstatp.com\/origin\/1c670000c8ef9b03e9e5"},{"url":"http:\/\/pb9.pstatp.com\/origin\/1c670000c8ef9b03e9e5"},{"url":"http:\/\/pb1.pstatp.com\/origin\/1c670000c8ef9b03e9e5"}],"uri":"origin\/1c670000c8ef9b03e9e5","height":683},{"url":"http:\/\/p1.pstatp.com\/origin\/1c680000bb7f7648d154","width":1024,"url_list":[{"url":"http:\/\/p1.pstatp.com\/origin\/1c680000bb7f7648d154"},{"url":"http:\/\/pb3.pstatp.com\/origin\/1c680000bb7f7648d154"},{"url":"http:\/\/pb9.pstatp.com\/origin\/1c680000bb7f7648d154"}],"uri":"origin\/1c680000bb7f7648d154","height":1534},{"url":"http:\/\/p3.pstatp.com\/origin\/1c620004b14f4c29f246","width":1024,"url_list":[{"url":"http:\/\/p3.pstatp.com\/origin\/1c620004b14f4c29f246"},{"url":"http:\/\/pb9.pstatp.com\/origin\/1c620004b14f4c29f246"},{"url":"http:\/\/pb1.pstatp.com\/origin\/1c620004b14f4c29f246"}],"uri":"origin\/1c620004b14f4c29f246","height":683},{"url":"http:\/\/p3.pstatp.com\/origin\/1c670000c8f0675ac626","width":1024,"url_list":[{"url":"http:\/\/p3.pstatp.com\/origin\/1c670000c8f0675ac626"},{"url":"http:\/\/pb9.pstatp.com\/origin\/1c670000c8f0675ac626"},{"url":"http:\/\/pb1.pstatp.com\/origin\/1c670000c8f0675ac626"}],"uri":"origin\/1c670000c8f0675ac626","height":1534},{"url":"http:\/\/p1.pstatp.com\/origin\/1c680000bb8416a356cf","width":1024,"url_list":[{"url":"http:\/\/p1.pstatp.com\/origin\/1c680000bb8416a356cf"},{"url":"http:\/\/pb3.pstatp.com\/origin\/1c680000bb8416a356cf"},{"url":"http:\/\/pb9.pstatp.com\/origin\/1c680000bb8416a356cf"}],"uri":"origin\/1c680000bb8416a356cf","height":1534},{"url":"http:\/\/p3.pstatp.com\/origin\/1c680000bb85edb36c2c","width":1024,"url_list":[{"url":"http:\/\/p3.pstatp.com\/origin\/1c680000bb85edb36c2c"},{"url":"http:\/\/pb9.pstatp.com\/origin\/1c680000bb85edb36c2c"},{"url":"http:\/\/pb1.pstatp.com\/origin\/1c680000bb85edb36c2c"}],"uri":"origin\/1c680000bb85edb36c2c","height":683},{"url":"http:\/\/p3.pstatp.com\/origin\/1c650004c0450d9acf6f","width":1024,"url_list":[{"url":"http:\/\/p3.pstatp.com\/origin\/1c650004c0450d9acf6f"},{"url":"http:\/\/pb9.pstatp.com\/origin\/1c650004c0450d9acf6f"},{"url":"http:\/\/pb1.pstatp.com\/origin\/1c650004c0450d9acf6f"}],"uri":"origin\/1c650004c0450d9acf6f","height":1534},{"url":"http:\/\/p3.pstatp.com\/origin\/1c640004d21a4016b930","width":1024,"url_list":[{"url":"http:\/\/p3.pstatp.com\/origin\/1c640004d21a4016b930"},{"url":"http:\/\/pb9.pstatp.com\/origin\/1c640004d21a4016b930"},{"url":"http:\/\/pb1.pstatp.com\/origin\/1c640004d21a4016b930"}],"uri":"origin\/1c640004d21a4016b930","height":659},{"url":"http:\/\/p3.pstatp.com\/origin\/1c620004b15726dcacf8","width":1024,"url_list":[{"url":"http:\/\/p3.pstatp.com\/origin\/1c620004b15726dcacf8"},{"url":"http:\/\/pb9.pstatp.com\/origin\/1c620004b15726dcacf8"},{"url":"http:\/\/pb1.pstatp.com\/origin\/1c620004b15726dcacf8"}],"uri":"origin\/1c620004b15726dcacf8","height":683},{"url":"http:\/\/p1.pstatp.com\/origin\/1c670000c8f5c096cebb","width":1024,"url_list":[{"url":"http:\/\/p1.pstatp.com\/origin\/1c670000c8f5c096cebb"},{"url":"http:\/\/pb3.pstatp.com\/origin\/1c670000c8f5c096cebb"},{"url":"http:\/\/pb9.pstatp.com\/origin\/1c670000c8f5c096cebb"}],"uri":"origin\/1c670000c8f5c096cebb","height":683},{"url":"http:\/\/p1.pstatp.com\/origin\/1c620004b159881f3a9b","width":1024,"url_list":[{"url":"http:\/\/p1.pstatp.com\/origin\/1c620004b159881f3a9b"},{"url":"http:\/\/pb3.pstatp.com\/origin\/1c620004b159881f3a9b"},{"url":"http:\/\/pb9.pstatp.com\/origin\/1c620004b159881f3a9b"}],"uri":"origin\/1c620004b159881f3a9b","height":683},{"url":"http:\/\/p9.pstatp.com\/origin\/1c650004c0475459349e","width":1024,"url_list":[{"url":"http:\/\/p9.pstatp.com\/origin\/1c650004c0475459349e"},{"url":"http:\/\/pb1.pstatp.com\/origin\/1c650004c0475459349e"},{"url":"http:\/\/pb3.pstatp.com\/origin\/1c650004c0475459349e"}],"uri":"origin\/1c650004c0475459349e","height":1534},{"url":"http:\/\/p3.pstatp.com\/origin\/1c6300061a6f25dd0c6c","width":1024,"url_list":[{"url":"http:\/\/p3.pstatp.com\/origin\/1c6300061a6f25dd0c6c"},{"url":"http:\/\/pb9.pstatp.com\/origin\/1c6300061a6f25dd0c6c"},{"url":"http:\/\/pb1.pstatp.com\/origin\/1c6300061a6f25dd0c6c"}],"uri":"origin\/1c6300061a6f25dd0c6c","height":683},{"url":"http:\/\/p3.pstatp.com\/origin\/1c660004abf57d498d61","width":1024,"url_list":[{"url":"http:\/\/p3.pstatp.com\/origin\/1c660004abf57d498d61"},{"url":"http:\/\/pb9.pstatp.com\/origin\/1c660004abf57d498d61"},{"url":"http:\/\/pb1.pstatp.com\/origin\/1c660004abf57d498d61"}],"uri":"origin\/1c660004abf57d498d61","height":683},{"url":"http:\/\/p3.pstatp.com\/origin\/1c680000bb88b3956d89","width":1024,"url_list":[{"url":"http:\/\/p3.pstatp.com\/origin\/1c680000bb88b3956d89"},{"url":"http:\/\/pb9.pstatp.com\/origin\/1c680000bb88b3956d89"},{"url":"http:\/\/pb1.pstatp.com\/origin\/1c680000bb88b3956d89"}],"uri":"origin\/1c680000bb88b3956d89","height":683},{"url":"http:\/\/p1.pstatp.com\/origin\/1c680000bb8a808fb072","width":1024,"url_list":[{"url":"http:\/\/p1.pstatp.com\/origin\/1c680000bb8a808fb072"},{"url":"http:\/\/pb3.pstatp.com\/origin\/1c680000bb8a808fb072"},{"url":"http:\/\/pb9.pstatp.com\/origin\/1c680000bb8a808fb072"}],"uri":"origin\/1c680000bb8a808fb072","height":618},{"url":"http:\/\/p3.pstatp.com\/origin\/1c620004b15c2be0bc54","width":1024,"url_list":[{"url":"http:\/\/p3.pstatp.com\/origin\/1c620004b15c2be0bc54"},{"url":"http:\/\/pb9.pstatp.com\/origin\/1c620004b15c2be0bc54"},{"url":"http:\/\/pb1.pstatp.com\/origin\/1c620004b15c2be0bc54"}],"uri":"origin\/1c620004b15c2be0bc54","height":683},{"url":"http:\/\/p3.pstatp.com\/origin\/1c640004d21fa3f9de4f","width":1024,"url_list":[{"url":"http:\/\/p3.pstatp.com\/origin\/1c640004d21fa3f9de4f"},{"url":"http:\/\/pb9.pstatp.com\/origin\/1c640004d21fa3f9de4f"},{"url":"http:\/\/pb1.pstatp.com\/origin\/1c640004d21fa3f9de4f"}],"uri":"origin\/1c640004d21fa3f9de4f","height":1534},{"url":"http:\/\/p3.pstatp.com\/origin\/1c670000c8faefa6543b","width":1024,"url_list":[{"url":"http:\/\/p3.pstatp.com\/origin\/1c670000c8faefa6543b"},{"url":"http:\/\/pb9.pstatp.com\/origin\/1c670000c8faefa6543b"},{"url":"http:\/\/pb1.pstatp.com\/origin\/1c670000c8faefa6543b"}],"uri":"origin\/1c670000c8faefa6543b","height":683},{"url":"http:\/\/p9.pstatp.com\/origin\/1c640004d2208620c44d","width":1024,"url_list":[{"url":"http:\/\/p9.pstatp.com\/origin\/1c640004d2208620c44d"},{"url":"http:\/\/pb1.pstatp.com\/origin\/1c640004d2208620c44d"},{"url":"http:\/\/pb3.pstatp.com\/origin\/1c640004d2208620c44d"}],"uri":"origin\/1c640004d2208620c44d","height":683}],"max_img_width":1024,"labels":["\u7ea2\u65d7\u6e20","\u6587\u7269","\u65f6\u653f"],"sub_abstracts":["\u7ea2\u65d7\u6e20\u662f20\u4e16\u7eaa60\u5e74\u4ee3\uff0c\u6797\u53bf\uff08\u4eca\u6cb3\u5357\u6797\u5dde\u5e02\uff09\u4eba\u6c11\u5728\u6781\u5176\u8270\u96be\u7684\u6761\u4ef6\u4e0b\uff0c\u4ece\u592a\u884c\u5c71\u8170\u4fee\u5efa\u7684\u5f15\u6f33\u5165\u6797\u5de5\u7a0b\uff0c\u5168\u56fd\u91cd\u70b9\u6587\u7269\u4fdd\u62a4\u5355\u4f4d\uff0c\u88ab\u4eba\u79f0\u4e4b\u4e3a\u201c\u4eba\u5de5\u5929\u6cb3\u201d\u3002","\u7ea2\u65d7\u6e20\u7684\u5efa\u6210\uff0c\u5f7b\u5e95\u6539\u5584\u4e86\u6797\u53bf\u4eba\u6c11\u9760\u5929\u7b49\u96e8\u7684\u6076\u52a3\u751f\u5b58\u73af\u5883\uff0c\u89e3\u51b3\u4e8656.7\u4e07\u4eba\u548c37\u4e07\u5934\u5bb6\u755c\u5403\u6c34\u95ee\u9898\uff0c54\u4e07\u4ea9\u8015\u5730\u5f97\u5230\u704c\u6e89\uff0c\u7cae\u98df\u4ea9\u4ea7\u7531\u7ea2\u65d7\u6e20\u672a\u4fee\u5efa\u521d\u671f\u7684100\u516c\u65a4\u589e\u52a0\u52301991\u5e74\u7684476.3\u516c\u65a4\u3002\u88ab\u6797\u5dde\u4eba\u6c11\u79f0\u4e3a\"\u751f\u547d\u6e20\"\u3001\"\u5e78\u798f\u6e20\"\u3002\u7ea2\u65d7\u6e20\u662f\u6bdb\u6cfd\u4e1c\u65f6\u4ee3\u6797\u5dde\u4eba\u6c11\u53d1\u626c\u201c\u81ea\u529b\u66f4\u751f\uff0c\u8270\u82e6\u521b\u4e1a\u3001\u81ea\u5f3a\u4e0d\u606f\u3001\u5f00\u62d3\u521b\u65b0\u3001\u56e2\u7ed3\u534f\u4f5c\u3001\u65e0\u79c1\u5949\u732e\u201d\u7cbe\u795e\u521b\u9020\u7684\u4e00\u5927\u5947\u8ff9\uff0c\u5168\u957f1500\u516c\u91cc\u7684\u7ea2\u65d7\u6e20\uff0c\u7ed3\u675f\u4e86\u6797\u5dde\u5341\u5e74\u4e5d\u65f1\u3001\u6c34\u8d35\u5982\u6cb9\u7684\u82e6"," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "],"sub_titles":["\u4eba\u95f4\u5947\u8ff9\u2014\u2014\u7ea2\u65d7\u6e20","\u4eba\u95f4\u5947\u8ff9\u2014\u2014\u7ea2\u65d7\u6e20","\u4eba\u95f4\u5947\u8ff9\u2014\u2014\u7ea2\u65d7\u6e20","\u4eba\u95f4\u5947\u8ff9\u2014\u2014\u7ea2\u65d7\u6e20","\u4eba\u95f4\u5947\u8ff9\u2014\u2014\u7ea2\u65d7\u6e20","\u4eba\u95f4\u5947\u8ff9\u2014\u2014\u7ea2\u65d7\u6e20","\u4eba\u95f4\u5947\u8ff9\u2014\u2014\u7ea2\u65d7\u6e20","\u4eba\u95f4\u5947\u8ff9\u2014\u2014\u7ea2\u65d7\u6e20","\u4eba\u95f4\u5947\u8ff9\u2014\u2014\u7ea2\u65d7\u6e20","\u4eba\u95f4\u5947\u8ff9\u2014\u2014\u7ea2\u65d7\u6e20","\u4eba\u95f4\u5947\u8ff9\u2014\u2014\u7ea2\u65d7\u6e20","\u4eba\u95f4\u5947\u8ff9\u2014\u2014\u7ea2\u65d7\u6e20","\u4eba\u95f4\u5947\u8ff9\u2014\u2014\u7ea2\u65d7\u6e20","\u4eba\u95f4\u5947\u8ff9\u2014\u2014\u7ea2\u65d7\u6e20","\u4eba\u95f4\u5947\u8ff9\u2014\u2014\u7ea2\u65d7\u6e20","\u4eba\u95f4\u5947\u8ff9\u2014\u2014\u7ea2\u65d7\u6e20","\u4eba\u95f4\u5947\u8ff9\u2014\u2014\u7ea2\u65d7\u6e20","\u4eba\u95f4\u5947\u8ff9\u2014\u2014\u7ea2\u65d7\u6e20","\u4eba\u95f4\u5947\u8ff9\u2014\u2014\u7ea2\u65d7\u6e20","\u4eba\u95f4\u5947\u8ff9\u2014\u2014\u7ea2\u65d7\u6e20","\u4eba\u95f4\u5947\u8ff9\u2014\u2014\u7ea2\u65d7\u6e20","\u4eba\u95f4\u5947\u8ff9\u2014\u2014\u7ea2\u65d7\u6e20","\u4eba\u95f4\u5947\u8ff9\u2014\u2014\u7ea2\u65d7\u6e20","\u4eba\u95f4\u5947\u8ff9\u2014\u2014\u7ea2\u65d7\u6e20","\u4eba\u95f4\u5947\u8ff9\u2014\u2014\u7ea2\u65d7\u6e20","\u4eba\u95f4\u5947\u8ff9\u2014\u2014\u7ea2\u65d7\u6e20","\u4eba\u95f4\u5947\u8ff9\u2014\u2014\u7ea2\u65d7\u6e20","\u4eba\u95f4\u5947\u8ff9\u2014\u2014\u7ea2\u65d7\u6e20","\u4eba\u95f4\u5947\u8ff9\u2014\u2014\u7ea2\u65d7\u6e20","\u4eba\u95f4\u5947\u8ff9\u2014\u2014\u7ea2\u65d7\u6e20"]}




求大神帮助



想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

发表于 2018-1-23 16:03:54 | 显示全部楼层
看着就头疼
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2018-1-23 16:12:08 | 显示全部楼层
问题问全一点撒,,完全不知道你想问啥
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2018-1-23 20:36:30 | 显示全部楼层
同感!
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

 楼主| 发表于 2018-1-23 22:33:55 | 显示全部楼层
SylarPu 发表于 2018-1-23 16:12
问题问全一点撒,,完全不知道你想问啥

最上面的是代码。。。。
idle可以解析下面的字典
pycharm里解析不了。。。。
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2024-12-23 18:50

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表