[GH-ISSUE #1613] Bug: I can't seem to specify YOUTUBEDL_ARGS or YTDLP_EXTRA_ARGS #2475

Open
opened 2026-03-01 17:59:17 +03:00 by kerem · 2 comments
Owner

Originally created by @melyux on GitHub (Dec 9, 2024).
Original GitHub issue: https://github.com/ArchiveBox/ArchiveBox/issues/1613

I'm trying to run an archivebox add command with specific yt-dlp flags, on the latest development commit.

But I'm trying every escaping variation of docker compose exec --user=archivebox archivebox /bin/bash -c "env YTDLP_EXTRA_ARGS=[\"--limit-rate=10M\"] archivebox config --get YTDLP_EXTRA_ARGS" and it doesn't seem to work, and same with YOUTUBEDL_ARGS (did it change?).

I used to be able to do: docker compose run --rm archivebox "config --get URL_BLACKLIST && YOUTUBEDL_ARGS='[\"--restrict-filenames\"]' /usr/local/bin/archivebox add 'https://www.youtube.com/shorts/blahblahblah'" and it would just work. The && was to be able to enter the environment variable before the archivebox command, but now that's not allowed.

Originally created by @melyux on GitHub (Dec 9, 2024). Original GitHub issue: https://github.com/ArchiveBox/ArchiveBox/issues/1613 I'm trying to run an `archivebox add` command with specific yt-dlp flags, on the latest development commit. But I'm trying every escaping variation of `docker compose exec --user=archivebox archivebox /bin/bash -c "env YTDLP_EXTRA_ARGS=[\"--limit-rate=10M\"] archivebox config --get YTDLP_EXTRA_ARGS"` and it doesn't seem to work, and same with `YOUTUBEDL_ARGS` (did it change?). I used to be able to do: `docker compose run --rm archivebox "config --get URL_BLACKLIST && YOUTUBEDL_ARGS='[\"--restrict-filenames\"]' /usr/local/bin/archivebox add 'https://www.youtube.com/shorts/blahblahblah'"` and it would just work. The `&&` was to be able to enter the environment variable before the `archivebox` command, but now that's not allowed.
Author
Owner

@pirate commented on GitHub (Dec 9, 2024):

You can pass env vars with -e https://docs.docker.com/compose/how-tos/environment-variables/set-environment-variables/#set-environment-variables-with-docker-compose-run---env

You can also do docker compose run --rm archivebox /bin/bash -c '...' if you want to run arbitrary shell stuff inside the docker container.

<!-- gh-comment-id:2529868869 --> @pirate commented on GitHub (Dec 9, 2024): You can pass env vars with -e https://docs.docker.com/compose/how-tos/environment-variables/set-environment-variables/#set-environment-variables-with-docker-compose-run---env You can also do `docker compose run --rm archivebox /bin/bash -c '...'` if you want to run arbitrary shell stuff inside the docker container.
Author
Owner

@melyux commented on GitHub (Dec 10, 2024):

Thanks for that. But even though this works perfectly like this:

docker compose run --rm archivebox config --set YTDLP_EXTRA_ARGS='["--write-description", "--write-info-json", "--write-annotations", "--write-thumbnail", "--no-call-home", "--write-sub", "--all-subs", "--write-auto-sub", "--convert-subs=srt", "--yes-playlist", "--continue", "--ignore-errors", "--geo-bypass", "--add-metadata", "--max-filesize=500m", "--sub-lang=en"]'

...running this with the -e flag doesn't seem to affect the config (even though it works with other config options):

docker compose run --rm -e YTDLP_EXTRA_ARGS='["--write-description", "--write-info-json", "--write-annotations", "--write-thumbnail", "--no-call-home", "--write-sub", "--all-subs", "--write-auto-sub", "--convert-subs=srt", "--yes-playlist", "--continue", "--ignore-errors", "--geo-bypass", "--add-metadata", "--max-filesize=500m", "--sub-lang=en"]' archivebox config --get YTDLP_EXTRA_ARGS

It just prints the default arguments instead of the ones I put in the -e flag.

The second option with docker compose run --rm archivebox /bin/bash -c "YTDLP_EXTRA_ARGS='[\"--write-comments\"]' archivebox config --get YTDLP_EXTRA_ARGS" also doesn't work, it just prints out the default YTDLP_EXTRA_ARGS config

<!-- gh-comment-id:2530613566 --> @melyux commented on GitHub (Dec 10, 2024): Thanks for that. But even though this works perfectly like this: ```docker compose run --rm archivebox config --set YTDLP_EXTRA_ARGS='["--write-description", "--write-info-json", "--write-annotations", "--write-thumbnail", "--no-call-home", "--write-sub", "--all-subs", "--write-auto-sub", "--convert-subs=srt", "--yes-playlist", "--continue", "--ignore-errors", "--geo-bypass", "--add-metadata", "--max-filesize=500m", "--sub-lang=en"]'``` ...running this with the `-e` flag doesn't seem to affect the config (even though it works with other config options): ```docker compose run --rm -e YTDLP_EXTRA_ARGS='["--write-description", "--write-info-json", "--write-annotations", "--write-thumbnail", "--no-call-home", "--write-sub", "--all-subs", "--write-auto-sub", "--convert-subs=srt", "--yes-playlist", "--continue", "--ignore-errors", "--geo-bypass", "--add-metadata", "--max-filesize=500m", "--sub-lang=en"]' archivebox config --get YTDLP_EXTRA_ARGS``` It just prints the default arguments instead of the ones I put in the -e flag. The second option with `docker compose run --rm archivebox /bin/bash -c "YTDLP_EXTRA_ARGS='[\"--write-comments\"]' archivebox config --get YTDLP_EXTRA_ARGS"` also doesn't work, it just prints out the default YTDLP_EXTRA_ARGS config
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ArchiveBox#2475
No description provided.