如何通过 API 获取 YouTube 视频?
How I Can Fetch YouTube Videos Through API?
如何通过 API 获取 YouTube 视频,
我想通过 YouTube API、
获取特定频道的所有视频
但是请如何帮助
Returns a collection of search results that match the query parameters specified in the API request. By default, a search result set identifies matching video, channel, and playlist resources, but you can also configure queries to only retrieve a specific type of resource.
var google = require('googleapis');
var youtube = google.youtube({
version: 'v3',
auth: "your-api-key"
});
youtube.search.list({
part: 'snippet',
q: 'your search query'
}, function (err, data) {
if (err) {
console.error('Error: ' + err);
}
if (data) {
console.log(data)
}
});
如何通过 API 获取 YouTube 视频, 我想通过 YouTube API、
获取特定频道的所有视频但是请如何帮助
Returns a collection of search results that match the query parameters specified in the API request. By default, a search result set identifies matching video, channel, and playlist resources, but you can also configure queries to only retrieve a specific type of resource.
var google = require('googleapis');
var youtube = google.youtube({
version: 'v3',
auth: "your-api-key"
});
youtube.search.list({
part: 'snippet',
q: 'your search query'
}, function (err, data) {
if (err) {
console.error('Error: ' + err);
}
if (data) {
console.log(data)
}
});