Archived
Add curl-impersonate for ani-cli v5
This commit is contained in:
@@ -1,5 +1,11 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 0.50.0 - 2026-08-01
|
||||||
|
|
||||||
|
- Added `curl-impersonate` to Docker images using the maintained `lexiforest/curl-impersonate` image so `ani-cli` v5 can use browser-like curl wrappers before falling back to plain `curl`.
|
||||||
|
- Exposed `curl-impersonate` availability in the Config page dependency status.
|
||||||
|
- Updated Docker/runtime documentation for the new `ani-cli` v5 Cloudflare workaround.
|
||||||
|
|
||||||
## 0.49.9 - 2026-07-26
|
## 0.49.9 - 2026-07-26
|
||||||
|
|
||||||
- Changed the Config page `ani-cli` version probe to run with `ANI_CLI_PLAYER=download`, avoiding false missing-player failures on headless installs without `mpv` or `vlc`.
|
- Changed the Config page `ani-cli` version probe to run with `ANI_CLI_PLAYER=download`, avoiding false missing-player failures on headless installs without `mpv` or `vlc`.
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
FROM lexiforest/curl-impersonate:latest AS curl-impersonate
|
||||||
|
|
||||||
FROM python:3.12-slim-bookworm
|
FROM python:3.12-slim-bookworm
|
||||||
|
|
||||||
ARG ANI_CLI=https://github.com/pystardust/ani-cli.git
|
ARG ANI_CLI=https://github.com/pystardust/ani-cli.git
|
||||||
@@ -22,6 +24,7 @@ ENV DEBIAN_FRONTEND=noninteractive \
|
|||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get install -y --no-install-recommends \
|
&& apt-get install -y --no-install-recommends \
|
||||||
aria2 \
|
aria2 \
|
||||||
|
bash \
|
||||||
botan \
|
botan \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
curl \
|
curl \
|
||||||
@@ -32,6 +35,7 @@ RUN apt-get update \
|
|||||||
grep \
|
grep \
|
||||||
libxml2-dev \
|
libxml2-dev \
|
||||||
libxslt1-dev \
|
libxslt1-dev \
|
||||||
|
libstdc++6 \
|
||||||
openssl \
|
openssl \
|
||||||
patch \
|
patch \
|
||||||
python3.11 \
|
python3.11 \
|
||||||
@@ -41,6 +45,11 @@ RUN apt-get update \
|
|||||||
util-linux \
|
util-linux \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
COPY --from=curl-impersonate /usr/local /usr/local
|
||||||
|
|
||||||
|
RUN curl_firefox135 --version \
|
||||||
|
&& curl_chrome136 --version
|
||||||
|
|
||||||
RUN git clone --depth 1 --branch "${ANI_CLI_BRANCH}" "${ANI_CLI}" /tmp/ani-cli-src \
|
RUN git clone --depth 1 --branch "${ANI_CLI_BRANCH}" "${ANI_CLI}" /tmp/ani-cli-src \
|
||||||
&& install -m 0755 /tmp/ani-cli-src/ani-cli /usr/local/bin/ani-cli \
|
&& install -m 0755 /tmp/ani-cli-src/ani-cli /usr/local/bin/ani-cli \
|
||||||
&& ani_cli_raw_repo="$(printf '%s' "${ANI_CLI}" | sed -E 's#^https://github.com/##; s#\\.git$##')" \
|
&& ani_cli_raw_repo="$(printf '%s' "${ANI_CLI}" | sed -E 's#^https://github.com/##; s#\\.git$##')" \
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Local web UI for a system-wide `ani-cli` install.
|
Local web UI for a system-wide `ani-cli` install.
|
||||||
|
|
||||||
Current version: `0.49.9`
|
Current version: `0.50.0`
|
||||||
|
|
||||||
## What it does
|
## What it does
|
||||||
|
|
||||||
@@ -30,7 +30,7 @@ Requirements:
|
|||||||
|
|
||||||
- `ani-cli` installed and available in `PATH`
|
- `ani-cli` installed and available in `PATH`
|
||||||
- Optional: `anipy-cli` and/or `animdl` installed and available in `PATH` if you want automatic fallback retries outside Docker
|
- Optional: `anipy-cli` and/or `animdl` installed and available in `PATH` if you want automatic fallback retries outside Docker
|
||||||
- Common runtime tools used by `ani-cli`, especially `curl`, `ffmpeg`, `fzf`, `grep`, `openssl`, `sed`, `aria2c`, `botan`, and `yt-dlp`
|
- Common runtime tools used by `ani-cli`, especially `curl` or `curl-impersonate`, `ffmpeg`, `fzf`, `grep`, `openssl`, `sed`, `aria2c`, `botan`, and `yt-dlp`
|
||||||
|
|
||||||
Run locally:
|
Run locally:
|
||||||
|
|
||||||
@@ -90,6 +90,7 @@ Docker notes:
|
|||||||
- `USER_UID` and `USER_GID` help keep mounted files owned by your host user
|
- `USER_UID` and `USER_GID` help keep mounted files owned by your host user
|
||||||
- `UPDATE_ON_START=true` runs `ani-cli --update` before startup
|
- `UPDATE_ON_START=true` runs `ani-cli --update` before startup
|
||||||
- `ANI_CLI_WEB_JOB_STDOUT=true` mirrors download job output to container stdout for log collectors; set it to `false` to keep job output only in the Queue page
|
- `ANI_CLI_WEB_JOB_STDOUT=true` mirrors download job output to container stdout for log collectors; set it to `false` to keep job output only in the Queue page
|
||||||
|
- `curl-impersonate` is installed inside the container and exposes the browser wrapper commands used by `ani-cli` v5, such as `curl_firefox135` and `curl_chrome136`, so provider requests can avoid Cloudflare blocks that affect plain `curl`
|
||||||
- `botan` is installed inside the container for providers or scripts that need Botan cryptography tooling
|
- `botan` is installed inside the container for providers or scripts that need Botan cryptography tooling
|
||||||
- `anipy-cli` and `animdl` are installed systemwide inside the container at `/usr/local/bin`, linked from `/usr/bin`, and included in the runtime `PATH`; `animdl` is isolated in a Python 3.11 virtualenv so its pinned dependencies stay executable
|
- `anipy-cli` and `animdl` are installed systemwide inside the container at `/usr/local/bin`, linked from `/usr/bin`, and included in the runtime `PATH`; `animdl` is isolated in a Python 3.11 virtualenv so its pinned dependencies stay executable
|
||||||
|
|
||||||
@@ -118,6 +119,7 @@ Docker notes:
|
|||||||
- Checked methods are tried in this order: `ani-cli`, `anipy-cli`, then `animdl`
|
- Checked methods are tried in this order: `ani-cli`, `anipy-cli`, then `animdl`
|
||||||
- Selecting one method disables fallback retry; selecting multiple methods makes later methods automatic fallbacks
|
- Selecting one method disables fallback retry; selecting multiple methods makes later methods automatic fallbacks
|
||||||
- Queue `ani-cli` downloads explicitly run with `ANI_CLI_PLAYER=download` so headless Docker installs do not need `mpv` or `vlc` just to save files
|
- Queue `ani-cli` downloads explicitly run with `ANI_CLI_PLAYER=download` so headless Docker installs do not need `mpv` or `vlc` just to save files
|
||||||
|
- Docker images include `curl-impersonate` wrappers before plain `curl` on `PATH`, matching the preference order used by `ani-cli` v5
|
||||||
- Fallback retries keep the queued episode numbers when fallback downloader filenames are renumbered from `1`
|
- Fallback retries keep the queued episode numbers when fallback downloader filenames are renumbered from `1`
|
||||||
- Docker images install `anipy-cli` and `animdl` automatically; non-Docker installs should provide the selected tools in `PATH` themselves
|
- Docker images install `anipy-cli` and `animdl` automatically; non-Docker installs should provide the selected tools in `PATH` themselves
|
||||||
|
|
||||||
|
|||||||
@@ -97,6 +97,12 @@ def build_handler_class(context):
|
|||||||
def dependency_status():
|
def dependency_status():
|
||||||
checks = ["curl", "sed", "grep", "openssl", "fzf", "aria2c", "ffmpeg", "yt-dlp"]
|
checks = ["curl", "sed", "grep", "openssl", "fzf", "aria2c", "ffmpeg", "yt-dlp"]
|
||||||
result = {name: bool(shutil.which(name)) for name in checks}
|
result = {name: bool(shutil.which(name)) for name in checks}
|
||||||
|
result["curl-impersonate"] = cli_executable_exists_any(
|
||||||
|
"curl_firefox135",
|
||||||
|
"curl_chrome136",
|
||||||
|
"curl_chrome116",
|
||||||
|
"curl_ff117",
|
||||||
|
)
|
||||||
result["ani-cli"] = cli_executable_exists(ANI_CLI)
|
result["ani-cli"] = cli_executable_exists(ANI_CLI)
|
||||||
result["anipy-cli"] = cli_executable_exists_any(
|
result["anipy-cli"] = cli_executable_exists_any(
|
||||||
ANIPY_CLI,
|
ANIPY_CLI,
|
||||||
|
|||||||
@@ -3340,6 +3340,7 @@ class HandlerRouteTests(unittest.TestCase):
|
|||||||
handler = DummyHandler("/api/dependencies")
|
handler = DummyHandler("/api/dependencies")
|
||||||
APP.Handler.do_GET(handler)
|
APP.Handler.do_GET(handler)
|
||||||
self.assertEqual(handler.json_status, HTTPStatus.OK)
|
self.assertEqual(handler.json_status, HTTPStatus.OK)
|
||||||
|
self.assertIn("curl-impersonate", handler.json_payload)
|
||||||
self.assertIn("anipy-cli", handler.json_payload)
|
self.assertIn("anipy-cli", handler.json_payload)
|
||||||
self.assertIn("animdl", handler.json_payload)
|
self.assertIn("animdl", handler.json_payload)
|
||||||
|
|
||||||
@@ -3350,6 +3351,12 @@ class HandlerRouteTests(unittest.TestCase):
|
|||||||
status = http_handler.dependency_status()
|
status = http_handler.dependency_status()
|
||||||
|
|
||||||
self.assertTrue(status["animdl"])
|
self.assertTrue(status["animdl"])
|
||||||
|
exists_any.assert_any_call(
|
||||||
|
"curl_firefox135",
|
||||||
|
"curl_chrome136",
|
||||||
|
"curl_chrome116",
|
||||||
|
"curl_ff117",
|
||||||
|
)
|
||||||
exists_any.assert_any_call(
|
exists_any.assert_any_call(
|
||||||
http_handler.ANIMDL,
|
http_handler.ANIMDL,
|
||||||
"animdl",
|
"animdl",
|
||||||
|
|||||||
Reference in New Issue
Block a user