- http 请求:
response = requests.get(url)
dat = json.loads(response.text)
- 终端请求
output = subprocess.run(url, stdout=subprocess.PIPE, shell=True)
strJson = output.stdout.decode()
strJsonloads = json.loads(strJson)
response = requests.get(url)
dat = json.loads(response.text)
output = subprocess.run(url, stdout=subprocess.PIPE, shell=True)
strJson = output.stdout.decode()
strJsonloads = json.loads(strJson)
本文标题:【python】http和终端请求
本文链接:https://www.haomeiwen.com/subject/ovwkzltx.html
网友评论