HugoJF / twitch-tools

[WIP] Javascript library to work with Twitch content (clips, videos, chat)
10 stars 3 forks source link

Cookies for sub only VOD #1

Open yovanoc opened 3 years ago

yovanoc commented 3 years ago

I had an error today

image

I succeed to get it working like this while giving a netscape cookies file but it should be an option directly in the core I think. :)

youtubedl().getVideoInfo([this.videoUrl, "--cookies", "./twitch.tv_cookies.txt"]);
HugoJF commented 3 years ago

Was youtube-dl recently downloaded? Generally I expect them to fix these kind of errors.

yovanoc commented 3 years ago

Downloaded today. But its not really a bug, idk if there is a solution, when a VOD is for subscribers only on a twitch channel we need to give cookies to youtube-dl so idk how can this be properly handled but its not really a bug for me

yovanoc commented 3 years ago

For info, this is just the auth-token cookie that we need, so maybe you can ask for login/password of an account then generate this token or idk

HugoJF commented 3 years ago

Oooh I get it now. I'm gonna take a closer look once ai have some time.

I have an idea on how this could be fixed without interacting with the user (this project is just a backend for developers).

Thanks for reporting this!

EDIT: just realized I didn't read the title, that's why I thought it was a bug in youtube-dl

yovanoc commented 3 years ago

Yes I use this lib directly because I just need to download a single VOD.

Ahah no worries, good luck :)

HugoJF commented 3 years ago

Happy to hear that you found this useful even without any documentation hehe

I plan on updating twitch-clip-downloader to be more useful for basic use-cases (download a VOD, list of VODs, all VODs, a single clip, clip list, etc). So if you ever need something like that again, check the repo for updates.