From 464f20a46c5af0dc144d45e37287dc155feca2e9 Mon Sep 17 00:00:00 2001 From: db123 Date: Fri, 26 Jun 2026 01:27:10 +0330 Subject: [PATCH] feat: bundle hanime-plugin and Deno JS runtime in Docker image - Add PIP_BREAK_SYSTEM_PACKAGES=1 to install hanime-plugin via pip - Install Deno JS runtime required by the plugin's extractors - Document plugin setup and JS runtime requirement in README - Note plugin support in feature list --- Dockerfile | 13 ++++++++++++- README.md | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 1f23c71..4b92f86 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,7 +14,18 @@ RUN go build -o /usr/local/bin/uptodown-bot ./cmd/bot/ FROM alpine:3.23 -RUN apk add --no-cache ffmpeg yt-dlp ca-certificates tzdata +RUN apk add --no-cache ffmpeg yt-dlp ca-certificates tzdata py3-pip curl + +# Install yt-dlp plugins (add more as needed). +# PIP_BREAK_SYSTEM_PACKAGES bypasses PEP 668 — safe in Docker. +RUN PIP_BREAK_SYSTEM_PACKAGES=1 pip3 install --root-user-action=ignore --no-cache-dir hanime-plugin + +# Install Deno JS runtime (required by some yt-dlp plugins) +RUN curl -fsSL https://deno.land/install.sh | sh +ENV PATH="/root/.deno/bin:${PATH}" + +# Verify Deno is available +RUN deno --version WORKDIR /data diff --git a/README.md b/README.md index 80d333a..9dc3181 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,7 @@ Telegram bot for downloading media from any site yt-dlp supports. - Proxy support via HTTP_PROXY/HTTPS_PROXY env vars - Webhook and polling modes - SQLite database for persistence +- yt-dlp plugin support — `hanime-plugin` bundled in Docker image ## Commands @@ -75,6 +76,46 @@ make run-dev make docker-run ``` +The Docker image bundles the `hanime-plugin` and the Deno JS runtime for sites like +hanime.tv, hstream.moe, and hentaihaven.com. See [yt-dlp plugins](#yt-dlp-plugins) for details. + +### Local (non-Docker) + +If running outside Docker, the bot uses whatever yt-dlp is in your PATH. +Install plugins and a JS runtime as described below under [yt-dlp plugins](#yt-dlp-plugins). + +## yt-dlp plugins + +Some sites require yt-dlp plugins or a JavaScript runtime to work. The Docker image +bundles these automatically; for local installs you need to set them up manually. + +### hanime-plugin + +Adds support for hanime.tv, hstream.moe, hentaihaven.com and others. + +```bash +pip install hanime-plugin +``` + +The plugin requires a JavaScript runtime. [Deno](https://deno.com) is recommended: + +```bash +# Linux/macOS +curl -fsSL https://deno.land/install.sh | sh + +# Add to your shell config: +export PATH="$HOME/.deno/bin:$PATH" +``` + +### Adding other plugins + +yt-dlp plugins are Python packages installed via pip. Most work without +additional runtimes. Install any pip-installable yt-dlp plugin with: + +```bash +pip install +``` + ## Development ```bash