Answer the question
In order to leave comments, you need to log in
Why does the VK API method video.search often return empty data?
$xml= simplexml_load_file('https://api.vk.com/method/video.search.xml?q=test&offset=0&count=10&access_token=token&v=5.37');
Answer the question
In order to leave comments, you need to log in
The first thing that comes to mind is to control yourself.
Well, if you go further, just test with different parameters and log the answer. Then, based on comparing them with the results of a manual video search, identify patterns.
In addition to the options, there are videos that have been removed for copyright infringement, there are videos from YouTube embedded, from other players, old videos [that have been uploaded long ago] on VK (on a flash), and new ones on html5.
If all this still does not help, competent multi-counting so as not to exceed the number of requests + proxy as needed.
There are functions that are not designed for this well, they can also help. You can also try different versions.
It's just that these given data are not there, because this is a search, and the search cannot find something that, in principle, does not exist. This is about what is indicated in ? q='Search query '
response: {
count: 0,
items: []
}
response: {
count: 21056, //количество найденых видео
items: [{ //и начнет выводить согласно доп. параметрам
id: 171107068,
owner_id: 248902071,
.....
}]
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question