Code samples for YouTube APIs, including the YouTube Data API, YouTube Analytics API, and YouTube Live Streaming API. The repo contains language-specific directories that contain the samples.
5.49k
stars
2.97k
forks
source link
How can I get all the video name from an playlist with the google api? I #310
How can I get all the video name from an playlist with the google api? I already tried to do it with diffrent part parameter and it didn't work. I am using the node js version of the google api Here is my code: ```js
function GetYtbPlaylistId(PlaylistLink) {
const PlaylistIDRegex = /list=(.+)/ig;
if (!PlaylistIDRegex.test(PlaylistLink))
return;
let ID = PlaylistIDRegex.exec(PlaylistLink);
ID = PlaylistIDRegex.exec(PlaylistLink);
return ID[1];
}
How can I get all the video name from an playlist with the google api? I already tried to do it with diffrent part parameter and it didn't work. I am using the node js version of the google api Here is my code: ```js function GetYtbPlaylistId(PlaylistLink) { const PlaylistIDRegex = /list=(.+)/ig; if (!PlaylistIDRegex.test(PlaylistLink)) return; let ID = PlaylistIDRegex.exec(PlaylistLink); ID = PlaylistIDRegex.exec(PlaylistLink); return ID[1]; }
export async function YoutubeToSpotify(Playlist) { Playlist = GetYtbPlaylistId(Playlist); const PlaylistItem = await google.youtube("v3").playlists.list({ auth: config.default.GoogleApiKey, key: config.default.GoogleApiKey,
}