Hi.
I'm having a bad time trying to convert this long time proven YT-dlp command line into a functional XYplorer script.
1. "-sub-langs all", which is a new trick I've learned, renders the command to fail downloading subs or thumbnails depending on the input, this is why I doubled the command as a way of a safeguard. But I'm sure this could be fixed somehow. How could I do this?
2. Stepping through a script: XYplorer ellipses long lines after a certain number of chars by suffixing "[...]" after a certain amount of input, thus rendering any supervision nullified. It also fails when I ask for the whole line to be copied under the "parsed and resolved" portion. This should be improved, me thinks.
3. Is there a way to safeguard this against Windows paths containing spaces? Still not sure this works reliably on such scenarios.
echo "Is your link already into the clipboard?";
$source = "<clipboard>";
$source = gettoken ("$source", 1, "&", , 1);
$source = gettoken ("$source", -1, "=", , 2);
$input = input("Please ensure this is the link to be downloaded:", " ~ or use another one if you'd like so.<crlf 2>https://www.youtube.com/watch?v=", "$source", s, , "900", "800");
//PORTABLE paths
run """<xydata>\SOFT\YTdlp\yt-dlp.exe"" --write-url-link --write-subs --write-auto-subs --windows-filenames --write-all-thumbnails --write-description --write-comments --write-info-json --ffmpeg-location ""<xydata>\SOFT\FFmpeg\ffmpeg.exe"" --format ""bv*[height<=1080]+ba/b"" --audio-quality 0 --remux-video mkv ""https://www.youtube.com/watch?v=$input""", , 2;
run """<xydata>\SOFT\YTdlp\yt-dlp.exe"" --write-url-link --write-subs --write-auto-subs --windows-filenames --write-all-thumbnails --write-description --write-comments --write-info-json --ffmpeg-location ""<xydata>\SOFT\FFmpeg\ffmpeg.exe"" --format ""bv*[height<=1080]+ba/b"" --audio-quality 0 --remux-video mkv --sub-langs all ""https://www.youtube.com/watch?v=$input""", , 2;
Improvements to a YT-dlp script as well as XYplorer stepping
-
- Posts: 6
- Joined: 03 Apr 2024 18:46
Re: Improvements to a YT-dlp script as well as XYplorer stepping
? Do you want to tell us that if you do it directly! via command line it downloads subtitles but not when using a xy script? I doubt that...How could I do this?
Code: Select all
ERROR: Unable to download video subtitles for 'jv': HTTP Error 429: Too Many Requests
Nothing needs to be done (apart from quoting it correctly in the run command call)Is there a way to safeguard this against Windows paths containing spaces?
One of my scripts helped you out? Please donate via Paypal