diff options
| author | Zak B. Elep <zakame@zakame.net> | 2023-08-17 20:41:50 +0800 |
|---|---|---|
| committer | Zak B. Elep <zakame@zakame.net> | 2023-08-17 20:41:50 +0800 |
| commit | c292b96f068ec2e6323466bed011d5bae9ede662 (patch) | |
| tree | 507ce9775dfbd477d0cb56d2baa2b65e1576e43d /server | |
| parent | 7a82e9d5813d8b88e2f49ebdabbf19957b2f393a (diff) | |
server/net: use yt-dlp instead of youtube-dl
youtube-dl no longer even gets URLs properly, so switch to yt-dlp as a
drop-in replacement for it.
Diffstat (limited to 'server')
| -rw-r--r-- | server/Dockerfile | 2 | ||||
| -rw-r--r-- | server/requirements.txt | 2 | ||||
| -rw-r--r-- | server/szurubooru/func/net.py | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/server/Dockerfile b/server/Dockerfile index 487f192..c2640f1 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -29,7 +29,7 @@ RUN apk --no-cache add \ "coloredlogs==5.0" \ "pyheif==0.6.1" \ "heif-image-plugin>=0.3.2" \ - youtube_dl \ + yt-dlp \ "pillow-avif-plugin>=1.1.0" \ && apk --no-cache del py3-pip diff --git a/server/requirements.txt b/server/requirements.txt index 16b29ff..ceff0b8 100644 --- a/server/requirements.txt +++ b/server/requirements.txt @@ -12,4 +12,4 @@ pyRFC3339>=1.0 pytz>=2018.3 pyyaml>=3.11 SQLAlchemy>=1.0.12, <1.4 -youtube_dl +yt-dlp diff --git a/server/szurubooru/func/net.py b/server/szurubooru/func/net.py index c53a62e..d6aa95e 100644 --- a/server/szurubooru/func/net.py +++ b/server/szurubooru/func/net.py @@ -64,7 +64,7 @@ def download(url: str, use_video_downloader: bool = False) -> bytes: def _get_youtube_dl_content_url(url: str) -> str: - cmd = ["youtube-dl", "--format", "best", "--no-playlist"] + cmd = ["yt-dlp", "--format", "best", "--no-playlist"] if config.config["user_agent"]: cmd.extend(["--user-agent", config.config["user_agent"]]) cmd.extend(["--get-url", url]) |