可抓包查看上传接口信息,以下为例
代码实现如下
def upload():url="xxx"# 抓包获取的文件的file信息files = {"file":("keai.png",open("1.png",'rb'),"image/png")}# 抓包获取到的表单信息data={"fileMd5":"fileMd5Computed","chunks":1,"chunk": 0,"id":0,"lastModifiedDate":"1669536432","filename":"1.png","size":5465}to=login()headers={"token":to}resp = quest('post', url,json=data,files=files,headers=headers))
上传成功后返回
{"status":1,"data":{"fileid":"MDAwMDAwMDAwMLOGz5mGua-xhM5-mQ","ext":"https://assets.ketangpai/openapiv5/Public/Common/img/fileicon/file_ext_big_txt.png","ext_s":"https://assets.ketangpai/openapiv5/Public/Common/img/fileicon/file_ext_big_txt.png","ext_type":"txt","size":"5.21KB","name":","url":"https://downloadv5.ketangpai/File/download/id/MDAwMDAwMDAwMLOGz5mGua-xhM5-mQ/expires/1681627904/sign/af312c88f0fc1777fe955b10f01e6e598506fab8/token/e5dad8ce0c41c1ecce2b1de6b3512f5a6ed0b6b16872c6d4582c195ba3c99346/uid/MDAwMDAwMDAwMLSsrZiGubNphNtyoQ.html","date":"2023-04-16 12:51","rurl":"https://openapiv5.ketangpai/PluginApp/to/id/MDAwMDAwMDAwMLOGz5mGua-xhM5-mQ/expires/1681627904/sign/af312c88f0fc1777fe955b10f01e6e598506fab8/token/e5dad8ce0c41c1ecce2b1de6b3512f5a6ed0b6b16872c6d4582c195ba3c99346/uid/MDAwMDAwMDAwMLSsrZiGubNphNtyoQ.html"},"code":12003,"message":"u4e0au4f20u6210u529f"}
本文发布于:2024-01-28 01:42:14,感谢您对本站的认可!
本文链接:https://www.4u4v.net/it/17063773383908.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
留言与评论(共有 0 条评论) |