N
N
Neon04042021-11-25 18:22:28
Python
Neon0404, 2021-11-25 18:22:28

How to integrate mail.ru computer vision into code?

For the sake of experiment, I tried to introduce computer vision from mylaru into my code
. I found out that it loads a photo using the method below:
619fa88728094924979976.png
Here is what it transmits in the payload:
619fa8c6867f8338353587.png
619fa8d1176b0528314163.png
Tried in different ways, but always returned

{"validation":"Images upload expected!"}

those. it did not receive the image.
The last thing I stopped at:
headers = {
        "Referer": "https://9may.mail.ru/restoration/"
    }
    data = {
        'image[]' : open("test.jpg", "rb")
    }
    resp = r.post('https://9may.mail.ru/photo',headers=headers,data=data)

What can be done about it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
soremix, 2021-11-25
@Neon0404

Not

How to integrate mail.ru computer vision into code?
, a
How to send multipart/form-data requests

resp = r.post('https://9may.mail.ru/photo',files=data)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question