0
我需要发送重复的数据请求。正如我听到我不能发送重复,因为请求使用字典,我不能在字典中得到重复。如何用python中的重复数据发送请求?
什么,我需要获得(来自小提琴手嗅日志)
------WebKitFormBoundaryJm0Evrx7PZJnQkNw
Content-Disposition: form-data; name="file[]"; filename=""
Content-Type: application/octet-stream
------WebKitFormBoundaryJm0Evrx7PZJnQkNw
Content-Disposition: form-data; name="file[]"; filename="qwe.txt"
Content-Type: text/plain
example content of file qwe.txt blablabla
我的脚本:
requests.post(url, files={'file[]': open('qwe.txt','rb'), 'file[]':''})
=>只拿到这个(日志从提琴手)。一个文件[]消失。
--a7fbfa6d52fc4ddd8b82ec8f7055c88b
Content-Disposition: form-data; name="file[]"; filename="qwe.txt"
example content of file qwe.txt blablabla
我想:
requests.post(url, data={"file[]":""},files={'file[]': open('qwe.txt','rb')})
但其不:文件名= “” 作为内容型
--a7fbfa6d52fc4ddd8b82ec8f7055c88b
Content-Disposition: form-data; name="file[]"
--a7fbfa6d52fc4ddd8b82ec8f7055c88b
Content-Disposition: form-data; name="file[]"; filename="qwe.txt"
Content-Type: text/plain
example content of file qwe.txt blablabla
有什么办法在python-请求手动添加呢?
喜欢它,它的工作原理!谢谢你,你太棒了! – Emily