If you downloaded a portable MP4 version of the season (small file size for USB drives), YIFY subtitles are famously synced to their specific encodes.
try: req = urllib.request.Request(url, headers=headers) with urllib.request.urlopen(req, timeout=15) as response: data = json.loads(response.read()) if data.get("data"): # Get first English subtitle sub_file = data["data"][0]["attributes"]["files"][0] download_url = sub_file["url"] return download_url except Exception as e: print(f" Search error for Eepisode:02d: e") return None