Spaces:
Running
Running
Z User commited on
Commit ·
4c78e79
1
Parent(s): f9e41f8
v15: +yamie (vidrift browser-direct movie VOD) +stycanine (Showbox/FebBox via public TMDB-Embed-API deployment)
Browse files2233 unmodified lines22342235223622372238223943 unmodified lines2283228422852286228722882233 unmodified linesreturn results, errors# ===== Source Map =====SOURCE_MAP = {43 unmodified lines"hexa": {"name": "Hexa", "fn": lambda tid, mt, s, e: scrape_hexa(tid, mt, s, e),"languages": ["English"], "reliability": "low","note": "theemoviedb.hexa.su + enc-dec.app (Vyla hexa.js port). dragonballzfans CDNs, movie+TV, intermittent"},}DEFAULT_SOURCES = ["castle", "netmirror", "playbox", "movix", "vidfast", "vidup",2233 unmodified lines223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232743 unmodified lines23712372237323742375237623772378237923802381238223832233 unmodified linesreturn results, errors# ===== Yamie (vidrift direct VOD endpoint — movies only, browser-direct) =====# Found via ZETIC7Z/nexus3.0 (their #2 ranked source). media.vidrift.in serves# a LITERAL per-TMDB movie playlist: https://media.vidrift.in/movie_{tmdb_id}/vod.m3u8# Flat VOD, relative .ts segments, Access-Control-Allow-Origin: * on playlists# AND segments (verified) — the player loads it browser-direct at residential# speed with zero proxy load. TV is not supported upstream (404 for every# series URL pattern; nexus3.0 also marks it moviesOnly).async def scrape_yamie(tmdb_id: int, media_type: str, season: int = None, episode: int = None):results, errors = [], []if media_type != "movie":errors.append("Yamie: movies only upstream")return results, errorsurl = f"https://media.vidrift.in/movie_{tmdb_id}/vod.m3u8"try:async with httpx.AsyncClient(timeout=15, follow_redirects=True) as client:r = await client.get(url, headers={"User-Agent": HEADERS["User-Agent"]})if r.status_code == 200 and r.text.lstrip().startswith("#EXTM3U"):if any(l.strip() and not l.strip().startswith("#") for l in r.text.splitlines()):results.append(_sf_stream_result("Yamie", "Yamie - VOD Direct", url,quality="Auto", language="English"))else:errors.append("Yamie: empty playlist")else:errors.append(f"Yamie: HTTP {r.status_code}")except Exception as ex:errors.append(f"Yamie: {str(ex)}")return results, errors# ===== Showbox via stycanine1 TMDB-Embed-API (FebBox / hls.shegu.net) =====# Showbox/FebBox needs a ui= login cookie on www.febbox.com/file/player that we# do not own. The public stycanine1-tmdb-embed-api.hf.space deployment (Node# port of Inside4ndroid/TMDB-Embed-API) carries FEBBOX_COOKIES and returns# signed hls.shegu.net masters (multi CDN nodes, multi-audio tracks, movie+TV)# with no auth and CORS open. Verified: 18 streams for Venom 912649 in 4.4s,# master + media playlist + segment all 200 through our proxy chain.# Third-party dependency: if that Space sleeps or disappears, this source just# fails fast and the player's chain moves on — same failure mode as any other# upstream outage._STY_BASE = "https://stycanine1-tmdb-embed-api.hf.space"async def scrape_stycanine(tmdb_id: int, media_type: str, season: int = None, episode: int = None):results, errors = [], []try:path = f"{_STY_BASE}/api/streams/showbox/{'series' if media_type == 'tv' else 'movie'}/{tmdb_id}"params = {}if media_type == "tv":params = {"season": season or 1, "episode": episode or 1}async with httpx.AsyncClient(timeout=30, follow_redirects=True) as client:r = await client.get(path, params=params)if r.status_code != 200:errors.append(f"Showbox: aggregator HTTP {r.status_code}")return results, errorsd = r.json()if not d.get("success"):errors.append("Showbox: aggregator reported failure")return results, errorsseen_ids = set()for s in (d.get("streams") or []):u = (s or {}).get("url") or ""# m3u8 masters only — the /vip/ extensionless entries are raw MKVsif ".m3u8" not in u:continuem = re.search(r"shegu\.net/(\d+)\.m3u8", u)key = m.group(1) if m else uif key in seen_ids:continueseen_ids.add(key)title = (s.get("title") or "stream")[:48]quality = (s.get("quality") or "Auto")if quality == "ORG":quality = "Auto"pu = _proxy_wrap(u)results.append(_sf_stream_result("Showbox", f"Showbox - {title}", pu,quality=quality, language="English"))if len(results) >= 6:breakif not results:errors.append("Showbox: no streams")except Exception as ex:errors.append(f"Showbox: {str(ex)}")return results, errors# ===== Source Map =====SOURCE_MAP = {43 unmodified lines"hexa": {"name": "Hexa", "fn": lambda tid, mt, s, e: scrape_hexa(tid, mt, s, e),"languages": ["English"], "reliability": "low","note": "theemoviedb.hexa.su + enc-dec.app (Vyla hexa.js port). dragonballzfans CDNs, movie+TV, intermittent"},# --- v15: new sources (Sep 2026 research round) ---"yamie": {"name": "Yamie", "fn": lambda tid, mt, s, e: scrape_yamie(tid, mt, s, e),"languages": ["English"], "reliability": "high","note": "media.vidrift.in literal per-TMDB VOD playlist (from ZETIC7Z/nexus3.0). Browser-direct (ACAO * on playlist+segments), movies only, 4MB/s+ segment speed"},"stycanine": {"name": "Showbox", "fn": lambda tid, mt, s, e: scrape_stycanine(tid, mt, s, e),"languages": ["English", "Multi"], "reliability": "medium","note": "Showbox/FebBox hls.shegu.net streams via the public stycanine1 TMDB-Embed-API deployment (it carries the FEBBOX_COOKIES we lack). movie+TV, multi CDN nodes, proxied through this Space"},}DEFAULT_SOURCES = ["castle", "netmirror", "playbox", "movix", "vidfast", "vidup",
main.py+95