fix(route): youtube get channel id from user handle (#12579)

This commit is contained in:
Tony 2023-05-30 17:37:15 +03:00 committed by GitHub
parent a7fb3c48a3
commit dc46f70393
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}