Spaces:
Running
Running
v12.0.3: movies4u return exactly one fresh m4uplay token per scrape (IP burst limit makes 2nd entry unusable)
Browse files1146 unmodified lines114711481149115011511152115311501151115211531154115511564 unmodified lines116111621163116411641165116611671146 unmodified lines if resolved: results_all.extend(resolved)
# m4uplay / acek-cdn m3u8 tokens are extremely short-lived and behave as # effectively single-use (a validation GET burns them -> PNG block page for # the player). So we do NOT pre-validate; instead return FRESH tokens per # scrape, m4uplay-hosted first (longest-lived), capped at 2 entries. # m4uplay / acek-cdn m3u8 tokens are extremely short-lived and the operator # burst-rate-limits by IP (2nd rapid playlist fetch from one IP -> PNG block # page). So: NO pre-validation (it burns the token), return exactly ONE fresh # m4uplay-hosted token per scrape (m4uplay preferred, longest-lived). seen = set() cand = [] for r in results_all:4 unmodified lines cand.append(r) m3u8_cands = [c for c in cand if ".m3u8" in c["url"]] m3u8_cands.sort(key=lambda c: (0 if "m4uplay" in c["url"] else 1)) m3u8_cands = m3u8_cands[:2] m3u8_cands = m3u8_cands[:1] ok_m3u8 = {c["url"] for c in m3u8_cands}
for r in cand:main.py+5-5