联系官方销售客服
1835022288
028-61286886
headers_img = { "Connection": "keep-alive", "Accept": "application/json, text/javascript, */*; q=0.01", "X-Requested-With": "XMLHttpRequest", "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36", "Cookie": cookie } # 这个 cookie 是你登录之后的cookie files = {'file_data': ('3.jpg', open(img_path, 'rb').read(), 'image/jpeg')} url = 域名 + /index.php?s=api&c=file&m=upload&fid=2 # fid 设置成自己的 response = requests.post(url, files=files, headers=headers_img) # 就这么简单,论坛里面的哪些方法并不好用