From 5477d53a8107469834f0fe8277939a8597f51bdb Mon Sep 17 00:00:00 2001 From: UrloMythus Date: Thu, 4 Jun 2026 20:39:48 +0200 Subject: [PATCH] fix for sutitles --- Src/API/extractors/vidxgo.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Src/API/extractors/vidxgo.py b/Src/API/extractors/vidxgo.py index cdb45ba..2bf0e9c 100644 --- a/Src/API/extractors/vidxgo.py +++ b/Src/API/extractors/vidxgo.py @@ -92,14 +92,16 @@ async def vidxgo(link,client,streams,instance_url): decrypted_code = u.decode('utf-8') match = re.search(r'currentSrc.+"(https:[^";]+)',decrypted_code) submatch = re.search(r'window.__EXTERNAL_SUBS\s+=\s+(\[.*]);',decrypted_code) + suburlmatch = re.search(r'window.__SUBS_ORIGIN\s+=\s*"(.*)";',decrypted_code) if match: url = match.group(1).replace("\\","") subtitles = [] - if submatch: + if submatch and suburlmatch: subtitles = json.loads(submatch.group(1)) for item in subtitles: del item['forced'] - del item['url'] + del item['file'] + item['url'] = suburlmatch.group(1).replace('\\','') + item['url'] streams['streams'].append({'name': f"{Name}",'title': f'{Icon}Vidxgo\n ▶️ Vidxgo', 'url': f'{instance_url}/clone/manifest.m3u8?d={b64encode(url.encode("utf-8")).decode("utf-8")}', 'behaviorHints': {'proxyHeaders': {"request": {"User-Agent": 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36',"Accept": "*/*", "Accept-Language":"en-US,en;q=0.9","Referer":VD_DOMAIN+"/","Origin":VD_DOMAIN,"Sec-GPC": "1","Connection": "keep-alive","Sec-Fetch-Dest":"empty","Sec-Fetch-Mode":"cors","Sec-Fetch-Site":"cross-site","DNT": "1","Priority":"u=0"}}, 'notWebReady': True, 'bingeGroup': f'vidxgo'},'subtitles' : subtitles}) logger.info(f"Vidxgo found results for the current ID") @@ -109,7 +111,7 @@ async def vidxgo(link,client,streams,instance_url): async def test_vidxgo(): from curl_cffi.requests import AsyncSession async with AsyncSession() as client: - results = await vidxgo("https://v.vidxgo.co/tt16426418",client,{'streams': []},"localhost") + results = await vidxgo("https://v.vidxgo.co/tt1190634/1/1",client,{'streams': []},"localhost") print(results) if __name__ == "__main__": import asyncio