我该如何从这个JSON字符串中打印出"url"的内容。
我希望在Python控制台上打印它。如果有影响,那个JSON来自https://api.thecatapi.com/v1/images/search。
[{"breeds":[],"id":"bkv","url":"https://cdn2.thecatapi.com/images/bkv.jpg","width":800,"height":600}]
我希望在Python控制台上打印它。如果有影响,那个JSON来自https://api.thecatapi.com/v1/images/search。
response = requests.get('https://api.thecatapi.com/v1/images/search')
x = response.json()
json_obj = json.loads(x)
for i in json_obj:
print(i["url"])