Skip to content
This repository has been archived by the owner on Sep 20, 2023. It is now read-only.

getChannelVideos causes error #15

Closed
hazycora opened this issue Feb 12, 2021 · 2 comments
Closed

getChannelVideos causes error #15

hazycora opened this issue Feb 12, 2021 · 2 comments

Comments

@hazycora
Copy link

Here's some code I wrote to test it.

const ytch = require('yt-channel-info')

ytch.getChannelVideos("UCIOqgcoAGI2fycb89gPXMPA", 'popular').then((channelvideos) => {
    var j = JSON.stringify({
        "data": {"videos": channelvideos},
        "source": "youtube"
    });
    console.log(j);
}).catch((err) => {
    console.log(err)
})

This should grab the channel videos from https://www.youtube.com/channel/UCIOqgcoAGI2fycb89gPXMPA. Instead, it causes the following error.

TypeError: Cannot read property 'title' of undefined
    at Function.parseVideo (C:\Users\hazycora\Documents\GitHub\testing\node_modules\yt-channel-info\app\helper.js:80:23)
    at C:\Users\hazycora\Documents\GitHub\testing\node_modules\yt-channel-info\app\helper.js:55:19
    at Array.map (<anonymous>)
    at Function.parseChannelVideoResponse (C:\Users\hazycora\Documents\GitHub\testing\node_modules\yt-channel-info\app\helper.js:54:49)
    at Function.getChannelVideosPopular (C:\Users\hazycora\Documents\GitHub\testing\node_modules\yt-channel-info\app\fetchers\channel.js:57:25)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async Function.getChannelVideos (C:\Users\hazycora\Documents\GitHub\testing\node_modules\yt-channel-info\app\youtube-grabber.js:128:16)
@PrestonN
Copy link
Member

I'm aware of the current issue. A fix will be coming out sometime this weekend. I've already got a WIP for it.

@PrestonN
Copy link
Member

This should be fixed now. Let me know if you ever see any more issues.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants