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
240 stars 50 forks source link

Shorts and Playlists Data Bug #122

Open MZRCode opened 1 week ago

MZRCode commented 1 week ago

Hello, i tried to get the short and playlist data of many channels, but i got an empty array output as in the ss below. I left the code i used below in case you want to review it, good day.

const { Client } = require('youtubei');

const youtube = new Client();

const run = async () => {
    const a = await youtube.getChannel('UCJLOwrktwJjwdJPwSTxUqZQ');

    await a.videos.next(); // Works
    await a.live.next() // Works

    console.log(await a.shorts.next());
    console.log(await a.playlists.next());
};

run();

image

xiaohaoxing commented 1 week ago

It seems that youtube don't reply channel basic info with reelItemRenderer and gridPlaylistRenderer, replace them with shortsLockupViewModel and lockupViewModel, but the structure is totally different from before, so sorry for that I cannot fix it immediately. I'll try to fix it.

125