聯(lián)系官方銷售客服
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 } # 這個(gè) 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 設(shè)置成自己的 response = requests.post(url, files=files, headers=headers_img) # 就這么簡(jiǎn)單,論壇里面的哪些方法并不好用