Add auto-update domains + some bug fix

This commit is contained in:
UrloMythus
2026-02-09 16:49:20 +01:00 Unverified
parent bafd7e2d07
commit cef29094dc
8 changed files with 113 additions and 12 deletions
+3 -3
View File
@@ -172,14 +172,14 @@ async def series_search_streams(text,search_text,response_text,headers,season,ep
if match:
streams = await get_maxstream(match.group(2),streams,client)
else:
match = re.search(rf'{season}&#215;{episode}\s*&#8211;\s*<a[^>]*href="[^"]*"[^>]*>[^<]*</a>\s&#8211; <a[^>]*href="[^"]*',response_text)
match = re.search(rf'{season}&#215;{episode}\s*&#8211;\s*<a[^>]*href="[^"]*"[^>]*>[^<]*</a>\s&#8211; <a[^>]*href="[^"]*.*</a>',response_text)
if match:
links = match.group(0)
soup = BeautifulSoup(links,'lxml',parse_only=SoupStrainer('a'))
host_links = soup.find_all('a')
mixdrop_real_link = await get_stayonline(host_links[1]['href'],client)
status = False
#streams,status = await mixdrop(mixdrop_real_link,client,MFP,MFP_CREDENTIALS,streams,"CB01",proxies,ForwardProxy,"")
streams,status = await mixdrop(mixdrop_real_link,client,MFP,MFP_CREDENTIALS,streams,"CB01",proxies,ForwardProxy,"")
if status == False:
streams = await get_maxstream(host_links[0]['href'],streams,client)
return streams
@@ -255,7 +255,7 @@ async def cb01(streams,id,MFP,MFP_CREDENTIALS,client):
async def test_animeworld():
from curl_cffi.requests import AsyncSession
async with AsyncSession() as client:
test_id = "tt0158552:1:2" # This is an example ID format
test_id = "tt12324366:2:2" # This is an example ID format
MFP = "0"
results = await cb01({'streams': []},test_id,MFP,['test','test'],client)
print(results)
+16 -3
View File
@@ -9,6 +9,7 @@ from Src.API.extractors.uqload import uqload
from Src.API.extractors.dropload import dropload
import logging
from Src.Utilities.config import setup_logging
from Src.Utilities.update_config import update_site
import json
import random
level = config.LEVEL
@@ -36,7 +37,15 @@ if GF_ForwardProxy == "1":
else:
ForwardProxy = ""
async def new_domain(url,data,headers,proxies,ForwardProxy,client):
url = url.split('/wp-admin')[0]
headers['Origin'] = url
headers['Referer'] = f'{url}/'
response = await client.post(ForwardProxy + f'{url}/wp-admin/admin-ajax.php', data = data, headers = headers, proxies = proxies)
if response.status_code != 200:
logger.warning(f"Guardaflix Failed to fetch search results: {response.status_code}")
result = update_site(client,['guardaplay','Guardaflix'])
return response.text
async def get_player(page_link,MFP, MFP_CREDENTIALS,client, headers,streams):
response = await client.get(ForwardProxy + page_link, headers= headers, proxies = proxies)
@@ -63,9 +72,13 @@ async def search(showname,date,MFP,MFP_CREDENTIALS,client,streams):
'term': showname,
}
response = await client.post(ForwardProxy + f'{GF_DOMAIN}/wp-admin/admin-ajax.php', headers=headers, data=data, proxies = proxies)
text = response.text
if response.status_code != 200:
logger.warning(f"Guardaflix Failed to fetch search results: {response.status_code}")
soup = BeautifulSoup(response.text,'lxml', parse_only= SoupStrainer('a'))
if response.status_code == 400:
text = await new_domain(response.url,data,headers,proxies,ForwardProxy,client)
if len(text) < 10:
logger.warning(f"Guardaflix Failed to fetch search results: {response.status_code}")
soup = BeautifulSoup(text,'lxml', parse_only= SoupStrainer('a'))
a_tags = soup.find_all('a')
for a in a_tags:
href = a['href']
+1 -1
View File
@@ -117,7 +117,7 @@ async def test_script():
from curl_cffi.requests import AsyncSession
async with AsyncSession() as client:
# Replace with actual id, for example 'anime_id:episode' format
test_id = "tt10919420:1:1" # This is an example ID format tt0460649
test_id = "tt12324366:2:2" # This is an example ID format tt0460649
results = await guardaserie({'streams': []},test_id, client)
print(results)
+17 -3
View File
@@ -10,6 +10,7 @@ from Src.API.extractors.loadm import loadm
from Src.API.extractors.dropload import dropload
import logging
from Src.Utilities.config import setup_logging
from Src.Utilities.update_config import update_site
level = config.LEVEL
import json
import random
@@ -32,12 +33,21 @@ if GO_PROXY == "1":
"https": proxy
}
GO_ForwardProxy = config.GO_ForwardProxy
if GO_ForwardProxy == "1":
ForwardProxy = env_vars.get('ForwardProxy')
else:
ForwardProxy = ""
async def new_domain(url,data,headers,proxies,ForwardProxy,client):
url = url.split('/wp-admin')[0]
headers['Origin'] = url
headers['Referer'] = f'{url}/'
response = await client.post(ForwardProxy + f'{url}/wp-admin/admin-ajax.php', data = data, headers = headers, proxies = proxies)
if response.status_code != 200:
logger.warning(f"Guardoserie Failed to fetch search results: {response.status_code}")
result = await update_site(client,['guardoserie_2','Guardoserie'])
return response.text
async def get_player(page_link,MFP,MFP_CREDENTIALS,client, headers, streams):
response = await client.get(ForwardProxy + page_link, headers= headers, proxies = proxies)
@@ -63,9 +73,13 @@ async def search(showname,date,season,episode,MFP, MFP_CREDENTIALS,ismovie,clien
showname = quote(showname)
data = f's={showname}&action=searchwp_live_search&swpengine=default&swpquery={showname}'
response = await client.post(ForwardProxy + f'{GO_DOMAIN}/wp-admin/admin-ajax.php', data = data, headers = headers, proxies = proxies)
text = response.text
if response.status_code != 200:
logger.warning(f"Guardoserie Failed to fetch search results: {response.status_code}")
soup = BeautifulSoup(response.text,'lxml', parse_only= SoupStrainer('a', class_='ss-title'))
if response.status_code == 400:
text = await new_domain(response.url,data,headers,proxies,ForwardProxy,client)
if len(text) < 10:
logger.warning(f"Guardoserie Failed to fetch search results: {response.status_code}")
soup = BeautifulSoup(text,'lxml', parse_only= SoupStrainer('a', class_='ss-title'))
a_tags = soup.find_all('a')
for a in a_tags:
href = a['href']
+1 -1
View File
@@ -114,7 +114,7 @@ async def toonitalia(streams,id,client,MFP,MFP_CREDENTIALS):
async def test_toonitalia():
from curl_cffi.requests import AsyncSession
async with AsyncSession() as client:
results = await toonitalia({'streams': []},"tt1466074:1:1",client,"0",['test','test'])
results = await toonitalia({'streams': []},"tt0096697:1:1",client,"0",['test','test'])
print(results)