←back to thread

798 points bertman | 3 comments | | HN request time: 0.02s | source
Show context
embedding-shape ◴[] No.45900337[source]
Seems its already in Arch's repositories, and seems to work, just add another flag to the invocation:

    yt-dlp --cookies-from-browser firefox --remote-components ejs:github -f "bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best" 'https://www.youtube.com/watch?v=XXX'
It is downloading a solver at runtime, took maybe half a second in total, downloads are starting way faster than before it seems to me.

    [youtube] [jsc:deno] Solving JS challenges using deno
    [youtube] [jsc:deno] Downloading challenge solver lib script from  https://github.com/yt-dlp/ejs/releases/download/0.3.1/yt.solver.lib.min.js
It would be great if we could download the solver manually with a separate command, before running the download command, as I'm probably not alone in running yt-dlp in a restricted environment, and being able to package it up together with the solver before runtime would let me avoid lessening the restrictions for that environment. Not a huge issue though, happy in general the start of downloads seems much faster now.
replies(8): >>45900780 #>>45901047 #>>45901146 #>>45901292 #>>45902245 #>>45902494 #>>45903312 #>>45906436 #
1. mnmalst ◴[] No.45903312[source]
https://aur.archlinux.org/packages/yt-dlp-ejs looks like what you need?
replies(1): >>45903602 #
2. embedding-shape ◴[] No.45903602[source]
No, don't need anything extra, `extra/yt-dlp` works perfectly fine and is enough. You'll get a warning if you run it without the flag:

    WARNING: [youtube] [jsc] Remote components challenge solver script (deno) and NPM package (deno) were skipped. These may be required to solve JS challenges. You can enable these downloads with  --remote-components ejs:github  (recommended) or  --remote-components ejs:npm , respectively. For more information and alternatives, refer to  https://github.com/yt-dlp/yt-dlp/wiki/EJS
Providing one of the flags automatically lets it automatically get what it needs. No need for AUR packages :)

Edit: Maybe I misunderstood, now when I re-read your post. You meant it'll prevent the automatic download at runtime perhaps? That sounds about right if so.

replies(1): >>45903921 #
3. mnmalst ◴[] No.45903921[source]
Yes exactly, if you install the package you don't need the download the solver on the fly. AT least that's my understanding of what the package is supposed to do. Personally I have no need for it.