From 960bc75be42d0664c8eab23e1d2ff7ad823f11a2 Mon Sep 17 00:00:00 2001 From: jtrzupek Date: Sun, 21 Jun 2026 23:01:19 +0200 Subject: [PATCH] fix(hqfap): reject 3MB video_down.mp4 stub (placeholder, not real video) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- app/extractors/tubes/hqfap.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/extractors/tubes/hqfap.py b/app/extractors/tubes/hqfap.py index ff918ff..67e233c 100644 --- a/app/extractors/tubes/hqfap.py +++ b/app/extractors/tubes/hqfap.py @@ -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 [