This commit is contained in:
UrloMythus
2025-01-10 16:05:46 +01:00 Unverified
parent 138db6c09a
commit febd7e87d9
3 changed files with 8 additions and 12 deletions
+4 -5
View File
@@ -35,8 +35,7 @@ if CB_PROXY == "1":
"http": proxy, "http": proxy,
"https": proxy "https": proxy
} }
if MX_PROXY == "1": proxies2 = proxies
proxies2 = proxy
CB_ForwardProxy = config.CB_ForwardProxy CB_ForwardProxy = config.CB_ForwardProxy
MX_ForwardProxy = config.MX_ForwardProxy MX_ForwardProxy = config.MX_ForwardProxy
@@ -61,7 +60,7 @@ async def get_stayonline(link,client):
'x-requested-with': 'XMLHttpRequest', 'x-requested-with': 'XMLHttpRequest',
} }
data = {'id': link.split("/")[-2], 'ref': ''} data = {'id': link.split("/")[-2], 'ref': ''}
response = await client.post(ForwardProxy2 + 'https://stayonline.pro/ajax/linkEmbedView.php', headers=headers, data=data, proxies2 = proxies2) response = await client.post('https://stayonline.pro/ajax/linkEmbedView.php', headers=headers, data=data, proxies = proxies2)
real_url = response.json()['data']['value'] real_url = response.json()['data']['value']
return real_url return real_url
@@ -103,7 +102,7 @@ async def get_true_link_mixdrop(real_link,client,MFP):
return None return None
async def get_true_link_maxstream(maxstream_url,client): async def get_true_link_maxstream(maxstream_url,client):
headers = fake_headers.generate() headers = fake_headers.generate()
# Send a GET request to the Maxstream URL # Send a GET request to the Maxstream URL)
response = await client.get(ForwardProxy2 + maxstream_url, headers=headers, allow_redirects=True, timeout=10,proxies = proxies2, impersonate = "chrome124") response = await client.get(ForwardProxy2 + maxstream_url, headers=headers, allow_redirects=True, timeout=10,proxies = proxies2, impersonate = "chrome124")
[s1, s2] = re.search(r"\}\('(.+)',.+,'(.+)'\.split", response.text).group(1, 2) [s1, s2] = re.search(r"\}\('(.+)',.+,'(.+)'\.split", response.text).group(1, 2)
terms = s2.split("|") terms = s2.split("|")
@@ -317,7 +316,7 @@ async def test_animeworld():
async with AsyncSession() as client: async with AsyncSession() as client:
# Replace with actual id, for example 'anime_id:episode' format # Replace with actual id, for example 'anime_id:episode' format
test_id = "tt0045247" # This is an example ID format test_id = "tt0045247" # This is an example ID format
MFP = "0" MFP = "1"
results = await cb01(test_id, client,MFP) results = await cb01(test_id, client,MFP)
print(results) print(results)
+2 -5
View File
@@ -39,16 +39,13 @@ if SC_PROXY == "1":
"https": proxy "https": proxy
} }
if VX_PROXY == "1": if VX_PROXY == "1":
proxies2 = proxy proxies2 = proxies
SC_ForwardProxy = config.SC_ForwardProxy SC_ForwardProxy = config.SC_ForwardProxy
VX_ForwardProxy = config.VX_ForwardProxy VX_ForwardProxy = config.VX_ForwardProxy
if SC_ForwardProxy == "1": if SC_ForwardProxy == "1":
ForwardProxy = env_vars.get('ForwardProxy') ForwardProxy = env_vars.get('ForwardProxy')
else: elif VX_ForwardProxy == "1":
ForwardProxy = ""
if VX_ForwardProxy == "1":
ForwardProxy = env_vars.get('ForwardProxy') ForwardProxy = env_vars.get('ForwardProxy')
else: else:
ForwardProxy = "" ForwardProxy = ""
+1 -1
View File
@@ -33,7 +33,7 @@ if SC_PROXY == "1":
"https": proxy "https": proxy
} }
if VX_PROXY == "1": if VX_PROXY == "1":
proxies2 = proxy proxies2 = proxies
SC_ForwardProxy = config.SC_ForwardProxy SC_ForwardProxy = config.SC_ForwardProxy
VX_ForwardProxy = config.VX_ForwardProxy VX_ForwardProxy = config.VX_ForwardProxy
if SC_ForwardProxy == "1": if SC_ForwardProxy == "1":