fix(hqfap): reject 3MB video_down.mp4 stub (placeholder, not real video)

hqfap migrated its JSON-LD contentUrl (and the *.workers.dev mirror) to /upload/videos/video_down.mp4, which serves a FIXED ~3.04MB file for EVERY scene regardless of declared length (verified 5/5 scenes at 14-47min all = 3.04MB, 2026-06-21). It is a placeholder/'server down' clip, not the content — the browser's own player streamed the same stub via MediaSource. We were handing users that 3MB stub (reports c382d441/ef10b946). Now reject the video_down.mp4 contentUrl and return no source, so scenes fall through to other sources or show no playback instead of a fake clip. Real older scenes (cdnde.com / okcdn.ru direct mp4) still resolve. This also makes the proxy-fallback question moot — there is no source to proxy.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
jtrzupek 2026-06-21 23:01:19 +02:00
parent 249ad49430
commit 960bc75be4

View file

@ -57,6 +57,16 @@ def extract(page_url: str, *, timeout: float = 60.0) -> list[StreamSource] | Non
log.warning("hqfap: no contentUrl in JSON-LD for %s", page_url)
return None
# hqfap migrował: `/upload/videos/video_down.mp4` (+ mirror *.workers.dev) serwuje
# STAŁY ~3MB placeholder dla KAŻDEJ sceny, niezależnie od deklarowanej długości
# (5/5 scen = 3.04MB przy 14-47min, weryfikacja 2026-06-21, browser MediaSource grał
# ten sam stub; user-reports „server down" c382d441/ef10b946). To NIE jest realne
# wideo → traktujemy jak brak źródła (lepiej żadne niż 3MB „server down" clip).
# Realne starsze sceny (cdnde.com / okcdn.ru direct mp4) przechodzą normalnie.
if "/upload/videos/video_down.mp4" in content_url:
log.info("hqfap: stub video_down.mp4 (placeholder, no real video) on %s", page_url)
return None
qm = _QUALITY_RE.search(content_url)
quality = f"{qm.group(1)}p" if qm else None
return [