feat: bundle hanime-plugin and Deno JS runtime in Docker image
All checks were successful
CI / build (push) Successful in 56s
All checks were successful
CI / build (push) Successful in 56s
- 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
This commit is contained in:
13
Dockerfile
13
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
|
||||
|
||||
|
||||
41
README.md
41
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 <plugin-name>
|
||||
```
|
||||
|
||||
## Development
|
||||
|
||||
```bash
|
||||
|
||||
Reference in New Issue
Block a user