如何解析json輸出只從數據獲取列表,然後將輸出添加到google.com/confidetial和列表中的其他字符串中。 所以我的JSON放出來,我將其命名爲「文本」解析json文件並將字符串添加到URL
text = {"success":true,"code":200,"data":["Confidential","L1","Secret","Secret123","foobar","maret1","maret2","posted","rontest"],"errs":[],"debugs":[]}.
我所希望做的是讓下唯一的數據列表。到目前爲止,我得到的腳本是把整個json放到了外面。
json.loads(text)
print text
output = urllib.urlopen("http://google.com" % text)
print output.geturl()
print output.read()
真棒感謝的作品。謝謝 –