处理图片下载流程
This commit is contained in:
@@ -75,5 +75,46 @@ def send_file():
|
||||
|
||||
print(response.text)
|
||||
|
||||
|
||||
def download_file():
|
||||
|
||||
url = "/message/downloadImage"
|
||||
xml ="""<?xml version="1.0"?>
|
||||
<msg>
|
||||
<img aeskey="d57b3b0f339a09014a615d2b20e2cb67" encryver="1" cdnthumbaeskey="d57b3b0f339a09014a615d2b20e2cb67" cdnthumburl="3057020100044b304902010002042d0c366c02032dd08502046e5c0caf0204680f0e52042435323638326132302d646232652d343361632d616638332d6632373561343166353039360204052418020201000405004c537500" cdnthumblength="8976" cdnthumbheight="69" cdnthumbwidth="150" cdnmidheight="0" cdnmidwidth="0" cdnhdheight="0" cdnhdwidth="0" cdnmidimgurl="3057020100044b304902010002042d0c366c02032dd08502046e5c0caf0204680f0e52042435323638326132302d646232652d343361632d616638332d6632373561343166353039360204052418020201000405004c537500" length="72485" md5="9a2b154bc39c3148e624693ad1b90d7e" originsourcemd5="9a2b154bc39c3148e624693ad1b90d7e">
|
||||
<secHashInfoBase64 />
|
||||
<live>
|
||||
<duration>0</duration>
|
||||
<size>0</size>
|
||||
<md5 />
|
||||
<fileid />
|
||||
<hdsize>0</hdsize>
|
||||
<hdmd5 />
|
||||
<hdfileid />
|
||||
<stillimagetimems>0</stillimagetimems>
|
||||
</live>
|
||||
</img>
|
||||
<platform_signature />
|
||||
<imgdatahash />
|
||||
<ImgSourceInfo>
|
||||
<ImgSourceUrl />
|
||||
<BizType>0</BizType>
|
||||
</ImgSourceInfo>
|
||||
</msg>
|
||||
"""
|
||||
payload = json.dumps({
|
||||
"appId": app_id,
|
||||
"type": 2,
|
||||
"xml": xml
|
||||
})
|
||||
headers = {
|
||||
'X-GEWE-TOKEN': 'cb43f52db27e4a56bb6ec7da54373582',
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
|
||||
response = requests.request("POST", base_url+url, headers=headers, data=payload)
|
||||
|
||||
print(response.text)
|
||||
|
||||
if __name__ == '__main__':
|
||||
set_call_back()
|
||||
download_file()
|
||||
|
||||
Reference in New Issue
Block a user