【发布时间】:2021-07-22 06:03:51
【问题描述】:
我想从以下响应(查找)中提取 id 的所有值。
代码:
findings= requests.get('https://api.probely.com/targets/TaargetID/findings/36',headers={"Content-Type": "application/json", "Authorization": "JWT <Token>"})
finding=findings.json()
发现:
{"count":45,
"page_total":5,
"page":1,
"length":10,
"results":[
{
"id":79,
"target":
{"id":"RzXFSNHH3qUY","name":"","site":
{"id":"2qk21XKLrKyf","url":"https://test-
0.ox.qa.prbly.win",.....},
"(...)"
,
"id":12,
"target":
"(...)"
,
"id":32,
"target":
"(...)"
,"(....)"
}
]
}
我想得到一个这样的 id 数组:
id=[79,12,32]
如何提取这些 Id 并存储在数组中?
【问题讨论】:
标签: python curl python-requests libcurl pycurl