commit 8f95dd0d12d06280fff461b296a995898f604786
parent 05877ffb6d9756dbbb8173225125dd05bf403794
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Fri, 25 Sep 2026 00:21:09 -0400
common: HTTP 410 Gone classifies as deleted, not error
Rumble answers a taken-down video with `HTTP Error 410: Gone`;
rekietalaw-rumble v7e07us's availability sidecar has read `error` with
exactly that line since 2026-08-21. `parseUnavailableFromStderr` now puts
`http error 410` in the deleted group, so the check records it as removed
and a download that hits it is per-video (skip), not a batch abort.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Diffstat:
2 files changed, 20 insertions(+), 2 deletions(-)
diff --git a/common/lib/availability.test.ts b/common/lib/availability.test.ts
@@ -1,6 +1,6 @@
import { test } from "node:test";
import assert from "node:assert/strict";
-import { classifyDownloadFailure } from "./availability";
+import { classifyDownloadFailure, parseUnavailableFromStderr } from "./availability";
// Run with:
// pnpm --filter yt-dlp-transcript-common exec tsx --test lib/availability.test.ts
@@ -20,3 +20,18 @@ test("a bare HTTP 403 is a network failure (backs the platform off)", () => {
);
assert.equal(classifyDownloadFailure("ERROR: Unsupported URL", undefined), "unknown");
});
+
+test("HTTP 410 Gone is a removed video, not an error", () => {
+ // The exact line rekietalaw-rumble v7e07us's check has read since 2026-08-21.
+ const stderr =
+ "ERROR: [Rumble] v7e07us: Unable to download webpage: HTTP Error 410: Gone (caused by <HTTPError 410: Gone>)";
+ assert.equal(parseUnavailableFromStderr(stderr), "deleted");
+ // …so a download that hits it skips the video rather than aborting the batch.
+ assert.equal(
+ classifyDownloadFailure(stderr, parseUnavailableFromStderr(stderr)),
+ "per_video",
+ );
+ // Other HTTP errors are unchanged.
+ assert.equal(parseUnavailableFromStderr("HTTP Error 403: Forbidden"), "error");
+ assert.equal(parseUnavailableFromStderr("HTTP Error 500: Internal Server Error"), "error");
+});
diff --git a/common/lib/availability.ts b/common/lib/availability.ts
@@ -187,7 +187,10 @@ export function parseUnavailableFromStderr(stderr: string): Availability {
/account .* has been terminated/.test(s) ||
/this video has been removed/.test(s) ||
/content isn't available/.test(s) ||
- /no longer available/.test(s)
+ /no longer available/.test(s) ||
+ // HTTP 410 Gone is the server saying the video was removed for good —
+ // Rumble answers a taken-down video with it (`HTTP Error 410: Gone`).
+ /http error 410/.test(s)
) {
return "deleted";
}