SuspiciousLookingOwl / youtubei

Get Youtube data such as videos, playlists, channels, video information & comments, related videos, up next video, and more!
https://suspiciouslookingowl.github.io/youtubei
MIT License
220 stars 50 forks source link

errro when getting channel #115

Open synhya1 opened 2 weeks ago

synhya1 commented 2 weeks ago

TypeError: Cannot read properties of undefined (reading 'browseEndpoint') at VideoCompactParser.loadVideoCompact (C:\Users\somes\OneDrive\바탕 화면\music\creativewave_crawler\node_modules.pnpm\youtubei@1.5.4\node_modules\youtubei\dist\cjs\youtube\VideoCompact\VideoCompactParser.js:27:18) at VideoCompact.load (C:\Users\somes\OneDrive\바탕 화면\music\creativewave_crawler\node_modules.pnpm\youtubei@1.5.4\node_modules\youtubei\dist\cjs\youtube\VideoCompact\VideoCompact.js:32:49) at C:\Users\somes\OneDrive\바탕 화면\music\creativewave_crawler\node_modules.pnpm\youtubei@1.5.4\node_modules\youtubei\dist\cjs\youtube\Channel\ChannelParser.js:61:87 at Array.map () at ChannelParser.parseShelves (C:\Users\somes\OneDrive\바탕 화면\music\creativewave_crawler\node_modules.pnpm\youtubei@1.5.4\node_modules\youtubei\dist\cjs\youtube\Channel\ChannelParser.js:59:18)
at ChannelParser.loadChannel (C:\Users\somes\OneDrive\바탕 화면\music\creativewave_crawler\node_modules.pnpm\youtubei@1.5.4\node_modules\youtubei\dist\cjs\youtube\Channel\ChannelParser.js:43:40)
at Channel.load (C:\Users\somes\OneDrive\바탕 화면\music\creativewave_crawler\node_modules.pnpm\youtubei@1.5.4\node_modules\youtubei\dist\cjs\youtube\Channel\Channel.js:20:39) at Client. (C:\Users\somes\OneDrive\바탕 화면\music\creativewave_crawler\node_modules.pnpm\youtubei@1.5.4\node_modules\youtubei\dist\cjs\youtube\Client\Client.js:103:60) at Generator.next () at fulfilled (C:\Users\somes\OneDrive\바탕 화면\music\creativewave_crawler\node_modules.pnpm\youtubei@1.5.4\node_modules\youtubei\dist\cjs\youtube\Client\Client.js:5:58)

channelId: UCAsvCHa0oOQrdw1kUU9YuLQ code: executed: await youtube.getChannel(channelId);

ShinyRa commented 2 weeks ago

I replicated the same error by using

const channel = await youtube.getChannel("UCAsvCHa0oOQrdw1kUU9YuLQ");

Though, I was able to extract the channel data successfully using this approach.

 const channel = await youtube.findOne("UCAsvCHa0oOQrdw1kUU9YuLQ", {type: "channel"});