#百度jk图片 import requests # 请求头 header={"user-agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.182 Safari/537.36"} # xhr --》 request URL url = ' https://image.baidu.com/search/acjson?tn=resultjson_com&logid=10797260325576477402&ipn=rj&ct=201326592&is=&fp=result&queryWord=jk&cl=2&lm=-1&ie=utf-8&oe=utf-8&adpicid=&st=-1&z=&ic=0&hd=&latest=©right=&word=jk&s=&se=&tab=&width=&height=&face=0&istype=2&qc=&nc=1&fr=&expermode=&force=&pn=120&rn=30&gsm=78&1619507486970=' resp = requests.get(url,headers=header) #发送get请求 json_data = resp.json() #内置的json解码器 print(json_data)