A
A
asinco2021-11-16 13:07:19
Python
asinco, 2021-11-16 13:07:19

How to upload a photo to a wall using a link to a PC via vk_api?

I have a path to my picture C:\Other\project\exemp.jpg

I want to publish a post in the group with this picture and more text in the description above, but in VK_API you first need to get the file ID and so on. Why do I need a bot then, if I still need to load it with my hands somewhere?

Therefore, the logical question is how to implement it so that the path to the file is the input, and the output is a normal post?
You can use vkbottle or vk_api, whatever

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
soremix, 2021-11-16
@SoreMix

There are examples in the documentation
https://github.com/python273/vk_api/blob/master/ex...
Only instead of the usual method , you photoneed photo_wall
photo_wall('path', group_id=group_id)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question