【发布时间】:2022-08-18 23:12:29
【问题描述】:
使用 python,我试图在以下响应中访问 \"load Time\": \"value\":
response = requests.get(f\'https://www.webpagetest.org/jsonResult.phptest=220816_AiDcTD_FHD&average=0&standard=0&requests=0&lighthouse=0&pretty=1\').json()
\"data\": {
\"id\": \"220816_AiDcTD_FHD\",
\"url\": \"https:\\/\\/www.ghdhair.com\",
\"summary\": \"https:\\/\\/www.webpagetest.org\\/results.php?test=220816_AiDcTD_FHD\",
\"testUrl\": \"https:\\/\\/www.ghdhair.com\",
\"location\": \"ec2-us-east-1:Chrome\",
\"successfulRVRuns\": 1,
\"average\": {
\"firstView\": {
\"loadTime\": 7435,
\"docTime\": 7435,
\"fullyLoaded\": 13841,
\"bytesOut\": 170730,
\"bytesOutDoc\": 127136,
它继续。
我想从中访问 \"loadTime\" 值。我怎样才能做到这一点?
谢谢
-
response[\'data\'][\'average\'][\'firstView\'][\'loadTime\']…?!