From dc46f703933434f2520d79e85f9b2f9540f0627c Mon Sep 17 00:00:00 2001 From: Tony Date: Tue, 30 May 2023 17:37:15 +0300 Subject: [PATCH] fix(route): youtube get channel id from user handle (#12579) --- lib/v2/youtube/user.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/v2/youtube/user.js b/lib/v2/youtube/user.js index 3ef438ef4..e84a86359 100644 --- a/lib/v2/youtube/user.js +++ b/lib/v2/youtube/user.js @@ -17,7 +17,7 @@ module.exports = async (ctx) => { const link = `https://www.youtube.com/${username}`; const response = await got(link); const $ = cheerio.load(response.data); - const channelId = $('meta[itemprop="channelId"]').attr('content'); + const channelId = $('meta[itemprop="identifier"]').attr('content'); channelName = $('meta[itemprop="name"]').attr('content'); playlistId = (await utils.getChannelWithId(channelId, 'contentDetails', ctx.cache)).data.items[0].contentDetails.relatedPlaylists.uploads; }