Fix noodlemagazine thumb proxy; check.py verifies proxied urls

The thumb proxy dropped the preview query string, rejected extensionless
getVideoPreview paths and warmed up through the slow fallback chain on
every image. check.py now verifies that a proxied video.url resolves
instead of failing it outright.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MUYdCh2nCVsQYgJAT7gwSi
This commit is contained in:
Simon
2026-10-10 09:17:30 +00:00
parent e4c5cb2f0a
commit 2fccea0fc2
3 changed files with 44 additions and 14 deletions

View File

@@ -354,7 +354,29 @@ def check_video(video: dict, channel_id: str, results: Results, run_ytdlp: bool)
if not vurl:
results.err(channel_id, f"{label}: missing url")
elif "127.0.0.1" in vurl or "localhost" in vurl:
results.err(channel_id, f"{label}: url points to hottub server: {vurl}")
# A proxied video.url is legitimate when the page itself cannot be
# played directly (see the hottub skill: "if a video URL requires a
# server-side proxy, set it as the video URL"). Verify that it
# actually resolves instead of rejecting it outright.
resolved_vurl = follow_proxy_redirect(vurl)
if resolved_vurl and resolved_vurl != vurl:
ok, code = http_ok(resolved_vurl)
target = resolved_vurl
else:
ok, code = http_ok(vurl)
target = vurl
if ok:
results.info(channel_id, f"{label}: proxied url OK (HTTP {code})")
elif _is_cf_protected(target):
results.warn(
channel_id,
f"{label}: proxied url target unreachable HTTP={code} (CF-protected host, expected): {vurl}",
)
else:
results.err(
channel_id,
f"{label}: proxied url does not resolve (HTTP={code}, target {target[:120]}): {vurl}",
)
else:
ok, code = http_ok(vurl)
if not ok: