Vidxgo fix

This commit is contained in:
UrloMythus
2026-06-02 20:49:18 +02:00 Unverified
parent e1940f6cb7
commit 3fa81d4850
5 changed files with 167 additions and 18 deletions
+48 -10
View File
@@ -9,11 +9,32 @@ from fake_headers import Headers
random_headers = Headers()
import logging
from Src.Utilities.config import setup_logging
from base64 import b64encode,b64decode
level = config.LEVEL
logger = setup_logging(level)
import base64
from bs4 import BeautifulSoup,SoupStrainer
VD_DOMAIN = config.VD_DOMAIN
from curl_cffi.requests import AsyncSession
VD_PROXY = config.VD_PROXY
proxies = {}
if VD_PROXY == "1":
PROXY_CREDENTIALS = env_vars.get('PROXY_CREDENTIALS')
proxy_list = json.loads(PROXY_CREDENTIALS)
proxy = random.choice(proxy_list)
if proxy == "":
proxies = {}
else:
proxies = {
"http": proxy,
"https": proxy
}
VD_ForwardProxy = config.VD_ForwardProxy
if VD_ForwardProxy == "1":
ForwardProxy = env_vars.get('ForwardProxy')
else:
ForwardProxy = ""
VD_DOMAIN = config.VD_DOMAIN
headers = {
'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64; rv:150.0) Gecko/20100101 Firefox/150.0',
@@ -34,13 +55,31 @@ headers = {
'Priority': 'u=0, i',
}
headers2 = {
'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64; rv:150.0) Gecko/20100101 Firefox/150.0',
'Accept': '*/*',
'Accept-Language': 'en-US,en;q=0.9',
'Referer': 'https://v.vidxgo.co/tt34437972',
'Sec-GPC': '1',
'Connection': 'keep-alive',
'Sec-Fetch-Dest': 'empty',
'Sec-Fetch-Mode': 'cors',
'Sec-Fetch-Site': 'same-origin',
'DNT': '1',
'Priority': 'u=4',
}
async def vidxgo_refresh(link,id):
async with AsyncSession() as client:
headers['Referer'] = f'{VD_DOMAIN}/t/{id}'
response = await client.get(ForwardProxy + f'{VD_DOMAIN}/t/{id}', allow_redirects=True, headers = headers2, proxies = proxies)
return response.json()['url'].replace('\\','')
async def vidxgo(link,client,streams,proxies,ForwardProxy):
async def vidxgo(link,client,streams,instance_url):
#headers = random_headers.generate()
response = await client.get(link, allow_redirects=True, headers = headers)
response = await client.get(ForwardProxy + link, allow_redirects=True, headers = headers, proxies = proxies)
soup = BeautifulSoup(response.text,'lxml',parse_only=SoupStrainer('script'))
scripts = soup.find_all('script')
text = scripts[5]
text = scripts[6]
match = re.search(r"var .+'(.*)',d=atob\('(.*)'",text.text)
if match:
key = match.group(1)
@@ -51,12 +90,11 @@ async def vidxgo(link,client,streams,proxies,ForwardProxy):
u[i] = decoded[i] ^ ord(key[i % len(key)])
decrypted_code = u.decode('utf-8')
match = re.search(r'currentSrc.+"(https:[^";]+)',decrypted_code)
if match:
url = match.group(1).replace("\\","")
streams['streams'].append({'name': f"{Name}",'title': f'{Icon}Vidxgo\n ▶️ Vidxgo', 'url': url, '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'}})
logger.info(f"Vidxgo found results for the current ID")
match = re.search(r'currentSrc.+"(https:[^";]+)',decrypted_code)
if match:
url = match.group(1).replace("\\","")
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'}})
logger.info(f"Vidxgo found results for the current ID")
return streams
@@ -64,7 +102,7 @@ async def vidxgo(link,client,streams,proxies,ForwardProxy):
async def test_vidxgo():
from curl_cffi.requests import AsyncSession
async with AsyncSession() as client:
results = await vidsrc("https://v.vidxgo.co/tt34437972/1/1",client,{'streams': []}, "Vidxgo", {})
results = await vidxgo("https://v.vidxgo.co/tt34437972/1/1",client,{'streams': []})
print(results)
if __name__ == "__main__":
import asyncio
+3 -3
View File
@@ -30,9 +30,9 @@ async def vixcloud(link,client,MFP,MFP_CREDENTIALS,streams,site_name,proxies,For
headers['user-agent'] = User_Agent
# I will get real link from API
parts = link.split(SC_DOMAIN)
response = await client.get(SC_DOMAIN + '/api' + parts[1])
response = await client.get(ForwardProxy + SC_DOMAIN + '/api' + parts[1],proxies=proxies)
link = SC_DOMAIN + '/' + response.json()['src']
response = await client.get(link,headers=headers)
response = await client.get(ForwardProxy + link,headers=headers, proxies = proxies)
if response.status_code != 200:
logger.warning(f"Failed to extract URL components from VixSRC, Invalid Request: {response.status_code}")
soup = BeautifulSoup(response.text, "lxml", parse_only=SoupStrainer("body"))
@@ -73,7 +73,7 @@ async def vixcloud(link,client,MFP,MFP_CREDENTIALS,streams,site_name,proxies,For
async def test_vixcloud():
from curl_cffi.requests import AsyncSession
async with AsyncSession() as client:
results = await vixcloud("https://vixsrc.to/tv/204082/1/3/",client,"0",['',''],{'streams': []},'guardoserie.live', {},'')
results = await vixcloud("https://vixsrc.to/tv/76479/5/6/",client,"0",['',''],{'streams': []},'guardoserie.live', {},'')
print(results)
if __name__ == "__main__":
import asyncio