twlite / youtube-sr

A dead-simple youtube metadata scraper
https://npmjs.com/package/youtube-sr
MIT License
113 stars 16 forks source link

TypeError, undefined is not iterable #23

Closed Rassez closed 3 years ago

Rassez commented 3 years ago

Hey For some reason this code went wrong:

 const searchres = await YouTube.getVideo(args[0]);
            const Title = searchres.title;
            console.log(Title)

And I got this error: image

So what is the problem? :D

twlite commented 3 years ago

odd, may I see your args[0]?

Rassez commented 3 years ago

Yeah, it's something like this: const args = message.content.slice(Config.prefix.length).trim().split(/ +/);

twlite commented 3 years ago

I mean, what was your args[0]? is it a valid youtube video link?

Rassez commented 3 years ago

aah, yeah it's youtube link.

sujalgoel commented 3 years ago

can you please share that link.

Rassez commented 3 years ago

aah damn, it was age restricted video :D I didn't noticed that, because with search function it works :D

sujalgoel commented 3 years ago

ok

twlite commented 3 years ago

I've fixed this error on the latest version