import requests
import json
url='*'
files={'image':('test.png',open('127.jpg','rb'),'image/png')}
res = requests.post(url,files=files)
print(type(res.text),type(res.json()))
security_dict = res.json()
security = security_dict['code']
print(security)
网友评论