Open janusn opened 1 month ago
write /cookies/cookies.txt
with Netscape format:
# Netscape HTTP Cookie File
www.youtube.com TRUE / FALSE 0 LOGIN_INFO AFmm..........
...................
The cookies.txt file was written by a Chrome extension Get cookies.txt LOCALLY.
And I checked the content. It should be Netscape format:
# Netscape HTTP Cookie File
# This file is generated by yt-dlp. Do not edit.
accounts.google.com FALSE / TRUE 1 OTZ 7…
accounts.google.com FALSE / TRUE 2 ACCOUNT_CHOOSER AFx_…
…
It should be correct as calling yt-dlp inside the container works as illustrated above.
Instead of using the environment variable YTDL_OPTIONS, I work around by mapping a file on host to /etc/yt-dlp/config/yt-dlp.conf
with the following content and it works. 😕
--cookies /cookies/cookies.txt
Did you try if YTDL_OPTIONS
is correctly parsed at all? Should it not be YTDL_OPTIONS: {"cookiefile":"/cookies/cookies.txt"}
?
You could also use YTDL_OPTIONS_FILE
instead, referencing a .json file (also makes it more readable once you add more things)
Thanks for your help.
I have retried again and it turns out the youtube cookies expire quickly. It works with a fresh generated cookies.txt
.
Ah yes, that is a confounding factor. For me they only last a few minutes.
I have installed metube via docker compose using the following content as compose.yaml
When I initiated download from the web UI, it failed. The docker logged the following messages:
However, when I called yt-dlp directly inside the container, it downloaded successfully as illustrated below:
Could somebody tell me how to fix it? Many thanks!