Я пытаюсь выполнить поиск с помощью API YouTube, который, в частности, возвращает относительно неясные видеоролики. В документации YouTube нет специального фильтра для количества просмотров.
Есть ли команда, которую я пропустил, или, если нет, каким-то другим способом получить аналогичный результат.
var request = gapi.client.youtube.search.list({
part: "snippet",
type: "video",
q: encodeURIComponent($("#search").val()).replace(/%20/g, "+"),
maxResults: 50,
order: "viewCount",
publishedAfter: encodeURIComponent($("#SDate").val()),
publishedBefore: encodeURIComponent($("EDate").val),
});
// execute the request
request.execute(function(response) {
var results = response.result;
$("#results").html("");
$.each(results.items, function(index, item) {
$.get("tpl/item.html", function(data) {
$("#results").append(tplawesome(data, [{"title":item.snippet.title, "videoid":item.id.videoId}]));
});
});
resetVideoHeight();
});
});