R
R
RobertBobenBarabek2022-02-08 23:55:31
Python
RobertBobenBarabek, 2022-02-08 23:55:31

Audio files in documents have become banned VKontakte?

Good time of the day. When trying to upload an .ogg file to personal documents (the simplest Python + requests script) on VKontakte, an error occurred: JSON returned an incorrect file as a response. By trial, it turned out that the same situation occurs with .wav and .flac, and it doesn’t matter if the download is carried out through a script or through the graphical interface of a social network. I have tried uploading different files created by different programs, running the .wav through FFmpeg (-map_channel 0.0.0), however, this also did not give any results. In this regard, the question arises: did VKontakte impose a ban on downloading any other types of audio files, except for .mp3?

UPD: The problem was repeated on another account (I went through a third-party browser), I wrote a question to the technical support of the social network, because I did not find any information about the restrictions on file types in the official documentation.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
RobertBobenBarabek, 2022-02-09
@RobertBobenBarabek

Found a temporary solution based on the "stupidity" of the format parser.
Since the file name and extension are part of the metadata, changing them will not change the content. Since the social network, as it turned out empirically, and which directly contradicts the official documentation of the VK API, does not support audio types, but skips almost all the others (except for executable files), you can simply change the type of the sent file from .ogg to some .ogg1 and send it to the server via a POST request:

Response = requests.post(UploadURL, files={"file": open("C:/File.ogg1", "rb")})

PS: No useful information has been received from VK technical support so far.

A
Alexander Kalinin, 2022-02-09
@tchlgru

this has been the case for a long time, mp3s are also banned. they allegedly fight against copyright infringers, although it is clear why this is done so that ordinary users upload audio to the music section and listen to ads along with it

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question