Spaces:
Running
Running
v9: add Cineby, PurStream, Movix, MoviesHunt, HDHub4u, VegaMovies, Movies4u (ported from Nuvio + MediaVanced, live-tested)
Browse files122345678910117 unmodified lines192021222324252624272829302437 unmodified lines24682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307328 unmodified lines3102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731282504312931303131313254 unmodified lines3187318831892565319031913192319331 unmodified lines32253226322732283229323032313232323332343235323632373238323932403241324232432604260526063244324532463247324832493250325132523253"""StreamForge API v8 - Multi-Language Stream ScraperStreamForge API v9 - Multi-Language Stream ScraperScrapes direct m3u8 URLs from multiple sourcesUpdated: MovieBox, Castle, VidLink, VidSrc, NetMirrorAdded: VidFast, ShowBox, GoatAPIRemoved: CineSu (dead), PrimeSrc (Cloudflare), DooFlix (API key revoked)v9: Added Cineby, PurStream, Movix, MoviesHunt, HDHub4u, VegaMovies, Movies4u (ported + live-tested from All-in-One-Nuvio & MediaVanced repos)"""
from fastapi import FastAPI, HTTPException, Query7 unmodified linesimport timeimport asyncioimport hashlibfrom urllib.parse import quote
app = FastAPI( title="StreamForge API", description="Multi-language m3u8 stream scraper", version="8.1.0", version="9.0.0",)
app.add_middleware(2437 unmodified lines return results, errors
# ===== v9 Scrapers (ported from All-in-One-Nuvio & MediaVanced, tested) =====
def _sf_stream_result(source: str, title: str, url: str, quality: str = "Auto", language: str = "English") -> dict: return { "source": source, "title": title, "quality": quality, "language": detect_language(language) if language else "English", "url": url, "type": "m3u8" if ".m3u8" in url else "direct", }
def _sf_norm(s: str) -> str: return re.sub(r"[^a-z0-9]", "", (s or "").lower())
# ---------- Cineby (Nuvio cineby.js): speedracelight API + custom keystream cipher ----------
_CB_MAGIC = b"mvm1"_CB_GOLDEN = 0x9E3779B9_CB_API = "https://api.speedracelight.com"_CB_HEADERS = { "User-Agent": HEADERS["User-Agent"], "Referer": "https://www.cineby.at/", "Origin": "https://www.cineby.at",}
def _cb_imul(a: int, b: int) -> int: return (a * b) & 0xFFFFFFFF
def _cb_fmix32(h: int) -> int: h &= 0xFFFFFFFF h ^= h >> 16 h = _cb_imul(h, 0x85EBCA6B) h ^= h >> 13 h = _cb_imul(h, 0xC2B2AE35) h ^= h >> 16 return h
def _cb_fnv1a32(s: str) -> int: h = 0x811C9DC5 for ch in s: h = _cb_imul(h ^ ord(ch), 0x01000193) return _cb_fmix32(h)
def _cb_rotl32(x: int, n: int) -> int: n &= 31 x &= 0xFFFFFFFF if n == 0: return x return ((x << n) | (x >> (32 - n))) & 0xFFFFFFFF
def _cb_keystream(seed: str, media_id: int, length: int) -> bytes: """Python port of cineby's custom keystream generator (mvm1 magic).""" state = _cb_fmix32(_cb_fnv1a32(seed) ^ _cb_fmix32((media_id ^ _CB_GOLDEN) & 0xFFFFFFFF)) slots = {} for i in range(8): idx = state % 61 state = _cb_rotl32((state + _CB_GOLDEN) & 0xFFFFFFFF, 7 + (7 & i)) slots[idx] = (state ^ _cb_fmix32(state)) & 0xFFFFFFFF state = _cb_fmix32((state + idx) & 0xFFFFFFFF) acc = _cb_fmix32((0xA5A5A5A5 ^ state) & 0xFFFFFFFF) out = bytearray() cnt = 0 while len(out) < length: idx = acc % 61 in_slots = 0xFFFFFFFF if idx in slots else 0 slot = slots.get(idx, 0) & 0xFFFFFFFF a = (slot ^ _cb_imul(_CB_GOLDEN, cnt + 1)) & 0xFFFFFFFF b = ((acc ^ a) | (acc & a & in_slots)) & 0xFFFFFFFF c = (_cb_rotl32((b + acc) & 0xFFFFFFFF, 31 & idx) ^ _cb_rotl32(acc, 31 & _cb_imul(idx, 7))) & 0xFFFFFFFF w = _cb_fmix32((c + _CB_GOLDEN) & 0xFFFFFFFF) slots[idx] = w acc = w cnt += 1 out.append(w & 0xFF) if len(out) < length: out.append((w >> 8) & 0xFF) if len(out) < length: out.append((w >> 16) & 0xFF) if len(out) < length: out.append((w >> 24) & 0xFF) return bytes(out)
def _cb_decrypt(payload_b64: str, seed: str, media_id: int) -> str: b64 = payload_b64.replace("-", "+").replace("_", "/") b64 += "=" * (-len(b64) % 4) data = base64.b64decode(b64) ks = _cb_keystream(seed, media_id, len(data)) xored = bytes(x ^ y for x, y in zip(data, ks)) if xored[:4] != _CB_MAGIC: raise ValueError("bad magic (decrypt failed)") return xored[4:].decode("utf-8", errors="ignore")
async def scrape_cineby(tmdb_id: int, media_type: str, season: int = None, episode: int = None): results = [] errors = []
try: info = await get_tmdb_info(tmdb_id, media_type) if not info.get("title"): return [], ["Cineby: no TMDB title"]
async with httpx.AsyncClient(timeout=20, follow_redirects=True, headers=_CB_HEADERS) as client: seed_resp = await client.get(f"{_CB_API}/seed", params={"mediaId": tmdb_id}) seed = seed_resp.json().get("seed") if not seed: return [], ["Cineby: no seed returned"]
params = { "title": info["title"], "mediaType": "tv" if media_type == "tv" else "movie", "year": info.get("year") or "", "episodeId": str(episode or 1), "seasonId": str(season or 1), "tmdbId": str(tmdb_id), "imdbId": info.get("imdb_id") or "", "enc": "2", "seed": seed, } src_resp = await client.get(f"{_CB_API}/cdn/sources-with-title", params=params) data = json.loads(_cb_decrypt(src_resp.text, seed, tmdb_id))
for src in data.get("sources", []): url = src.get("url") if not url: continue q = src.get("quality") or "Auto" lang = src.get("lang") or src.get("language") or "English" results.append(_sf_stream_result( f"Cineby/{q}", f"Cineby {q} - {lang}", url, quality=(q.upper() if isinstance(q, str) and q.endswith("p") else "Auto"), language=lang, ))
if not results: errors.append("Cineby: no streams in payload")
except Exception as e: errors.append(f"Cineby: {str(e)}")
return results, errors
# ---------- PurStream (Nuvio purstream.js): search + sheet API ----------
async def scrape_purstream(tmdb_id: int, media_type: str, season: int = None, episode: int = None): results = [] errors = []
try: info = await get_tmdb_info(tmdb_id, media_type) title = info.get("title") if not title: return [], ["PurStream: no TMDB title"]
headers = {"User-Agent": HEADERS["User-Agent"], "Referer": "https://purstream.club/"} async with httpx.AsyncClient(timeout=20, follow_redirects=True, headers=headers) as client: resp = await client.get(f"https://api.purstream.club/api/v1/search-bar/search/{quote(str(title))}") items = resp.json().get("data", {}).get("items", {}) candidates = [] for key in ("movies", "tv", "series", "tvshows"): bucket = items.get(key) or {} sub = bucket.get("items") if isinstance(bucket, dict) else bucket if isinstance(sub, list): candidates.extend(sub)
# catalog items lack tmdbId -> match by title, verify tmdbId via sheet media_id, sheet = None, None for item in candidates: if _sf_norm(item.get("title")) == _sf_norm(title): try: probe = (await client.get( f"https://api.purstream.club/api/v1/media/{item['id']}/sheet")).json() if str(probe.get("data", {}).get("items", {}).get("tmdbId")) == str(tmdb_id): media_id, sheet = item.get("id"), probe break except Exception: continue if not media_id or sheet is None: return [], ["PurStream: title not found in catalog"]
urls = sheet.get("data", {}).get("items", {}).get("urls", []) if media_type == "tv": s, e = season or 1, episode or 1 pat = re.compile(rf"/S{s:02d}/E{e:02d}/|S{s}\.?E{e}\b", re.I) urls = [u for u in urls if pat.search(u.get("url") or "") or pat.search(u.get("name") or "")]
for u in urls: url = u.get("url") if not url: continue name = u.get("name") or "PurStream" results.append(_sf_stream_result(f"PurStream/{name}", f"PurStream - {name}", url))
if not results: errors.append("PurStream: no stream urls")
except Exception as e: errors.append(f"PurStream: {str(e)}")
return results, errors
# ---------- Movix (Nuvio movix.js): api.movix.cash direct API ----------
async def scrape_movix(tmdb_id: int, media_type: str, season: int = None, episode: int = None): results = [] errors = []
try: headers = {"User-Agent": HEADERS["User-Agent"], "Referer": "https://movix.cash/"} async with httpx.AsyncClient(timeout=20, follow_redirects=True, headers=headers) as client: if media_type == "tv": url = f"https://api.movix.cash/api/purstream/tv/{tmdb_id}/stream" params = {"season": season or 1, "episode": episode or 1} else: url = f"https://api.movix.cash/api/purstream/movie/{tmdb_id}/stream" params = {} resp = await client.get(url, params=params) data = resp.json() if data.get("error"): return [], [f"Movix: {data.get('error')}"]
for src in data.get("sources", []): surl = src.get("url") if not surl: continue name = src.get("name") or "Movix" results.append(_sf_stream_result(f"Movix/{name}", f"Movix - {name}", surl))
if not results: errors.append("Movix: no sources")
except Exception as e: errors.append(f"Movix: {str(e)}")
return results, errors
# ---------- HubCloud family resolver (MediaVanced hubcloud.py, generalized) ----------
_SF_LINK_PROVIDERS = re.compile( r'https?://[^\s"\'<>]*(?:hubcloud\.[a-z]+/(?:drive|video)/[A-Za-z0-9_\-]+' r'|hubdrive\.[a-z]+/file/[A-Za-z0-9]+' r'|hblinks\.[a-z]+/archives/\d+' r'|vcloud\.[a-z]+/[A-Za-z0-9]+' r'|nexdrive\.[a-z]+/[A-Za-z0-9]+' r'|abhilinks\.[a-z]+/archives/\d+/?)',)_SF_SPORTVERSE = re.compile(r'https?://sportverse\.cc/hubcloud\.php\?[^"\'<>]+')_SF_MOBILE_UA = "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Mobile Safari/537.36"
def _sf_extract_links(html: str) -> list: seen, out = set(), [] for m in _SF_LINK_PROVIDERS.finditer(html or ""): u = m.group(0) if u not in seen: seen.add(u) out.append(u) return out
def _sf_pixeldrain_direct(u: str) -> str: m = re.search(r'pixeldrain\.[a-z]+/u/([A-Za-z0-9]+)', u) if m: return f"https://pixeldrain.com/api/file/{m.group(1)}?download" return u
async def _sf_resolve_hubcloud(client: httpx.AsyncClient, link: str) -> list: """Resolve one hubcloud-family page into direct file URLs.""" out = [] try: if "/video/" in link or "hubvid" in link: page = (await client.get(link)).text sport = _SF_SPORTVERSE.search(page) if sport: page = (await client.get(sport.group(0), headers={"Referer": link})).text else: page = (await client.post(link)).text m = re.search(r"var\s+url\s*=\s*'(https?://[^']+)'", page) if m: page = (await client.get(m.group(1))).text for b in re.finditer(r'<a[^>]+href="(https?://[^"]+)"[^>]+class="[^"]*btn[^"]*"', page): u = b.group(1) chunk = page[b.start():b.start() + 800] fm = re.search(r'download="([^"]{5,110})"', chunk) fname = fm.group(1) if fm else "" if "pixeldrain" in u: out.append({"url": _sf_pixeldrain_direct(u), "label": fname or "Direct"}) elif any(u.endswith(ext) or f"{ext}?" in u for ext in (".mkv", ".mp4")) and ".zip" not in u: out.append({"url": u, "label": fname or "Direct"}) elif "cloudflarestorage" in u or "workers.dev" in u: out.append({"url": u, "label": fname or "Direct"}) except Exception: pass return out
def _sf_quality_from_name(name: str) -> str: low = (name or "").lower() if "2160" in low or "4k" in low: return "4K" if "1080" in low: return "1080p FHD" if "720" in low: return "720p HD" if "480" in low: return "480p SD" return "Auto"
def _sf_lang_from_name(name: str) -> str: low = (name or "").lower() if "dual audio" in low or "multi" in low: return "Multi" langs = [] if "hindi" in low or "esubs" in low: langs.append("Hindi") if "tamil" in low: langs.append("Tamil") if "telugu" in low: langs.append("Telugu") if "english" in low or "eng" in low: langs.append("English") return " + ".join(langs) if langs else "English"
def _sf_episode_matches(label: str, season: int, episode: int) -> bool: if not label: return True low = label.lower() s_ok = re.search(rf'\bs{season:02d}e{episode:02d}\b|s{season}\.?e{episode}\b|season.{season}\b', low) e_ok = re.search(rf'\be{episode:02d}\b|episode.{episode}\b|ep.{episode}\b|e{episode}\b', low) season_only = re.search(rf'season.{season}\b|s{season:02d}\b|s{season}\b', low) return bool(s_ok or (e_ok and (season_only or "season" in low)) or season_only)
def _sf_hubcloud_results(source_name: str, resolved: list, media_type: str, season, episode) -> list: results = [] seen_urls = set() for r in resolved: u, label = r["url"], r["label"] if u in seen_urls: continue seen_urls.add(u) if media_type == "tv" and not _sf_episode_matches(label, season or 1, episode or 1): continue results.append(_sf_stream_result( f"{source_name}/HubCloud", f"{source_name} - {label or 'Direct'}", u, quality=_sf_quality_from_name(label), language=_sf_lang_from_name(label))) return results
PHISHER_DOMAINS = "https://raw.githubusercontent.com/phisher98/TVVVV/refs/heads/main/domains.json"VEGA_URLS = "https://raw.githubusercontent.com/SaurabhKaperwan/Utils/refs/heads/main/urls.json"
_SF_HUB_HEADERS = {"User-Agent": _SF_MOBILE_UA, "Accept": "text/html,application/xhtml+xml,*/*", "Accept-Language": "en-US,en;q=0.5"}
# ---------- HDHub4u (Nuvio hdhub4u.js): Typesense search + hubcloud resolve ----------
async def scrape_hdhub4u(tmdb_id: int, media_type: str, season: int = None, episode: int = None): results = [] errors = []
try: info = await get_tmdb_info(tmdb_id, media_type) title, imdb, year = info.get("title"), info.get("imdb_id"), info.get("year") if not title: return [], ["HDHub4u: no TMDB title"]
headers = {**_SF_HUB_HEADERS, "Cookie": "xla=s4t", "Referer": "https://new1.hdhub4u.cl/"} async with httpx.AsyncClient(timeout=25, follow_redirects=True, headers=headers) as client: doms = (await client.get(PHISHER_DOMAINS)).json() site = (doms.get("HDHUB4u") or "https://new5.hdhub4u.cl").rstrip("/") search = await client.get( "https://search.pingora.fyi/collections/post/documents/search", params={ "q": f"{title} {year}".strip(), "query_by": "post_title,category", "query_by_weights": "4,2", "sort_by": "sort_by_date:desc", "limit": "15", "highlight_fields": "none", "use_cache": "true", "page": "1", }) hits = search.json().get("hits", []) permalink = None for h in hits: doc = h.get("document", {}) if doc.get("imdb_id") == imdb: permalink = doc.get("permalink") break if not permalink and hits: doc = hits[0].get("document", {}) if _sf_norm(title) in _sf_norm(doc.get("post_title")): permalink = doc.get("permalink") if not permalink: return [], ["HDHub4u: post not found"] if not permalink.startswith("http"): permalink = f"{site}/{permalink.lstrip('/')}"
post_html = (await client.get(permalink)).text links = _sf_extract_links(post_html) expanded = [] for lk in links[:14]: if any(x in lk for x in ("hubdrive.", "hblinks.", "abhilinks.")): try: sub_html = (await client.get(lk)).text expanded.extend(_sf_extract_links(sub_html)[:6]) except Exception: pass else: expanded.append(lk)
seen, resolved = set(), [] for lk in expanded: if lk in seen: continue seen.add(lk) resolved.extend(await _sf_resolve_hubcloud(client, lk))
results = _sf_hubcloud_results("HDHub4u", resolved, media_type, season, episode) if not results: errors.append("HDHub4u: no resolvable streams (hubcloud may be CF-blocked)")
except Exception as e: errors.append(f"HDHub4u: {str(e)}")
return results, errors
# ---------- VegaMovies (Nuvio vegamovies.js): WP search by imdb + nexdrive/vcloud ----------
async def scrape_vegamovies(tmdb_id: int, media_type: str, season: int = None, episode: int = None): results = [] errors = []
try: info = await get_tmdb_info(tmdb_id, media_type) imdb = info.get("imdb_id") if not imdb: return [], ["VegaMovies: no imdb id"]
async with httpx.AsyncClient(timeout=25, follow_redirects=True, headers=_SF_HUB_HEADERS) as client: urls_cfg = (await client.get(VEGA_URLS)).json() site = (urls_cfg.get("vegamovies") or "https://new2.vegamovies.futbol").rstrip("/") search = (await client.get(f"{site}/search.php", params={"q": imdb, "page": 1, "per_page": 15})).json() hits = search.get("hits", []) if not hits: return [], ["VegaMovies: not found"]
doc = None for h in hits: d = h.get("document", {}) if d.get("imdb_id") == imdb: doc = d break if not doc: slug_frag = re.sub(r'[^a-z0-9]+', '-', (info.get("title") or "").lower()).strip('-') for h in hits: d = h.get("document", {}) if slug_frag in (d.get("permalink") or "").lower(): doc = d break if not doc: return [], ["VegaMovies: no exact match for this title"]
post = (await client.get(f"{site}/wp-json/wp/v2/posts/{doc.get('id')}")).json() content = post.get("content", {}).get("rendered", "") links = _sf_extract_links(content)
seen, resolved = set(), [] for lk in links[:16]: if lk in seen: continue seen.add(lk) resolved.extend(await _sf_resolve_hubcloud(client, lk))
results = _sf_hubcloud_results("VegaMovies", resolved, media_type, season, episode) if not results: errors.append("VegaMovies: no resolvable streams (hubcloud may be CF-blocked)")
except Exception as e: errors.append(f"VegaMovies: {str(e)}")
return results, errors
# ---------- Movies4u (Nuvio movies4u.js): WP + m4uplay + hubcloud ----------
async def scrape_movies4u(tmdb_id: int, media_type: str, season: int = None, episode: int = None): results = [] errors = []
try: info = await get_tmdb_info(tmdb_id, media_type) title = info.get("title") if not title: return [], ["Movies4u: no TMDB title"]
async with httpx.AsyncClient(timeout=25, follow_redirects=True, headers=_SF_HUB_HEADERS) as client: doms = (await client.get(PHISHER_DOMAINS)).json() site = (doms.get("movies4u") or "https://new5.movies4u.clinic").rstrip("/") search_html = (await client.get(f"{site}/", params={"s": title})).text posts = re.findall(r'href="(https?://[^"]*movies4u[^"]*/[^"/]+/)"', search_html) slug_frag = re.sub(r'[^a-z0-9]+', '-', title.lower()).strip('-') post_url = next((p for p in posts if slug_frag in p.lower()), None) if not post_url and posts: post_url = posts[0] if not post_url: return [], ["Movies4u: post not found"]
post_html = (await client.get(post_url)).text m4uplay_links = re.findall(r'https?://m4uplay\.[a-z]+/file/[A-Za-z0-9]+', post_html) links = list(m4uplay_links) + _sf_extract_links(post_html)
seen, resolved = set(), [] for lk in links[:16]: if lk in seen: continue seen.add(lk) if "m4uplay." in lk: try: player_html = (await client.get(lk)).text for nl in re.findall(r'https?://m4ulinks\.[a-z]+/number/\d+', player_html)[:4]: num_html = (await client.get(nl)).text for hl in _sf_extract_links(num_html)[:6]: if hl not in seen: seen.add(hl) resolved.extend(await _sf_resolve_hubcloud(client, hl)) except Exception: pass elif any(x in lk for x in ("hubcloud.", "hubdrive.", "vcloud.", "hblinks.", "abhilinks.")): resolved.extend(await _sf_resolve_hubcloud(client, lk))
results = _sf_hubcloud_results("Movies4u", resolved, media_type, season, episode) if not results: errors.append("Movies4u: no resolvable streams (hubcloud may be CF-blocked)")
except Exception as e: errors.append(f"Movies4u: {str(e)}")
return results, errors
# ---------- MoviesHunt (Nuvio movieshunt.js): WP + abhilinks + hubvid proxy ----------
async def scrape_movieshunt(tmdb_id: int, media_type: str, season: int = None, episode: int = None): results = [] errors = []
try: info = await get_tmdb_info(tmdb_id, media_type) title = info.get("title") if not title: return [], ["MoviesHunt: no TMDB title"]
async with httpx.AsyncClient(timeout=25, follow_redirects=True, headers=_SF_HUB_HEADERS) as client: search_html = (await client.get("https://movieshunt.run/", params={"s": title})).text posts = list(dict.fromkeys(re.findall(r'href="(https?://movieshunt\.[a-z]+/[^"/]+/)"', search_html))) if not posts: return [], ["MoviesHunt: no posts found"]
links = [] for p in posts[:3]: try: links.extend(_sf_extract_links((await client.get(p)).text)) except Exception: continue if not links: return [], ["MoviesHunt: no links in posts"]
seen, resolved = set(), [] for lk in links[:14]: if lk in seen: continue seen.add(lk) if any(x in lk for x in ("abhilinks.", "hubdrive.", "hblinks.")): try: sub_html = (await client.get(lk)).text for hl in _sf_extract_links(sub_html)[:8]: if hl not in seen: seen.add(hl) resolved.extend(await _sf_resolve_hubcloud(client, hl)) except Exception: pass else: resolved.extend(await _sf_resolve_hubcloud(client, lk))
results = _sf_hubcloud_results("MoviesHunt", resolved, media_type, season, episode) if not results: errors.append("MoviesHunt: no resolvable streams")
except Exception as e: errors.append(f"MoviesHunt: {str(e)}")
return results, errors
# ===== Source Map =====
SOURCE_MAP = {28 unmodified lines "goatapi": {"name": "GoatAPI", "fn": lambda tid, mt, s, e: scrape_goatapi(tid, mt, s, e), "languages": ["English"], "reliability": "medium", "note": "TMDB ID only, no IMDB support"}, # ===== v9 additions (ported from All-in-One-Nuvio + MediaVanced, live-tested) ===== "cineby": {"name": "Cineby", "fn": lambda tid, mt, s, e: scrape_cineby(tid, mt, s, e), "languages": ["English", "Multi"], "reliability": "high", "note": "speedracelight API with custom keystream cipher (mvm1), up to 4K m3u8"}, "purstream": {"name": "PurStream", "fn": lambda tid, mt, s, e: scrape_purstream(tid, mt, s, e), "languages": ["English", "Multi"], "reliability": "high", "note": "purstream.club search+sheet API, m3u8, episodes supported"}, "movix": {"name": "Movix", "fn": lambda tid, mt, s, e: scrape_movix(tid, mt, s, e), "languages": ["English", "Multi"], "reliability": "high", "note": "api.movix.cash direct API, m3u8 1080p"}, "movieshunt": {"name": "MoviesHunt", "fn": lambda tid, mt, s, e: scrape_movieshunt(tid, mt, s, e), "languages": ["Hindi", "English", "Multi"], "reliability": "medium", "note": "WP + abhilinks + hubvid proxy, direct MKV via pixeldrain, best for movies"}, "hdhub4u": {"name": "HDHub4u", "fn": lambda tid, mt, s, e: scrape_hdhub4u(tid, mt, s, e), "languages": ["Hindi", "English", "Multi"], "reliability": "low", "note": "Typesense search + hubcloud resolver, direct MKV up to 4K; depends on Cloudflare not challenging server IP"}, "vegamovies": {"name": "VegaMovies", "fn": lambda tid, mt, s, e: scrape_vegamovies(tid, mt, s, e), "languages": ["Hindi", "English", "Multi"], "reliability": "low", "note": "WP search by IMDB + nexdrive/vcloud resolver; depends on Cloudflare not challenging server IP"}, "movies4u": {"name": "Movies4u", "fn": lambda tid, mt, s, e: scrape_movies4u(tid, mt, s, e), "languages": ["Hindi", "English", "Multi"], "reliability": "low", "note": "WP + m4uplay + hubcloud resolver; depends on Cloudflare not challenging server IP"},}
DEFAULT_SOURCES = ["vidrock", "vidlink", "goatapi", "netmirror", "moviebox", "m4uhd", "castle"]DEFAULT_SOURCES = ["vidrock", "vidlink", "goatapi", "netmirror", "moviebox", "m4uhd", "castle", "cineby", "purstream", "movix"]
# ===== Helper: Run scrapers =====54 unmodified linesasync def root(): return { "api": "StreamForge", "version": "8.0.0", "version": "9.0.0", "description": "Multi-language m3u8 stream scraper", "endpoints": { "movie": {31 unmodified lines "removed": ["CineSu (dead/404)", "PrimeSrc (Cloudflare blocked)", "DooFlix (API key revoked)", "VixSrc (Cloudflare blocked)"], }, "changelog_v9": { "added": ["Cineby (m3u8 up to 4K, movie+TV, keystream cipher port)", "PurStream (m3u8, movie+TV episodes)", "Movix (m3u8 1080p, movie+TV)", "MoviesHunt (direct MKV via pixeldrain, Hindi movies)", "HDHub4u (direct MKV up to 4K, Hindi, hubcloud resolver)", "VegaMovies (direct MKV, Hindi, nexdrive/vcloud resolver)", "Movies4u (direct MKV, Hindi, m4uplay+hubcloud resolver)"], "tested_rejected": ["SpencerDevs (domain dead)", "NHDApi (origin down 522)", "111Movies (SPA rewrite, no SSR data)", "MegaPlay (geo-shell to server IPs)", "CinemaOS (API changed)", "VidZee (API changed)", "CineVibe (env-locked token)", "VidPlus (origin down)", "PlayImdb (API unreliable)", "Torrentio (magnet links, not m3u8/direct)"], "source_repos": ["github.com/D3adlyRocket/All-in-One-Nuvio", "github.com/yogesh-hacker/MediaVanced"], }, "tips": [ "No source = default sources (vidrock, moviebox, netmirror, vidlink, vidfast, castle, videasy)", "Best for Hindi: /movie/ID/allmovieland or /movie/ID/moviebox or /movie/ID/castle", "Best for English: /movie/ID/vidrock or /movie/ID/vidlink or /movie/ID/vidfast or /movie/ID/videasy", "No source = default sources (vidrock, vidlink, goatapi, netmirror, moviebox, m4uhd, castle, cineby, purstream, movix)", "Best for Hindi: /movie/ID/allmovieland or /movie/ID/moviebox or /movie/ID/castle or /movie/ID/cineby", "Best for English: /movie/ID/vidrock or /movie/ID/vidlink or /movie/ID/vidfast or /movie/ID/cineby", "Cineby: up to 4K m3u8, custom keystream decrypt (mvm1), movie+TV", "PurStream/Movix: same CDN backend (finepulfe.xyz), m3u8, episodes supported", "MoviesHunt/HDHub4u/VegaMovies/Movies4u: direct MKV downloads (Hindi), hubcloud-family resolvers", "HubCloud-family sources may fail when Cloudflare challenges the server IP (retry later)", "Castle: hlowb.com API with AES-CBC encryption, channel IndiaA, multi-language + multi-quality", "NetMirror: Searches Netflix, PrimeVideo, Hotstar via API - great for Hindi/English", "VidLink/VidFast: Use enc-dec.app for ID encryption, supports M3U8 quality variants",main.py+651-7