def img_return():
img =Image.open("E:\py project\яндекс авторег\d.jpg")
return img
user_key = "d1ab96d3ad0a363d122de03d55a26173"
image1=img_return()
guru_send = {
'key': user_key,
'file' : image1
}
url = "http://api.captcha.guru/in.php"
s=requests.session()
loging = s.post(url,data=guru_send)
print(loging)
print(loging.text)
url = "http://api.captcha.guru/in.php"
payload={'key': 'd1ab96d3ad0a363d122de03d55a26173'}
files=[
('file',('wr-780.jpg',open('/C:/Users/User/Downloads/wr-780.jpg','rb'),'image/jpeg'))
]
response = requests.request("POST", url, data=payload, files=files)
print(response.text)