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
228 stars 21 forks source link

YouTube video starting with "-" doesn't work #77

Closed maximushugus closed 2 months ago

maximushugus commented 2 months ago

If you try to play a YouTube video through ytdlp2STRM with the starting with "-", it doesn't work. For example this video : https://www.youtube.com/watch?v=-hEGNJ_Kiuc or https://www.youtube.com/watch?v=-d00jQcffHE

The logs say :

[2024-09-06 11:16:35.419953] youtube : [192.168.3.112] Playing -hEGNJ_Kiuc
[2024-09-06 11:16:35.804101] youtube : No manifest detected. Check your cookies config. 
* This video is age-restricted; some formats may be missing without authentication. Use --cookies-from-browser or --cookies for the authentication 
* Serving SD format. Please configure your cookies appropriately to access the manifest that serves the highest quality for this video

So as you can see it says it's age restricted (even if I don't think so). I have cookie setup correctly, no problem with other video.

I this this is a problem escaping the "-" at the start. I tried encoding this caracter with "%2D" but it results in the same problem.

fe80Grau commented 2 months ago

I've already seen the bug, it seems that yt-dlp is not able to process only the id when it starts with a hyphen. I've simply added the prefix with the full yt url and it works now. Check the latest commit https://github.com/fe80Grau/ytdlp2STRM/commit/42556defa5870a7a27b79ebe3ab5e80fb3685638, for the docker image it will take a while because I'm moving the docker environment to free up space and for now I can't generate the image and push it. As soon as it's ready I'll post it here.

fe80Grau commented 2 months ago

Pushed to Docker Hub