When I get a link to a document via api vk, it’s not a direct link to it, but some kind of left one (if this is an image), wget cannot download it, but if it is inserted into the browser, it is redirected to the document. How does wget download it?
example how i do
elif item['attachments'][0]['doc']['title'][-4:] == '.png': commands.getoutput('wget -O in.png ' + item['attachments'][0]['doc']['url'])