U
U
unixwz2018-08-24 21:57:57
API
unixwz, 2018-08-24 21:57:57

Why is the VK API behaving so strangely?

Hello, I want to get a list of videos from the VK public, of which there are 512 pieces. Using the SDK https://github.com/VKCOM/vk-php-sdk I execute the following code:

$videos = $vk->video()->get($token, [
  "owner_id" => $gid,
  "count" => 100,
  "extended" => 1,
  "offset" => $offset, // само собой данная переменная изначально == 0
  "v" => "5.80",
]);

However, in response, I get an incomprehensible number of videos, namely:
- with offset = 0 - 68 records;
- with offset = 100 - 60 records;
- with offset = 200 - 74 entries.
Although it should be 100 because count in the request == 100 and the docks say that the maximum is 100.
At first I thought that the problem was in the SDK, but I made a request with identical parameters through the form on the documentation page - https:// vk.com/dev/video.get and got identical results, which was very surprising.
Please help, what is the problem? I have already run out of guesses even ..
ps access token is alive and has the correct rights video,groups
P.SS problem solved! Some of the videos have been blocked.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Stockholm Syndrome, 2018-08-24
@unixwz

maybe some videos are protected by privacy settings and can't be accessed via the API?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question