youperv.com (DataLife Engine) carries paysite rips titled "Studio - Performer - Title" (71% of a 132-title sample), ~60-70 new scenes/day. Browse the homepage + /page/N/ (19 scenes/page, no overlap); scene URL is /<category>/<id>-<slug>.html. Cast is scoped to the fmeta block (up to the Related section): the whole page carries 19-26 /xfsearch/pornstar/ links but only 1-2 are the actual cast, so without scoping this would repeat the page-wide pollution that got xxxfiles rejected. Studio comes from the title prefix, guarded so a performer name is never mistaken for a studio. Duration, ISO release date, per-scene tags and thumbnail all come from the same block. Playback is a plain <source> mp4 (files.klubnichka-hd.com) with no token or expiry, but the CDN hotlink-guards on Referer: bare Range gets 403, Range + Referer + browser UA gets 206 cross-IP from the VPS. So the extractor returns it with referer + mobile_direct_ok and the phone streams straight from the CDN, no WebView and no proxy. Path is percent-encoded because the filenames contain spaces. Deep-crawl capped at 2000 pages: beyond that (<=09.2023) the catalog turns into generic amateur uploads with no performers and dead CDN files. Verified: 19 scenes/page with studio+cast+duration+date, max 2 performers per scene (pollution guard holds), 0/19 missing duration, playback 206 video/mp4. Pilot ingest 3 pages: 57 seen, 39 attached to existing canonical scenes, 18 new, 0 errors. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
52 lines
1.9 KiB
Python
52 lines
1.9 KiB
Python
"""youperv.com — direct mp4 extractor (fluidplayer). Dodany 2026-07-26.
|
|
|
|
Scene page ma zwykły `<source type="video/mp4" src="https://files.klubnichka-hd.com/...">`
|
|
— BEZ tokena, bez expiry, bez KVS/DoodStream/iframe. URL zawiera spacje (tytuł w
|
|
ścieżce), więc trzeba go za-quote'ować przed podaniem playerowi.
|
|
|
|
CDN ma hotlink-guard na **Referer**: goły Range → 403 nginx, Range + Referer
|
|
`https://youperv.com/` + browser UA → 206 `video/mp4` (zweryfikowane cross-IP z VPS).
|
|
Nie jest IP-bound, więc `mobile_direct_ok` → telefon gra prosto z CDN, zero proxy
|
|
i zero WebView. playback.py dokleja Referer+UA z `referer=` do nagłówków StreamLink.
|
|
"""
|
|
from __future__ import annotations
|
|
|
|
import logging
|
|
import re
|
|
from urllib.parse import quote, urlsplit, urlunsplit
|
|
|
|
from app.extractors._fetch import fetch_tube_html
|
|
from app.extractors._models import StreamSource
|
|
|
|
log = logging.getLogger(__name__)
|
|
|
|
_BASE = "https://youperv.com"
|
|
_SOURCE_RE = re.compile(
|
|
r'<source[^>]+src="([^"]+\.(?:mp4|m4v)[^"]*)"', re.IGNORECASE
|
|
)
|
|
|
|
|
|
def _encode_url(url: str) -> str:
|
|
"""Spacje/znaki specjalne w ścieżce → percent-encoding (ExoPlayer inaczej odpada).
|
|
Query zostawiamy nietknięte."""
|
|
parts = urlsplit(url)
|
|
return urlunsplit(
|
|
(parts.scheme, parts.netloc, quote(parts.path, safe="/%"), parts.query, parts.fragment)
|
|
)
|
|
|
|
|
|
def extract(page_url: str, *, timeout: float = 60.0) -> list[StreamSource] | None:
|
|
html_text = fetch_tube_html(page_url, timeout=timeout)
|
|
m = _SOURCE_RE.search(html_text)
|
|
if not m:
|
|
log.info("youperv: no <source> mp4 on %s", page_url)
|
|
return None
|
|
return [
|
|
StreamSource(
|
|
link=_encode_url(m.group(1).strip()),
|
|
type="mp4",
|
|
referer=_BASE + "/",
|
|
# Token brak; CDN pilnuje tylko Referera (cross-IP 206) → mobile direct.
|
|
raw={"mobile_direct_ok": True},
|
|
)
|
|
]
|