fe80Grau / ytdlp2STRM

A little script to serve Youtube / Twitch / Crunchyroll videos without storage it. Uses yt-dlp HTTP data throught Flask and dynamic URLs. We can use this dynamic URLs to set STRM files.
https://github.com/fe80Grau/ytdlp2STRM
MIT License
173 stars 15 forks source link

Fix streams channel config getting stuck in loop #38

Closed TheAwesomePossum closed 3 months ago

TheAwesomePossum commented 3 months ago

I just started using your library and while using the command, python3 cli.py --media youtube --params redirect, the process was getting stuck in loop while trying to get the channel ID at the following command:

yt-dlp --compat-options no-youtube-channel-redirect --compat-options no-youtube-unavailable-videos --restrict-filenames --ignore-errors --no-warnings --playlist-start 1 --playlist-end 1 --print channel_url https://www.youtube.com/{channel_name}/streams

running it manually showed the following error: ERROR: [youtube] {stream_id}: This live event will begin in 50 days.

If you are using the streams specific url for a channel and the channel has a planned stream that hasn't started the get_id function will continue to retry in a loop.

My solution is to knock off everything in the channel url from 'stream' on in order to find the base channel ID and let the function move on.

fe80Grau commented 3 months ago

Thank you very much, I just approved the merge.