代码运行结果提示结果如下,
代码如下
import requests
headers={"User-Agent":"Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.26 Safari/537.36 Core/1.63.5977.400 LBBROWSER/10.1.3752.400"}
res_music = requests.get('
https://aiqicha.baidu.com/detail/basicAllDataAjax?pid=43252658652170%27,headers=headers
)
json_music = res_music.json()
list_music = json_music["data"]["basicData"]["insuranceInfo"]
print(list_music)
只提data,也提示keyerror,要怎么修改呢?