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:
24
check.py
24
check.py
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user