Answer the question
In order to leave comments, you need to log in
How can a VK bot in the community download photos on a PC?
The user sends an image in private messages to the VK bot, and you need to download this image.
How to do it?
PS. in the documentation I found only a method that works only with the user's access key.
Answer the question
In order to leave comments, you need to log in
need to download this imageWhat do you mean by "downloading" a file? saving a file to local storage?
The user sends an image in private messages to the VK bot
in the documentation I found only a method that works only with the user's access key.and what kind of data comes to the bot? if you receive a link to an image, then you already "download" it to yourself.
with open('myfile.png', 'wb') as f:
f.write(requests.get(url).content)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question