Compare commits
341
Commits
main
..
release-2.1
@@ -52,7 +52,6 @@ showname_replace = {
|
||||
"Shippuuden": "Shippuden",
|
||||
" ": "+",
|
||||
"Solo+Leveling+2": "Solo+Leveling+2:",
|
||||
"Case+Book": "Casebook",
|
||||
"-": ""
|
||||
}
|
||||
async def security_cookie (response):
|
||||
@@ -79,15 +78,15 @@ async def get_mp4(anime_url,ismovie,episode,client,i,streams):
|
||||
episode_page = soup.find('a', {'data-episode-num':episode })
|
||||
if episode_page is None:
|
||||
return streams
|
||||
episode_page = f'{AW_DOMAIN}/api/episode/serverPlayerAnimeWorld?id={episode_page["href"].split("/")[-1]}'
|
||||
episode_page = f'{AW_DOMAIN}{episode_page["href"]}'
|
||||
response = await client.get(ForwardProxy + episode_page,allow_redirects=True, cookies = cookies,impersonate = "chrome124", proxies=proxies)
|
||||
if response.status_code == 202:
|
||||
cookies = await security_cookie(response)
|
||||
response = await client.get(ForwardProxy + episode_page,allow_redirects=True, cookies = cookies,impersonate = "chrome124", proxies=proxies)
|
||||
soup = BeautifulSoup(response.text,'lxml')
|
||||
|
||||
a_tag = soup.find('source')
|
||||
url = a_tag['src']
|
||||
a_tag = soup.find('a', {'id': 'alternativeDownloadLink', 'class': 'm-1 btn btn-sm btn-primary'})
|
||||
url = a_tag['href']
|
||||
response = await client.head(url)
|
||||
if response.status_code == 404:
|
||||
url = None
|
||||
|
||||
+3
-3
@@ -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}×{episode}\s*–\s*<a[^>]*href="[^"]*"[^>]*>[^<]*</a>\s– <a[^>]*href="[^"]*.*</a>',response_text)
|
||||
match = re.search(rf'{season}×{episode}\s*–\s*<a[^>]*href="[^"]*"[^>]*>[^<]*</a>\s– <a[^>]*href="[^"]*',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 = "tt11378946" # This is an example ID format
|
||||
test_id = "tt0158552:1:2" # This is an example ID format
|
||||
MFP = "0"
|
||||
results = await cb01({'streams': []},test_id,MFP,['test','test'],client)
|
||||
print(results)
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
{}
|
||||
{'PHPSESSID': '351o0p0f00aaa7m0rughtn63og', 'captch5': 'e6cf235e0bcfee6044841d9dc4a7ea82'}
|
||||
@@ -98,7 +98,7 @@ async def real_page(safego_url,client):
|
||||
soup = BeautifulSoup(response.text,'lxml', parse_only=SoupStrainer('a'))
|
||||
if len(soup)>= 1:
|
||||
return soup.a['href']
|
||||
elif 'The requested URL was not found on this server.' not in response.text:
|
||||
else:
|
||||
logger.info("Getting numbers")
|
||||
numbers,cookies = await get_numbers(safego_url,client)
|
||||
numbers = convert_numbers(numbers)
|
||||
@@ -117,24 +117,17 @@ async def get_host_link(pattern,atag,client):
|
||||
headers = random_headers.generate()
|
||||
if match:
|
||||
href_value = match.group(1)
|
||||
k = 0
|
||||
while 'safego' not in href_value:
|
||||
response = await client.get(ForwardProxy + href_value, headers={**headers, 'Range': 'bytes=0-0'}, proxies = proxies)
|
||||
href_value = response.url
|
||||
if '%20' in href_value:
|
||||
href_value = href_value.replace('%20','')
|
||||
k+=1
|
||||
if k == 5:
|
||||
break
|
||||
response = await client.head(ForwardProxy + href_value, headers={**headers, 'Range': 'bytes=0-0'}, proxies = proxies)
|
||||
href_value = response.url
|
||||
href = await real_page(href_value,client)
|
||||
return href
|
||||
async def scraping_links(atag,MFP,MFP_CREDENTIALS,client,streams,language):
|
||||
#Check which hosts are avaiable and extract the links from one of them. Turbovid uses Cloudflare therefore is not avaiable. Maxstream has a captcha.
|
||||
if "MixDrop" in atag and "DeltaBit" in atag:
|
||||
pattern = r'<a\s+href="([^"]+)"[^>]*[^>]*>DeltaBit</a>'
|
||||
pattern = r'<a\s+href="([^"]+)"[^>]*rel="noopener"[^>]*>DeltaBit</a>'
|
||||
href = await get_host_link(pattern,atag,client)
|
||||
try:
|
||||
streams = await deltabit(href,client,streams,"Eurostreaming",proxies,ForwardProxy,language,'Deltabit')
|
||||
streams = await deltabit(href,client,streams,"Eurostreaming",proxies,ForwardProxy,language)
|
||||
except Exception as e:
|
||||
pattern = r'<a\s+href="([^"]+)"[^>]*rel="noopener"[^>]*>MixDrop</a>'
|
||||
href = await get_host_link(pattern,atag,client)
|
||||
@@ -152,7 +145,7 @@ async def scraping_links(atag,MFP,MFP_CREDENTIALS,client,streams,language):
|
||||
try:
|
||||
pattern = r'<a\s+href="([^"]+)"[^>]*rel="noopener"[^>]*>DeltaBit</a>'
|
||||
href = await get_host_link(pattern,atag,client)
|
||||
streams = await deltabit(href,client,streams,"Eurostreaming",proxies,ForwardProxy,language,'Deltabit')
|
||||
streams = await deltabit(href,client,streams,"Eurostreaming",proxies,ForwardProxy,language)
|
||||
return streams
|
||||
except Exception as e:
|
||||
return streams
|
||||
@@ -166,14 +159,6 @@ async def scraping_links(atag,MFP,MFP_CREDENTIALS,client,streams,language):
|
||||
return streams
|
||||
except Exception as e:
|
||||
return streams
|
||||
if 'Deltabit' not in atag and 'Mixdrop' not in atag and 'Maxstream' not in atag and 'Turbovid' in atag:
|
||||
try:
|
||||
pattern = r'<a\s+href="([^"]+)"[^>]*rel="noopener"?[^>]*>Turbovid</a>'
|
||||
href = await get_host_link(pattern,atag,client)
|
||||
streams = await deltabit(href,client,streams,"Eurostreaming",proxies,ForwardProxy,language,'Turbovid')
|
||||
return streams
|
||||
except Exception as e:
|
||||
return streams
|
||||
if 'DeltaBit' not in atag and 'MixDrop' not in atag and 'MaxStream' not in atag:
|
||||
logger.info("Just give up")
|
||||
return streams
|
||||
@@ -195,7 +180,7 @@ async def episodes_find(description,season,episode,MFP,MFP_CREDENTIALS,client,st
|
||||
return streams
|
||||
async def search(showname,date,season,episode,MFP,MFP_CREDENTIALS,client,streams):
|
||||
headers = random_headers.generate()
|
||||
showname = showname.replace("'"," ")
|
||||
|
||||
response = await client.get(ForwardProxy + f"{ES_DOMAIN}/wp-json/wp/v2/search?search={quote(showname)}&_fields=id", proxies = proxies, headers = headers)
|
||||
results = response.json()
|
||||
for i in results:
|
||||
@@ -206,7 +191,7 @@ async def search(showname,date,season,episode,MFP,MFP_CREDENTIALS,client,streams
|
||||
title = description['title']['rendered']
|
||||
description = description['content']['rendered']
|
||||
ratio = difflib.SequenceMatcher(None, title, showname).ratio()
|
||||
if ratio >=0.96 or (showname in title):
|
||||
if ratio >=0.96:
|
||||
streams = await episodes_find(description,season,episode,MFP,MFP_CREDENTIALS,client,streams)
|
||||
return streams
|
||||
else:
|
||||
@@ -224,7 +209,6 @@ async def search(showname,date,season,episode,MFP,MFP_CREDENTIALS,client,streams
|
||||
match = year_pattern.search(response_2.text)
|
||||
if match:
|
||||
year = match.group(0)
|
||||
print(abs(int(year)),int(date))
|
||||
if abs(int(year) - int(date)) <=1:
|
||||
streams = await episodes_find(description,season,episode,MFP,MFP_CREDENTIALS,client,streams)
|
||||
return streams
|
||||
@@ -260,7 +244,7 @@ async def eurostreaming(streams,id,client,MFP,MFP_CREDENTIALS):
|
||||
async def test_euro():
|
||||
from curl_cffi.requests import AsyncSession
|
||||
async with AsyncSession() as client:
|
||||
results = await eurostreaming({'streams': []},"tt2701582:7:2",client,"0",['test','test'])
|
||||
results = await eurostreaming({'streams': []},"tt0460681:11:1",client,"0",['test','test'])
|
||||
print(results)
|
||||
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@ import re
|
||||
import time
|
||||
import logging
|
||||
from Src.Utilities.config import setup_logging
|
||||
from Src.Utilities.eval import eval_solver
|
||||
level = config.LEVEL
|
||||
logger = setup_logging(level)
|
||||
Icon = config.Icon
|
||||
@@ -16,8 +15,9 @@ random_headers = Headers()
|
||||
|
||||
|
||||
|
||||
async def deltabit(page_url,client,streams,site_name,proxies,ForwardProxy,language,extractor):
|
||||
async def deltabit(page_url,client,streams,site_name,proxies,ForwardProxy,language):
|
||||
"""Extract Deltabit URL."""
|
||||
i = 0
|
||||
#Set up some headers
|
||||
headers = random_headers.generate()
|
||||
headers2 = random_headers.generate()
|
||||
@@ -46,34 +46,25 @@ async def deltabit(page_url,client,streams,site_name,proxies,ForwardProxy,langua
|
||||
name = input.get('name')
|
||||
value = input.get('value')
|
||||
data[name] = value
|
||||
if extractor == 'Deltabit':
|
||||
imhuman = ''
|
||||
elif extractor == 'Turbovid':
|
||||
imhuman = 'Proceed+to+video'
|
||||
data['imhuman'] = imhuman
|
||||
data['imhuman'] = ''
|
||||
data['referer']= page_url
|
||||
#We need to wait 2.5/5 seconds or the request will fail
|
||||
if extractor == 'Deltabit':
|
||||
time.sleep(2.5)
|
||||
elif extractor == 'Turbovid':
|
||||
time.sleep(5)
|
||||
#We need to wait 2.5 seconds or the request will fail
|
||||
time.sleep(2.5)
|
||||
|
||||
|
||||
fname = data['fname']
|
||||
#Request to the deltabit link
|
||||
response = await client.post(ForwardProxy + page_url, data = data, headers = headers, proxies = proxies)
|
||||
if extractor == 'Deltabit':
|
||||
link = re.findall(r'sources:\s*\["([^"]+)"', response.text, re.DOTALL)
|
||||
if link:
|
||||
link = link[0]
|
||||
elif extractor == 'Turbovid':
|
||||
link = await eval_solver(response.text,proxies, ForwardProxy, client,r'sources:\s*\["([^"]+)"')
|
||||
link = re.findall(r'sources:\s*\["([^"]+)"', response.text, re.DOTALL)
|
||||
if not link:
|
||||
i = 0
|
||||
if not i >= 3:
|
||||
link,fname = await deltabit(page_url,client,streams,site_name,proxies,ForwardProxy,language,extractor)
|
||||
page_url = 'https://deltabit.co/q4r8w4assff4'
|
||||
link,fname = await deltabit(page_url,client,streams,site_name,proxies,ForwardProxy,language)
|
||||
i +=1
|
||||
else:
|
||||
link = link[0]
|
||||
if link:
|
||||
streams['streams'].append({'name': f"{Name}{language}",'title': f'{Icon}{site_name}\n▶️ {extractor}\n{fname}', 'url': link, 'behaviorHints': {'bingeGroup': f'{site_name.lower()}'}})
|
||||
streams['streams'].append({'name': f"{Name}{language}",'title': f'{Icon}{site_name}\n▶️ Deltabit\n{fname}', 'url': link, 'behaviorHints': {'bingeGroup': f'{site_name.lower()}'}})
|
||||
|
||||
|
||||
return streams
|
||||
@@ -85,7 +76,7 @@ async def deltabit(page_url,client,streams,site_name,proxies,ForwardProxy,langua
|
||||
async def test_deltabit():
|
||||
from curl_cffi.requests import AsyncSession
|
||||
async with AsyncSession() as client:
|
||||
results = await deltabit("https://turbovid.me/squc5gdzptgw",client,{'streams': []},'Deltabit', {},"","",'Turbovid')
|
||||
results = await deltabit("https://deltabit.co/a54ehb8w42pe",client,{'streams': []},'Deltabit', {},"","")
|
||||
print(results)
|
||||
if __name__ == "__main__":
|
||||
import asyncio
|
||||
|
||||
@@ -25,7 +25,7 @@ async def mixdrop(url,client,MFP,MFP_CREDENTIALS,streams,site_name,proxies,Forwa
|
||||
|
||||
else:
|
||||
headers = {"accept-language": "en-US,en;q=0.5"}
|
||||
url = await eval_solver(url, proxies , ForwardProxy, client,r'MDCore.wurl ?= ?"(.*?)"')
|
||||
url = await eval_solver(url, proxies , ForwardProxy, client)
|
||||
if url:
|
||||
url = "https:" + url
|
||||
logger.info(f"{site_name} on Mixdrop found results for the current ID")
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
import Src.Utilities.config as config
|
||||
from Src.Utilities.eval import eval_solver
|
||||
import logging
|
||||
from Src.Utilities.config import setup_logging
|
||||
from Src.Utilities.mfp import build_mfp
|
||||
level = config.LEVEL
|
||||
logger = setup_logging(level)
|
||||
Icon = config.Icon
|
||||
Name = config.Name
|
||||
|
||||
|
||||
|
||||
|
||||
async def streamhg(link,client,MFP,MFP_CREDENTIALS,streams, site_name, proxies,ForwardProxy):
|
||||
link = 'https://audinifer.com/e/' + link.split('/e/')[1]
|
||||
if MFP == '1':
|
||||
url = await build_mfp(MFP_CREDENTIALS,link,"StreamHG",client)
|
||||
logger.info(f"{site_name} on StreamHG found results for the current ID")
|
||||
if url:
|
||||
status = True
|
||||
streams['streams'].append({'name': f"{Name} 🕵️♂️",'title': f'{Icon}{site_name}\n▶️ StreamHG', 'url': url, 'behaviorHints':{'bingeGroup': f'{site_name.lower()}'}})
|
||||
else:
|
||||
status = False
|
||||
else:
|
||||
url = await eval_solver(link,proxies, ForwardProxy, client,r'"hls2":"([^"]+)"')
|
||||
if url:
|
||||
streams['streams'].append({'name': f"{Name}",'title': f'{Icon}{site_name}\n▶️ StreamHG', 'url': url, 'behaviorHints': {'bingeGroup': f'{site_name.lower()}'}})
|
||||
logger.info(f"{site_name} on StreamHG found results for the current ID")
|
||||
status = True
|
||||
else:
|
||||
status = False
|
||||
return streams,status
|
||||
|
||||
|
||||
|
||||
|
||||
async def test_streamhg():
|
||||
from curl_cffi.requests import AsyncSession
|
||||
async with AsyncSession() as client:
|
||||
results = await streamhg("https://dhcplay.com/e/zctlgpn3zoll",client,"1",['',''],{'streams': []}, "StreamHG", {},"")
|
||||
print(results)
|
||||
if __name__ == "__main__":
|
||||
import asyncio
|
||||
asyncio.run(test_streamhg())
|
||||
|
||||
@@ -11,7 +11,7 @@ Name = config.Name
|
||||
|
||||
|
||||
async def supervideo(supervideo_link,client,streams, site_name, proxies,ForwardProxy):
|
||||
url = await eval_solver(supervideo_link,proxies, ForwardProxy, client,r'file:"(.*?)"')
|
||||
url = await eval_solver(supervideo_link,proxies, ForwardProxy, client)
|
||||
if url:
|
||||
streams['streams'].append({'name': f"{Name}",'title': f'{Icon}{site_name}\n▶️ Supervideo', 'url': url, 'behaviorHints': {'bingeGroup': f'{site_name.lower()}'}})
|
||||
logger.info(f"{site_name} on SuperVideo found results for the current ID")
|
||||
|
||||
+29
-56
@@ -5,8 +5,7 @@ import logging
|
||||
import Src.Utilities.config as config
|
||||
from Src.Utilities.config import setup_logging
|
||||
from Src.Utilities.loadenv import load_env
|
||||
from fake_headers import Headers
|
||||
random_headers = Headers()
|
||||
|
||||
UT_PROXY = config.UT_PROXY
|
||||
UT_ForwardProxy = config.UT_ForwardProxy
|
||||
level = config.LEVEL
|
||||
@@ -32,10 +31,8 @@ else:
|
||||
ForwardProxy = ""
|
||||
|
||||
url = 'https://uprot.net/msf/r4hcq47tarq8'
|
||||
|
||||
|
||||
headers = {
|
||||
'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/144.0.0.0 Safari/537.36',
|
||||
'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64; rv:146.0) Gecko/20100101 Firefox/146.0',
|
||||
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
|
||||
'Accept-Language': 'en-US,en;q=0.5',
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
@@ -53,8 +50,7 @@ headers = {
|
||||
}
|
||||
async def get_uprot_numbers(client):
|
||||
try:
|
||||
response = await client.post(ForwardProxy + url, headers=headers, proxies = proxies, impersonate = 'chrome')
|
||||
|
||||
response = await client.post(ForwardProxy + url, headers=headers, proxies = proxies)
|
||||
set_cookie = response.headers.get('set-cookie')
|
||||
parts = set_cookie.split(';')[0].split('=')
|
||||
key = parts[0]
|
||||
@@ -67,14 +63,14 @@ async def get_uprot_numbers(client):
|
||||
img = soup.find('img')['src']
|
||||
return img,cookies
|
||||
except Exception as e:
|
||||
logger.info(f'Uprot failed to generate numbers/cookies: {e}')
|
||||
logger.info(f'Uprot failed to generate numberers/cookies: {e}')
|
||||
return None,None
|
||||
async def generate_uprot_txt(numbers,cookies,client):
|
||||
try:
|
||||
data = {
|
||||
'captcha': str(numbers),
|
||||
}
|
||||
response = await client.post(ForwardProxy + url, cookies=cookies, headers=headers, data=data, proxies = proxies, impersonate = 'chrome')
|
||||
response = await client.post(ForwardProxy + url, cookies=cookies, headers=headers, data=data, proxies = proxies)
|
||||
if response.status_code != 200:
|
||||
return False
|
||||
set_cookie = response.headers.get('set-cookie')
|
||||
@@ -92,63 +88,40 @@ async def generate_uprot_txt(numbers,cookies,client):
|
||||
logger.info(f'Uprot failed to generate captcha cookie: {e}')
|
||||
return False
|
||||
|
||||
|
||||
async def find_link(text,client):
|
||||
async def get_maxstream_link(text,client):
|
||||
soup = BeautifulSoup(text,'lxml',parse_only=SoupStrainer('a'))
|
||||
a_tags = soup.find_all('a')
|
||||
|
||||
max_stream = None
|
||||
for tag in a_tags:
|
||||
if 'C O N T I N U E' in tag.text.upper() or 'CONTINUE' in tag.text.upper() :
|
||||
if 'C O N T I N U E' in tag.text.upper():
|
||||
max_stream = tag['href']
|
||||
|
||||
if max_stream:
|
||||
redirect = max_stream
|
||||
time = 0
|
||||
while 'uprots' in redirect:
|
||||
response = await client.head(ForwardProxy + max_stream,headers=headers,impersonate = 'chrome', allow_redirects = True, proxies = proxies)
|
||||
redirect = response.url
|
||||
time+=1
|
||||
if time == 1000:
|
||||
return False
|
||||
max_stream = 'https://maxstream.video/emvvv/' + response.url.split('watchfree/')[1].split('/')[1]
|
||||
return max_stream
|
||||
async def get_maxstream_link(text,client):
|
||||
max_stream = await find_link(text,client)
|
||||
if max_stream:
|
||||
redirect = max_stream
|
||||
time = 0
|
||||
while 'uprots' in redirect:
|
||||
response = await client.head(ForwardProxy + max_stream,headers=headers,impersonate = 'chrome', allow_redirects = True, proxies = proxies)
|
||||
redirect = response.url
|
||||
time+=1
|
||||
if time == 10:
|
||||
return False
|
||||
max_stream = 'https://maxstream.video/emvvv/' + response.url.split('watchfree/')[1].split('/')[1]
|
||||
return max_stream
|
||||
|
||||
async def bypass_uprot(client,link):
|
||||
try:
|
||||
if 'msfi' not in link:
|
||||
if 'msf' in link:
|
||||
link = link.replace('msf','mse')
|
||||
headers2 = random_headers.generate()
|
||||
headers2['Origin'] = url.split('msf')[0]
|
||||
headers2['Referer'] = url
|
||||
response = await client.get(ForwardProxy + link, headers=headers2, impersonate = 'chrome', proxies = proxies)
|
||||
if response.status_code != 403:
|
||||
max_stream = await find_link(response.text,client)
|
||||
else:
|
||||
logger.info("Uprot blocked the request: 403")
|
||||
else:
|
||||
if 'mse' in link:
|
||||
link = link.replace('mse','msf')
|
||||
current_directory = os.path.dirname(os.path.abspath(__file__))
|
||||
file_path = os.path.join(current_directory, 'uprot.txt')
|
||||
with open(file_path,'r') as file:
|
||||
text = file.read()
|
||||
parts = text.split('\n')
|
||||
cookies = json.loads(parts[0].replace("'", '"'))
|
||||
data = json.loads(parts[1].replace("'", '"'))
|
||||
response = await client.post(ForwardProxy + link, cookies=cookies, headers=headers, data =data, impersonate = 'chrome', proxies = proxies)
|
||||
|
||||
if response.status_code != 403:
|
||||
max_stream = await get_maxstream_link(response.text,client)
|
||||
|
||||
if response.status_code == 403:
|
||||
max_stream = False
|
||||
|
||||
if 'mse' in link:
|
||||
link = link.replace('mse','msf')
|
||||
current_directory = os.path.dirname(os.path.abspath(__file__))
|
||||
file_path = os.path.join(current_directory, 'uprot.txt')
|
||||
with open(file_path,'r') as file:
|
||||
text = file.read()
|
||||
parts = text.split('\n')
|
||||
cookies = json.loads(parts[0].replace("'", '"'))
|
||||
data = json.loads(parts[1].replace("'", '"'))
|
||||
response = await client.post(ForwardProxy + link, cookies=cookies, headers=headers, data =data, impersonate = 'chrome', proxies = proxies)
|
||||
max_stream = await get_maxstream_link(response.text,client)
|
||||
return max_stream
|
||||
|
||||
except Exception as e:
|
||||
logger.info(f'Uprot failed: {e}')
|
||||
if '[Errno 2] No such file or directory' in e:
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
{}
|
||||
{}
|
||||
{'PHPSESSID': 'bm1qtf1pe0dnr4u4nhvofitk8u', 'captcha': 'ca5612d51c9bbc60f8d76051693d3315'}
|
||||
{'captcha': '853'}
|
||||
@@ -1,128 +0,0 @@
|
||||
|
||||
|
||||
|
||||
import Src.Utilities.config as config
|
||||
Icon = config.Icon
|
||||
Name = config.Name
|
||||
import re
|
||||
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
|
||||
import json
|
||||
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',
|
||||
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
|
||||
'Accept-Language': 'en-US,en;q=0.9',
|
||||
# 'Accept-Encoding': 'gzip, deflate, br, zstd',
|
||||
'Sec-GPC': '1',
|
||||
'Alt-Used': 'v.vidxgo.co',
|
||||
'Connection': 'keep-alive',
|
||||
'Upgrade-Insecure-Requests': '1',
|
||||
'Sec-Fetch-Dest': 'iframe',
|
||||
'Sec-Fetch-Mode': 'navigate',
|
||||
'Sec-Fetch-Site': 'none',
|
||||
'DNT': '1',
|
||||
'Referer': 'https://altadefinizione.you/',
|
||||
'Sec-Fetch-Storage-Access': 'none',
|
||||
'-': '-',
|
||||
'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,instance_url):
|
||||
#headers = random_headers.generate()
|
||||
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[6]
|
||||
match = re.search(r"var .+'(.*)',d=atob\('(.*)'",text.text)
|
||||
if match:
|
||||
key = match.group(1)
|
||||
base64_text = match.group(2)
|
||||
decoded = base64.b64decode(base64_text)
|
||||
u = bytearray(len(decoded))
|
||||
for i in range(len(decoded)):
|
||||
u[i] = decoded[i] ^ ord(key[i % len(key)])
|
||||
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 and suburlmatch:
|
||||
subtitles = json.loads(submatch.group(1))
|
||||
for item in subtitles:
|
||||
if item['forced'] == True:
|
||||
item['id'] = item['lang'] + '-forced'
|
||||
else:
|
||||
item['id'] = item['lang']
|
||||
del item['forced']
|
||||
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")
|
||||
|
||||
return streams
|
||||
|
||||
#Testing
|
||||
async def test_vidxgo():
|
||||
from curl_cffi.requests import AsyncSession
|
||||
async with AsyncSession() as client:
|
||||
results = await vidxgo("https://v.vidxgo.co/tt0816692",client,{'streams': []},"localhost")
|
||||
print(results)
|
||||
if __name__ == "__main__":
|
||||
import asyncio
|
||||
asyncio.run(test_vidxgo())
|
||||
|
||||
|
||||
|
||||
|
||||
# XOR decryption
|
||||
|
||||
@@ -28,11 +28,7 @@ async def vixcloud(link,client,MFP,MFP_CREDENTIALS,streams,site_name,proxies,For
|
||||
headers['Origin'] = f"{SC_DOMAIN}"
|
||||
headers['User-Agent'] = User_Agent
|
||||
headers['user-agent'] = User_Agent
|
||||
# I will get real link from API
|
||||
parts = link.split(SC_DOMAIN)
|
||||
response = await client.get(ForwardProxy + SC_DOMAIN + '/api' + parts[1],proxies=proxies)
|
||||
link = SC_DOMAIN + '/' + response.json()['src']
|
||||
response = await client.get(ForwardProxy + link,headers=headers, proxies = proxies)
|
||||
response = await client.get(link)
|
||||
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 +69,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/76479/5/6/",client,"0",['',''],{'streams': []},'guardoserie.live', {},'')
|
||||
results = await vixcloud("https://vixsrc.to/tv/204082/1/3/",client,"0",['',''],{'streams': []},'guardoserie.live', {},'')
|
||||
print(results)
|
||||
if __name__ == "__main__":
|
||||
import asyncio
|
||||
|
||||
+3
-16
@@ -9,7 +9,6 @@ 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
|
||||
@@ -37,15 +36,7 @@ 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 = await 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)
|
||||
@@ -72,13 +63,9 @@ 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:
|
||||
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'))
|
||||
logger.warning(f"Guardaflix Failed to fetch search results: {response.status_code}")
|
||||
soup = BeautifulSoup(response.text,'lxml', parse_only= SoupStrainer('a'))
|
||||
a_tags = soup.find_all('a')
|
||||
for a in a_tags:
|
||||
href = a['href']
|
||||
|
||||
+9
-15
@@ -4,8 +4,7 @@ import re
|
||||
import Src.Utilities.config as config
|
||||
from fake_headers import Headers
|
||||
from Src.Utilities.loadenv import load_env
|
||||
from Src.API.extractors.streamhg import streamhg
|
||||
from Src.API.extractors.mixdrop import mixdrop
|
||||
from Src.API.extractors.supervideo import supervideo
|
||||
import json, random
|
||||
import logging
|
||||
from Src.Utilities.config import setup_logging
|
||||
@@ -42,27 +41,22 @@ async def search(clean_id,client):
|
||||
logger.warning(f"GuardaHD Failed to fetch search results: {response.status_code}")
|
||||
soup = BeautifulSoup(response.text,'lxml',parse_only=SoupStrainer('li'))
|
||||
li_tags = soup.find_all('li')
|
||||
results = {}
|
||||
for tag in li_tags:
|
||||
if tag.get('data-link') and (('mixdrop') in tag.text or ('streamhg') in tag.text):
|
||||
results[tag.text.strip()] = 'https:' + tag['data-link']
|
||||
return results
|
||||
if 'supervideo' in tag['data-link']:
|
||||
href = 'https:' + tag['data-link']
|
||||
return href
|
||||
|
||||
|
||||
|
||||
async def guardahd(streams,id,client,MFP,MFP_CREDENTIALS):
|
||||
async def guardahd(streams,id,client):
|
||||
try:
|
||||
general = await is_movie(id)
|
||||
ismovie = general[0]
|
||||
clean_id = general[1]
|
||||
if ismovie == 0:
|
||||
return streams
|
||||
results = await search(clean_id,client)
|
||||
status = False
|
||||
if 'streamhg' in results:
|
||||
streams,status = await streamhg(results['streamhg'], client,MFP,MFP_CREDENTIALS,streams,"GuardaHD",proxies, ForwardProxy)
|
||||
if 'mixdrop' in results and not status:
|
||||
streams,status = await mixdrop(results['mixdrop'],client,MFP,MFP_CREDENTIALS,streams,"GuardaHD",proxies,ForwardProxy,'')
|
||||
supervideo_link = await search(clean_id,client)
|
||||
streams = await supervideo(supervideo_link, client,streams,"GuardaHD",proxies, ForwardProxy)
|
||||
return streams
|
||||
except Exception as e:
|
||||
logger.warning(f"MammaMia: GuardaHD Failed {e}")
|
||||
@@ -72,8 +66,8 @@ 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 = "tt16426418" # This is an example ID format
|
||||
results = await guardahd({'streams': []},test_id, client,'0','')
|
||||
test_id = "tt12300742" # This is an example ID format
|
||||
results = await guardahd({'streams': []},test_id, client)
|
||||
print(results)
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
@@ -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 = "tt33318655:2:5" # This is an example ID format tt0460649
|
||||
test_id = "tt10919420:1:1" # This is an example ID format tt0460649
|
||||
results = await guardaserie({'streams': []},test_id, client)
|
||||
print(results)
|
||||
|
||||
|
||||
+3
-17
@@ -10,7 +10,6 @@ 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
|
||||
@@ -33,21 +32,12 @@ 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)
|
||||
@@ -73,13 +63,9 @@ 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:
|
||||
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'))
|
||||
logger.warning(f"Guardoserie Failed to fetch search results: {response.status_code}")
|
||||
soup = BeautifulSoup(response.text,'lxml', parse_only= SoupStrainer('a', class_='ss-title'))
|
||||
a_tags = soup.find_all('a')
|
||||
for a in a_tags:
|
||||
href = a['href']
|
||||
|
||||
@@ -7,18 +7,10 @@ import json, random
|
||||
import re
|
||||
from Src.Utilities.eval import eval_solver
|
||||
import urllib.parse
|
||||
from Src.API.extractors.maxstream import maxstream
|
||||
from Src.API.extractors.uprot import bypass_uprot
|
||||
OST_DOMAIN = config.OST_DOMAIN
|
||||
OST_PROXY = config.OST_PROXY
|
||||
env_vars = load_env()
|
||||
proxies = {}
|
||||
random_headers = Headers()
|
||||
import logging
|
||||
from Src.Utilities.config import setup_logging
|
||||
level = config.LEVEL
|
||||
logger = setup_logging(level)
|
||||
|
||||
if OST_PROXY == "1":
|
||||
PROXY_CREDENTIALS = env_vars.get('PROXY_CREDENTIALS')
|
||||
proxy_list = json.loads(PROXY_CREDENTIALS)
|
||||
@@ -35,12 +27,25 @@ if OST_ForwardProxy == "1":
|
||||
ForwardProxy = env_vars.get('ForwardProxy')
|
||||
else:
|
||||
ForwardProxy = ""
|
||||
Name = config.Name
|
||||
Icon = config.Icon
|
||||
headers = {
|
||||
'User-Agent': 'Mozilla/5.0 (Linux; Android 12) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.5060.71 Mobile Safari/537.36',
|
||||
'Accept': '*/*',
|
||||
'Accept-Language': 'en-US,en;q=0.5',
|
||||
# 'Accept-Encoding': 'gzip, deflate, br, zstd',
|
||||
'X-Requested-With': 'XMLHttpRequest',
|
||||
'DNT': '1',
|
||||
'Sec-GPC': '1',
|
||||
'Connection': 'keep-alive',
|
||||
'Referer': f'https://onlineserietv.{OST_DOMAIN}/',
|
||||
# 'Cookie': 'player_opt=fx',
|
||||
'Sec-Fetch-Dest': 'empty',
|
||||
'Sec-Fetch-Mode': 'cors',
|
||||
'Sec-Fetch-Site': 'same-origin',
|
||||
'Pragma': 'no-cache',
|
||||
'Cache-Control': 'no-cache',
|
||||
}
|
||||
|
||||
async def search(showname,date,client,ismovie,episode,season):
|
||||
headers = random_headers.generate()
|
||||
headers['Referer'] = f'{OST_DOMAIN}/'
|
||||
cookies = {
|
||||
'player_opt': 'fx',
|
||||
}
|
||||
@@ -52,69 +57,64 @@ async def search(showname,date,client,ismovie,episode,season):
|
||||
'origin_id': '50141',
|
||||
'searchwp_live_search_client_nonce': 'undefined',
|
||||
}
|
||||
response = await client.get(ForwardProxy + f"{OST_DOMAIN}/wp-admin/admin-ajax.php?s={urllib.parse.quote(showname)}&action=searchwp_live_search&swpengine=default&swpquery={urllib.parse.quote(showname)}&origin_id=50141&searchwp_live_search_client_nonce=undefined", headers=headers, cookies=cookies, impersonate = "chrome", proxies = proxies)
|
||||
response = await client.get(ForwardProxy + f"https://onlineserietv.{OST_DOMAIN}/wp-admin/admin-ajax.php?s={urllib.parse.quote(showname)}&action=searchwp_live_search&swpengine=default&swpquery={urllib.parse.quote(showname)}&origin_id=50141&searchwp_live_search_client_nonce=undefined", headers=headers, cookies=cookies, impersonate = "chrome124", proxies = proxies)
|
||||
if response.status_code != 200:
|
||||
logger.info("IP Blocked by OnlineserieTV",response)
|
||||
print("IP Blocked by OnlineserieTV",response)
|
||||
soup = BeautifulSoup(response.text, 'lxml', parse_only=SoupStrainer('a'))
|
||||
a_tags_with_href = soup.find_all("a", href=True)
|
||||
for a_tag in a_tags_with_href:
|
||||
href = a_tag.get("href")
|
||||
if ismovie == 1:
|
||||
if "film" in href:
|
||||
response = await client.get(ForwardProxy + href, headers=headers, impersonate = "chrome", proxies = proxies)
|
||||
response = await client.get(ForwardProxy + href, headers=headers, impersonate = "chrome124", proxies = proxies)
|
||||
if response.status_code != 200:
|
||||
logger.info("IP Blocked by OnlineserieTV",response)
|
||||
print("IP Blocked by OnlineserieTV",response)
|
||||
year_match = re.search(r'Anno: <i>(\d{4})</i>', response.text)
|
||||
year = year_match.group(1) if year_match else None
|
||||
if year == date:
|
||||
pattern = r'https://uprot\.net/msf/[^\s"<>]+'
|
||||
pattern = r'https://uprot\.net/fxf/[^\s"<>]+'
|
||||
match = re.search(pattern, response.text)
|
||||
if match:
|
||||
name = a_tag.text.replace("\t","").replace("\n","")
|
||||
maxstream_link = match.group()
|
||||
return maxstream_link,name
|
||||
flexy_link = match.group()
|
||||
return flexy_link,name
|
||||
else:
|
||||
logger.info("No Maxstream link found.")
|
||||
print("No flexy link found.")
|
||||
else:
|
||||
continue
|
||||
elif ismovie == 0:
|
||||
if "serietv" in href:
|
||||
response = await client.get(ForwardProxy + href, headers=headers, impersonate = "chrome", proxies = proxies)
|
||||
response = await client.get(ForwardProxy + href, headers=headers, impersonate = "chrome124", proxies = proxies)
|
||||
if response.status_code != 200:
|
||||
logger.info("IP Blocked by OnlineserieTV",response)
|
||||
print("IP Blocked by OnlineserieTV",response)
|
||||
year_match = re.search(r'Anno: <i>(\d{4})</i>', response.text)
|
||||
year = year_match.group(1) if year_match else None
|
||||
if year == date:
|
||||
season = season.zfill(2)
|
||||
episode = episode.zfill(2)
|
||||
pattern = rf'{season}x{episode}.*?<a href=[\'"](https://uprot\.net/msf/[^\'"]+)'
|
||||
match = re.search(pattern, response.text, re.DOTALL)
|
||||
if not match:
|
||||
pattern = rf'0{episode}.*?<a href=[\'"](https://uprot\.net/msf/[^\'"]+)'
|
||||
if season == "0000000000000":
|
||||
print(True,season,episode)
|
||||
#pattern = rf'{season}x{episode}.*?<a href=[\'"](https://uprot\.net/fxf/[^\'"]+)|0{episode}.*?<a href=[\'"](https://uprot\.net/fxf/[^\'"]+)'
|
||||
pattern = rf'0{episode}.*?<a href=[\'"](https://uprot\.net/fxf/[^\'"]+)'
|
||||
match1 = re.findall(pattern, response.text)
|
||||
match = re.search(pattern, response.text)
|
||||
print(match)
|
||||
else:
|
||||
pattern = rf'{season}x{episode}.*?<a href=[\'"](https://uprot\.net/fxf/[^\'"]+)'
|
||||
match = re.search(pattern, response.text, re.DOTALL)
|
||||
if match:
|
||||
name = a_tag.text.replace("\t","").replace("\n","")
|
||||
maxstream_link = match.group(1)
|
||||
return maxstream_link,name
|
||||
|
||||
else:
|
||||
logger.info("No maxstream link found.")
|
||||
flexy_link = match.group(1)
|
||||
print(match,flexy_link)
|
||||
return flexy_link,name
|
||||
else:
|
||||
print("No flexy link found.")
|
||||
else:
|
||||
continue
|
||||
return None,None
|
||||
async def get_maxstream(uprot_link,streams,language,client):
|
||||
maxstream_link = await bypass_uprot(client,uprot_link)
|
||||
if maxstream_link:
|
||||
streams = await maxstream(maxstream_link,client,streams,'OnlineSerieTV',language,proxies,ForwardProxy)
|
||||
else:
|
||||
if maxstream_link == False:
|
||||
return streams
|
||||
else:
|
||||
streams['streams'].append({'name': f"{Name}",'title': f'{Icon}OnlineSerieTV\n▶️ Please do the captcha at /uprot in order to be able to play this content! \n Remember to refresh the sources!\nIf you recently did the captcha then dont worry, just refresh the sources', 'url': 'https://github.com/UrloMythus/MammaMia', 'behaviorHints': { 'bingeGroup': 'cb01'}})
|
||||
|
||||
return streams
|
||||
|
||||
async def onlineserietv(streams,id,client):
|
||||
|
||||
async def onlineserietv(id,client):
|
||||
try:
|
||||
general = await is_movie(id)
|
||||
ismovie = general[0]
|
||||
@@ -131,21 +131,22 @@ async def onlineserietv(streams,id,client):
|
||||
else:
|
||||
showname,date = get_info_tmdb(clean_id,ismovie,type)
|
||||
showname = showname.replace("'"," ")
|
||||
uprot_link,name = await search(showname,date,client,ismovie,episode,season)
|
||||
if uprot_link != None:
|
||||
streams = await get_maxstream(uprot_link,streams,'',client)
|
||||
return streams
|
||||
flexy_link,name = await search(showname,date,client,ismovie,episode,season)
|
||||
flexy_link = flexy_link.replace("fxf","fxe")
|
||||
real_url = await client.head(ForwardProxy + flexy_link, headers=headers, impersonate = "chrome124", proxies = proxies)
|
||||
real_url = real_url.url
|
||||
final_url = await eval_solver(real_url,proxies, ForwardProxy, client)
|
||||
return final_url,name
|
||||
except Exception as e:
|
||||
logger.info("MammaMia: Onlineserietv Failed")
|
||||
logger.info(e)
|
||||
return streams
|
||||
print("MammaMia: Onlineserietv Failed",e)
|
||||
return None,None
|
||||
|
||||
|
||||
async def test_animeworld():
|
||||
from curl_cffi.requests import AsyncSession
|
||||
async with AsyncSession() as client:
|
||||
test_id = "tt16426418" # This is an example ID format
|
||||
results = await onlineserietv({'streams': []},test_id, client)
|
||||
test_id = "tt0206516:2:1" # This is an example ID format
|
||||
results = await onlineserietv(test_id, client)
|
||||
print(results)
|
||||
|
||||
if __name__ == "__main__":
|
||||
@@ -14,7 +14,6 @@ import logging
|
||||
from Src.Utilities.config import setup_logging
|
||||
level = config.LEVEL
|
||||
import re
|
||||
import json
|
||||
|
||||
import random
|
||||
logger = setup_logging(level)
|
||||
@@ -72,7 +71,6 @@ async def search(showname,date,season,episode,MFP,MFP_CREDENTIALS,ismovie,client
|
||||
else:
|
||||
streams = await voe(url,streams,'ToonItalia',MFP,MFP_CREDENTIALS,proxies,ForwardProxy,client)
|
||||
return streams
|
||||
return streams
|
||||
|
||||
|
||||
|
||||
@@ -106,7 +104,7 @@ async def toonitalia(streams,id,client,MFP,MFP_CREDENTIALS):
|
||||
streams = await search(showname,date, season,episode,MFP,MFP_CREDENTIALS,ismovie,client,streams)
|
||||
return streams
|
||||
except Exception as e:
|
||||
logger.warning(f'Toonitalia Error: {e}')
|
||||
print(e)
|
||||
return streams
|
||||
|
||||
|
||||
@@ -114,7 +112,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': []},"tt0096697:1:1",client,"0",['test','test'])
|
||||
results = await toonitalia({'streams': []},"tt1466074:1:1",client,"0",['test','test'])
|
||||
print(results)
|
||||
|
||||
|
||||
|
||||
@@ -1,65 +0,0 @@
|
||||
from Src.Utilities.info import is_movie
|
||||
import Src.Utilities.config as config
|
||||
from Src.Utilities.loadenv import load_env
|
||||
from Src.API.extractors.vidxgo import vidxgo
|
||||
import json, random
|
||||
import logging
|
||||
from Src.Utilities.config import setup_logging
|
||||
level = config.LEVEL
|
||||
logger = setup_logging(level)
|
||||
env_vars = load_env()
|
||||
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
|
||||
|
||||
|
||||
|
||||
async def vidxgoalta(streams,id,client,instance_url):
|
||||
try:
|
||||
general = await is_movie(id)
|
||||
ismovie = general[0]
|
||||
clean_id = general[1]
|
||||
type = "Vidxgo"
|
||||
if "tmdb" in id:
|
||||
clean_id = await get_IMDB_id_from_TMDb_id(clean_id,client)
|
||||
if ismovie == 0 :
|
||||
season = str(general[2])
|
||||
episode = str(general[3])
|
||||
link = f'{VD_DOMAIN}/{clean_id}/{season}/{episode}'
|
||||
elif ismovie == 1:
|
||||
link = f'{VD_DOMAIN}/{clean_id}'
|
||||
streams = await vidxgo(link,client,streams,instance_url)
|
||||
return streams
|
||||
except Exception as e:
|
||||
logger.info("Vidxgo failed due to ")
|
||||
logger.info(e)
|
||||
return streams
|
||||
|
||||
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 = "tt7181546" # This is an example ID format
|
||||
results = await vidxgoalta({'streams': []},test_id, client)
|
||||
print(results)
|
||||
|
||||
if __name__ == "__main__":
|
||||
import asyncio
|
||||
asyncio.run(test_script())
|
||||
|
||||
@@ -5,6 +5,7 @@ import logging
|
||||
with open('config.json') as f:
|
||||
# Load JSON data from file
|
||||
config = json.load(f)
|
||||
|
||||
# Accessing SC_DOMAIN
|
||||
SITE = config["Siti"]
|
||||
SC_DOMAIN = SITE["StreamingCommunity"]['url']
|
||||
@@ -17,8 +18,6 @@ GF_DOMAIN = SITE['Guardaflix']['url']
|
||||
GO_DOMAIN = SITE['Guardoserie']['url']
|
||||
RT_DOMAIN = SITE['Realtime']['url']
|
||||
TI_DOMAIN = SITE['Toonitalia']['url']
|
||||
OST_DOMAIN = SITE['OnlineSerieTV']['url']
|
||||
VD_DOMAIN = SITE['Vidxgo']['url']
|
||||
SC = SITE['StreamingCommunity']['enabled']
|
||||
AW = SITE['AnimeWorld']['enabled']
|
||||
CB = SITE['CB01']['enabled']
|
||||
@@ -29,8 +28,6 @@ GF = SITE['Guardaflix']['enabled']
|
||||
GO = SITE['Guardoserie']['enabled']
|
||||
RT = SITE['Realtime']['enabled']
|
||||
TI = SITE['Toonitalia']['enabled']
|
||||
OST = SITE['OnlineSerieTV']['enabled']
|
||||
VD = SITE['Vidxgo']['enabled']
|
||||
SC_ForwardProxy = SITE['StreamingCommunity']["SC_ForwardProxy"]
|
||||
GS_ForwardProxy = SITE['Guardaserie']["GS_ForwardProxy"]
|
||||
GH_ForwardProxy = SITE['GuardaHD']["GH_ForwardProxy"]
|
||||
@@ -42,9 +39,8 @@ ES_ForwardProxy = SITE['Eurostreaming']['ES_ForwardProxy']
|
||||
GF_ForwardProxy = SITE['Guardaflix']['GF_ForwardProxy']
|
||||
GO_ForwardProxy = SITE['Guardoserie']['GO_ForwardProxy']
|
||||
RT_ForwardProxy = SITE['Realtime']['RT_ForwardProxy']
|
||||
OST_ForwardProxy = SITE['OnlineSerieTV']['OST_ForwardProxy']
|
||||
|
||||
TI_ForwardProxy = SITE['Toonitalia']['TI_ForwardProxy']
|
||||
VD_ForwardProxy = SITE['Vidxgo']['VD_ForwardProxy']
|
||||
GS_PROXY = SITE['Guardaserie']["GS_PROXY"]
|
||||
GH_PROXY = SITE['GuardaHD']["GH_PROXY"]
|
||||
CB_PROXY = SITE['CB01']["CB_PROXY"]
|
||||
@@ -57,8 +53,6 @@ GF_PROXY = SITE['Guardaflix']['GF_PROXY']
|
||||
GO_PROXY = SITE['Guardoserie']['GO_PROXY']
|
||||
RT_PROXY = SITE['Realtime']['RT_PROXY']
|
||||
TI_PROXY = SITE['Toonitalia']['TI_PROXY']
|
||||
OST_PROXY = SITE['OnlineSerieTV']['OST_PROXY']
|
||||
VD_PROXY = SITE['Vidxgo']['VD_PROXY']
|
||||
#Captcha
|
||||
CAPTCHA = config['Captcha']
|
||||
UT_ForwardProxy = CAPTCHA['Uprot']['UT_ForwardProxy']
|
||||
|
||||
@@ -458,7 +458,5 @@ provider_map = {
|
||||
"GO": "GUARDOSERIE",
|
||||
"RT": "REALTIME",
|
||||
"TI": "TOONITALIA",
|
||||
"GF": "GUARDAFLIX",
|
||||
"OST": "ONLINESERIETV",
|
||||
"VD": "VIDXGO"
|
||||
"GF": "GUARDAFLIX"
|
||||
}
|
||||
@@ -141,22 +141,23 @@ class UnpackingError(Exception):
|
||||
random_headers = Headers()
|
||||
|
||||
|
||||
async def eval_solver(stream_link,proxies, ForwardProxy, client,pattern):
|
||||
async def eval_solver(stream_link,proxies, ForwardProxy, client):
|
||||
try:
|
||||
headers = random_headers.generate()
|
||||
headers["User-Agent"] = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36"
|
||||
headers["accept-language"] = 'en-US,en;q=0.5'
|
||||
if len(stream_link) <= 200:
|
||||
response = await client.get( ForwardProxy + stream_link, allow_redirects=True, timeout=30, headers = headers, proxies = proxies, impersonate = "chrome124")
|
||||
text = response.text
|
||||
logger.debug("Eval:",response.status_code)
|
||||
else:
|
||||
text = stream_link
|
||||
soup = BeautifulSoup(text, "lxml",parse_only=SoupStrainer("script"))
|
||||
response = await client.get( ForwardProxy + stream_link, allow_redirects=True, timeout=30, headers = headers, proxies = proxies, impersonate = "chrome124")
|
||||
logger.debug("Eval:",response.status_code)
|
||||
soup = BeautifulSoup(response.text, "lxml",parse_only=SoupStrainer("script"))
|
||||
script_all = soup.find_all("script")
|
||||
for i in script_all:
|
||||
if detect(i.text):
|
||||
unpacked_code = unpack(i.text)
|
||||
if "xdrop" in stream_link:
|
||||
pattern = r'MDCore.wurl ?= ?"(.*?)"'
|
||||
|
||||
else:
|
||||
pattern = r'file:"(.*?)"'
|
||||
match = re.search(pattern, unpacked_code)
|
||||
if match:
|
||||
m3u8_url = match.group(1)
|
||||
|
||||
@@ -1,104 +0,0 @@
|
||||
|
||||
from fastapi import APIRouter, HTTPException, Response, Request
|
||||
from fastapi.responses import RedirectResponse
|
||||
from curl_cffi.requests import AsyncSession
|
||||
from urllib.parse import urlparse, parse_qs,unquote,quote
|
||||
from base64 import b64decode,b64encode
|
||||
import re
|
||||
from Src.API.extractors.vidxgo import vidxgo_refresh
|
||||
import time
|
||||
import Src.Utilities.config as config
|
||||
from Src.Utilities.config import setup_logging
|
||||
level = config.LEVEL
|
||||
logger = setup_logging(level)
|
||||
|
||||
|
||||
VD_DOMAIN = config.VD_DOMAIN
|
||||
router = APIRouter()
|
||||
headers = {
|
||||
'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': f'{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',
|
||||
}
|
||||
async def fetch_m3u8(url):
|
||||
"""Fetch the M3U8 file from the URL and store it in memory."""
|
||||
async with AsyncSession() as client:
|
||||
response = await client.get(url,headers = headers)
|
||||
return response.text,response.status_code
|
||||
|
||||
@router.get("/clone/manifest.m3u8")
|
||||
async def clone_m3u8(d: str = None):
|
||||
if d:
|
||||
try:
|
||||
url = b64decode(d).decode('utf-8')
|
||||
m3u8_content,status = await fetch_m3u8(url)
|
||||
if status != 200:
|
||||
match = re.search(r'hls[\w/]*/(\d{2}\d*[/]*\d*[/]*\d*)[\w/]+master',url)
|
||||
if match:
|
||||
id = match.group(1)
|
||||
url = await vidxgo_refresh("",id)
|
||||
|
||||
m3u8_content,status =await fetch_m3u8(url)
|
||||
m3u8_content = re.sub(r'(&b=\d+)',rf'\1&base={d}',m3u8_content)
|
||||
|
||||
return Response(content=m3u8_content, media_type='application/vnd.apple.mpegurl')
|
||||
except Exception as e:
|
||||
logger.info(f"Failed to fetch M3U8 file: {e}")
|
||||
raise HTTPException(status_code=404, detail="M3U8 content not found")
|
||||
|
||||
@router.get("/clone/index{suffix}")
|
||||
async def index_route(suffix: str, base: str):
|
||||
try:
|
||||
text2 = b64decode(base).decode('utf-8')
|
||||
text = text2.replace("master.m3u8",f'index{suffix}')
|
||||
|
||||
m3u8_content,status = await fetch_m3u8(text)
|
||||
match = re.search(r'hls[\w/]*/(\d{2}\d*[/]*\d*[/]*\d*)[\w/]+master',text2)
|
||||
if match:
|
||||
id = match.group(1)
|
||||
else:
|
||||
raise HTTPException(status_code=502, detail="ID not found")
|
||||
if status != 200:
|
||||
text = await vidxgo_refresh("",id)
|
||||
text = text.replace("master.m3u8",f'index{suffix}')
|
||||
m3u8_content,status =await fetch_m3u8(text)
|
||||
|
||||
current_date = time.strftime('%Y-%m-%d %H:%M')
|
||||
m3u8_content = re.sub(r'(b=\d+)', rf'\1&id={b64encode(id.encode("utf-8")).decode("utf-8")}&date={b64encode(current_date.encode("utf-8")).decode("utf-8")}', m3u8_content)
|
||||
return Response(content=m3u8_content, media_type='application/vnd.apple.mpegurl')
|
||||
except Exception as e:
|
||||
logger.info(f"Failed to fetch M3U8 file: {e}")
|
||||
raise HTTPException(status_code=502, detail="M3U8 content not found")
|
||||
|
||||
|
||||
@router.get("/clone/seg{suffix}")
|
||||
async def ts_route(suffix:str,id:str,date: str,t:str,e:str,b:str):
|
||||
try:
|
||||
url = await vidxgo_refresh("",b64decode(id).decode('utf-8'))
|
||||
parsed = urlparse(url)
|
||||
params = parse_qs(parsed.query)
|
||||
url = url.split("?")[0]
|
||||
text = url.replace("master.m3u8",f'seg{suffix}?t={params["t"][0]}&e={params["e"][0]}&b={b}')
|
||||
return RedirectResponse(text,headers=headers)
|
||||
except Exception as e:
|
||||
logger.info(f"Failed to redirect TS file: {e}")
|
||||
raise HTTPException(status_code=502, detail="Failed to redirect TS file")
|
||||
|
||||
async def test_fetch():
|
||||
from curl_cffi.requests import AsyncSession
|
||||
async with AsyncSession() as client:
|
||||
results = await index_route('-v1-a1','aHR0cHM6Ly9jZG4udjMubWVkaWEtNjg0LmQyYi55b3UvcHJveHkvbWVkaWEtNDAyL2hscy8xNjQyNjQxOC9tYXN0ZXIubTN1OD90PTJiYjg0MGYwMzFjY2MzNmYmZT0xNzgwNTA2OTk2Njk5JmI9Mjk3Ng====')
|
||||
print(results)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
import asyncio
|
||||
asyncio.run(test_fetch())
|
||||
+3
-10
@@ -6,18 +6,11 @@ import urllib.parse
|
||||
level = config.LEVEL
|
||||
logger = setup_logging(level)
|
||||
|
||||
async def transform_mfp(mfp_stream_url,MFP_url,MFP_password,client):
|
||||
async def transform_mfp(mfp_stream_url,client):
|
||||
try:
|
||||
response = await client.get(mfp_stream_url)
|
||||
data = response.json()
|
||||
if 'mediaflow_endpoint' in data:
|
||||
if data['mediaflow_endpoint'] == 'hls_manifest_proxy':
|
||||
MFP_url += '/proxy/hls/manifest.m3u8'
|
||||
else:
|
||||
MFP_url += '/proxy/stream'
|
||||
url = MFP_url + "?api_password=" + MFP_password + "&d=" + urllib.parse.quote(data['destination_url'])
|
||||
else:
|
||||
url = data['mediaflow_proxy_url'] + "?api_password=" + data['query_params']['api_password'] + "&d=" + urllib.parse.quote(data['destination_url'])
|
||||
url = data['mediaflow_proxy_url'] + "?api_password=" + data['query_params']['api_password'] + "&d=" + urllib.parse.quote(data['destination_url'])
|
||||
for i in data['request_headers']:
|
||||
url += f"&h_{i}={urllib.parse.quote(data['request_headers'][i])}"
|
||||
return url
|
||||
@@ -30,5 +23,5 @@ async def build_mfp(MFP_CREDENTIALS,url,host,client):
|
||||
MFP_password = MFP_CREDENTIALS[1]
|
||||
url_mfp = f'{MFP_url}/extractor/video?api_password={MFP_password}&d={url}&host={host}&redirect_stream=false'
|
||||
#To build pieces together
|
||||
url_mfp = await transform_mfp(url_mfp,MFP_url,MFP_password,client)
|
||||
url_mfp = await transform_mfp(url_mfp,client)
|
||||
return url_mfp
|
||||
@@ -1,66 +0,0 @@
|
||||
link = 'https://raw.githubusercontent.com/AstraeLabs/Domains/main/domains.json'
|
||||
import json
|
||||
import os
|
||||
import logging
|
||||
from Src.Utilities.config import setup_logging
|
||||
import Src.Utilities.config as config
|
||||
|
||||
level = config.LEVEL
|
||||
logger = setup_logging(level)
|
||||
|
||||
async def fetch_domain(client,site_name):
|
||||
response = await client.get(link)
|
||||
data = response.json()
|
||||
domain = data[site_name[0]]['full_url'][:-1]
|
||||
return domain
|
||||
def write_config(domain,site_name):
|
||||
try:
|
||||
json_file_path = os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(__file__))), 'config.json')
|
||||
|
||||
with open(json_file_path, 'r') as json_file:
|
||||
config_data = json.load(json_file)
|
||||
try:
|
||||
config_data['Siti'][site_name[1]]['url'] = domain
|
||||
with open(json_file_path, 'w') as json_file:
|
||||
json.dump(config_data, json_file, indent=4)
|
||||
return True
|
||||
except Exception as e:
|
||||
with open(json_file_path, 'w') as json_file:
|
||||
json.dump(config_data, json_file, indent=4)
|
||||
logger.info('Failed to write into config: ',e)
|
||||
return False
|
||||
except Exception as e:
|
||||
logger.info('Failed to write into config: ',e)
|
||||
return False
|
||||
|
||||
|
||||
async def update_site(client,site_name):
|
||||
try:
|
||||
domain = await fetch_domain(client,site_name)
|
||||
result = write_config(domain,site_name)
|
||||
return result
|
||||
except Exception as e:
|
||||
return False
|
||||
async def update_all_sites(client):
|
||||
try:
|
||||
sites = [['cb01new','CB01'],['guardaserie','Guardaserie'],['eurostreaming','Eurostreaming'],['guardaplay','Guardaflix'],['guardoserie_2','Guardoserie'],['animeworld','AnimeWorld'],['toonitalia','Toonitalia']]
|
||||
for item in sites:
|
||||
domain = await fetch_domain(client,item)
|
||||
write_config(domain,item)
|
||||
return True
|
||||
except Exception as e:
|
||||
logger.info('Failed to update domains: ',e)
|
||||
return False
|
||||
async def test_update_site():
|
||||
from curl_cffi.requests import AsyncSession
|
||||
async with AsyncSession() as client:
|
||||
result = await update_site(client,['guardoserie_2','Guardoserie'])
|
||||
|
||||
#result = await update_all_sites(client)
|
||||
#domain = await update_site(client,['eurostreamings','Eurostreaming'])
|
||||
#write_config(domain,['eurostreamings','Eurostreaming'])
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
import asyncio
|
||||
asyncio.run(test_update_site())
|
||||
+62
-74
@@ -1,95 +1,83 @@
|
||||
{
|
||||
"Siti": {
|
||||
"StreamingCommunity": {
|
||||
"url": "https://vixsrc.to",
|
||||
"SC_ForwardProxy": "0",
|
||||
"SC_PROXY": "0",
|
||||
"VX_ForwardProxy": "0",
|
||||
"VX_PROXY": "0",
|
||||
"enabled": "1"
|
||||
},
|
||||
"CB01": {
|
||||
"url": "https://cb01uno.click",
|
||||
"CB_PROXY": "0",
|
||||
"CB_ForwardProxy": "0",
|
||||
"MX_ForwardProxy": "0",
|
||||
"MX_PROXY": "0",
|
||||
"enabled": "1"
|
||||
},
|
||||
"Guardaserie": {
|
||||
"url": "https://guarda-serie.click",
|
||||
"enabled": "1",
|
||||
"GS_ForwardProxy": "0",
|
||||
"GS_PROXY": "0"
|
||||
},
|
||||
"GuardaHD": {
|
||||
"url": "https://mostraguarda.stream",
|
||||
"enabled": "1",
|
||||
"GH_ForwardProxy": "0",
|
||||
"GH_PROXY": "0"
|
||||
},
|
||||
"Eurostreaming": {
|
||||
"url": "https://eurostream.ing",
|
||||
"StreamingCommunity": {
|
||||
"url": "https://vixsrc.to",
|
||||
"SC_ForwardProxy": "0",
|
||||
"SC_PROXY": "0",
|
||||
"VX_ForwardProxy": "0",
|
||||
"VX_PROXY": "0",
|
||||
"enabled": "1"
|
||||
},
|
||||
"CB01":{
|
||||
"url": "https://cb01.uno",
|
||||
"CB_PROXY":"0",
|
||||
"CB_ForwardProxy":"0",
|
||||
"MX_ForwardProxy":"0",
|
||||
"MX_PROXY":"0",
|
||||
"enabled":"1"
|
||||
},
|
||||
"Guardaserie":{
|
||||
"url": "https://guardaserietv.asia",
|
||||
"enabled":"1",
|
||||
"GS_ForwardProxy":"0",
|
||||
"GS_PROXY":"0"
|
||||
},
|
||||
"GuardaHD":{
|
||||
"url": "https://mostraguarda.stream",
|
||||
"enabled":"1",
|
||||
"GH_ForwardProxy":"0",
|
||||
"GH_PROXY":"0"
|
||||
},
|
||||
"Eurostreaming":{
|
||||
"url": "https://eurostreamings.life",
|
||||
"enabled": "1",
|
||||
"ES_ForwardProxy": "0",
|
||||
"ES_PROXY": "0"
|
||||
},
|
||||
"Guardaflix": {
|
||||
"url": "https://guardaplay.live",
|
||||
},
|
||||
"Guardaflix":{
|
||||
"url": "https://guardaplay.blog",
|
||||
"enabled": "1",
|
||||
"GF_ForwardProxy": "0",
|
||||
"GF_PROXY": "0"
|
||||
},
|
||||
"Guardoserie": {
|
||||
"url": "https://guardoserie.run",
|
||||
},
|
||||
"Guardoserie":{
|
||||
"url": "https://guardoserie.blog",
|
||||
"enabled": "1",
|
||||
"GO_ForwardProxy": "0",
|
||||
"GO_PROXY": "0"
|
||||
},
|
||||
"AnimeWorld": {
|
||||
},
|
||||
"AnimeWorld":{
|
||||
"url": "https://www.animeworld.ac",
|
||||
"enabled": "1",
|
||||
"AW_ForwardProxy": "0",
|
||||
"AW_PROXY": "0"
|
||||
},
|
||||
"Realtime": {
|
||||
"enabled":"1",
|
||||
"AW_ForwardProxy":"0",
|
||||
"AW_PROXY":"0"
|
||||
},
|
||||
"Realtime": {
|
||||
"url": "https://realtime.it",
|
||||
"enabled": "1",
|
||||
"RT_ForwardProxy": "0",
|
||||
"RT_PROXY": "0"
|
||||
},
|
||||
"Toonitalia": {
|
||||
},
|
||||
"Toonitalia": {
|
||||
"url": "https://toonitalia.xyz",
|
||||
"enabled": "1",
|
||||
"TI_ForwardProxy": "0",
|
||||
"TI_PROXY": "0"
|
||||
},
|
||||
"OnlineSerieTV": {
|
||||
"url": "https://onlineserietv.lol",
|
||||
"enabled": "1",
|
||||
"OST_ForwardProxy": "0",
|
||||
"OST_PROXY": "0"
|
||||
},
|
||||
"Vidxgo": {
|
||||
"url": "https://v.vidxgo.co",
|
||||
"enabled": "1",
|
||||
"VD_ForwardProxy": "0",
|
||||
"VD_PROXY": "0"
|
||||
}
|
||||
},
|
||||
"Captcha": {
|
||||
"Uprot": {
|
||||
"UT_ForwardProxy": "0",
|
||||
"UT_PROXY": "0"
|
||||
}
|
||||
},
|
||||
"General": {
|
||||
"load_env": "0",
|
||||
"HOST": "0.0.0.0",
|
||||
"PORT": 8080,
|
||||
"Name": "MammaMia",
|
||||
"Icon": "\ud83c\udf55",
|
||||
"level": "info",
|
||||
"Global_Proxy": "0"
|
||||
}
|
||||
},
|
||||
"Captcha":{
|
||||
"Uprot": {
|
||||
"UT_ForwardProxy": "0",
|
||||
"UT_PROXY": "0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"General":{
|
||||
"load_env": "1",
|
||||
"HOST": "0.0.0.0",
|
||||
"PORT": 8080,
|
||||
"Name": "MammaMia",
|
||||
"Icon": "🍕",
|
||||
"level": "info",
|
||||
"Global_Proxy": "0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,4 +12,3 @@ fake-headers
|
||||
pycryptodome
|
||||
rich
|
||||
python-multipart
|
||||
jinja2
|
||||
@@ -14,14 +14,11 @@ from Src.API.animeworld import animeworld
|
||||
from Src.API.guardaflix import guardaflix
|
||||
from Src.API.guardoserie import guardoserie
|
||||
from Src.API.eurostreaming import eurostreaming
|
||||
from Src.API.onlineserietv import onlineserietv
|
||||
from Src.API.vidxgoalta import vidxgoalta
|
||||
from Src.API.toonitalia import toonitalia
|
||||
from Src.API.realtime import search_catalog as realtime
|
||||
from Src.API.realtime import meta_catalog as meta_catalog_realtime
|
||||
from Src.API.realtime import realtime as streams_realtime
|
||||
from Src.Utilities.dictionaries import STREAM,extra_sources,provider_map
|
||||
from Src.Utilities.update_config import update_all_sites
|
||||
from Src.API.epg import tivu, tivu_get,epg_guide,convert_bho_1,convert_bho_2,convert_bho_3
|
||||
from Src.API.extractors.uprot import get_uprot_numbers,generate_uprot_txt
|
||||
import logging
|
||||
@@ -34,7 +31,6 @@ level = config.LEVEL
|
||||
logger = setup_logging(level)
|
||||
from Src.Utilities.loadenv import load_env
|
||||
env_vars = load_env()
|
||||
from Src.Utilities.manifest import router as clone
|
||||
|
||||
#Configure Env Vars
|
||||
Global_Proxy = config.Global_Proxy
|
||||
@@ -59,16 +55,14 @@ GF = config.GF
|
||||
GO = config.GO
|
||||
RT = config.RT
|
||||
TI = config.TI
|
||||
OST = config.OST
|
||||
VD = config.VD
|
||||
HOST = config.HOST
|
||||
PORT = int(config.PORT)
|
||||
if env_vars.get('PORT_ENV'):
|
||||
PORT = int(env_vars.get('PORT_ENV'))
|
||||
Icon = config.Icon
|
||||
Name = config.Name
|
||||
#Cool code to set the hugging face if the service is hosted there.
|
||||
app = FastAPI()
|
||||
app.include_router(clone)
|
||||
limiter = Limiter(key_func=get_remote_address)
|
||||
app.state.limiter = limiter
|
||||
app.add_middleware(SlowAPIMiddleware)
|
||||
@@ -278,10 +272,6 @@ async def addon_stream(request: Request,config, type, id,):
|
||||
else:
|
||||
MFP = "0"
|
||||
MFP_CREDENTIALS = ['','']
|
||||
#Get instance URL to pass it to vidxgo
|
||||
forwarded_proto = request.headers.get("x-forwarded-proto")
|
||||
scheme = forwarded_proto if forwarded_proto else request.url.scheme
|
||||
instance_url = f"{scheme}://{request.url.netloc}"
|
||||
async with AsyncSession(proxies = proxies) as client:
|
||||
if type == "tv":
|
||||
for channel in STREAM["channels"]:
|
||||
@@ -313,13 +303,12 @@ async def addon_stream(request: Request,config, type, id,):
|
||||
else:
|
||||
SC_MFP = '0'
|
||||
streams = await streaming_community(streams,id,client,SC_MFP,MFP_CREDENTIALS)
|
||||
|
||||
if provider_maps['CB01'] == "1" and CB == "1":
|
||||
streams = await cb01(streams,id,MFP,MFP_CREDENTIALS,client)
|
||||
if provider_maps['GUARDASERIE'] == "1" and GS == "1":
|
||||
streams = await guardaserie(streams,id,client)
|
||||
if provider_maps['GUARDAHD'] == "1" and GHD == "1":
|
||||
streams = await guardahd(streams,id,client,MFP,MFP_CREDENTIALS)
|
||||
streams = await guardahd(streams,id,client)
|
||||
if provider_maps['EUROSTREAMING'] == "1" and ES == "1":
|
||||
streams = await eurostreaming(streams,id,client,MFP,MFP_CREDENTIALS)
|
||||
if provider_maps['GUARDAFLIX'] == "1" and GF == "1":
|
||||
@@ -330,11 +319,6 @@ async def addon_stream(request: Request,config, type, id,):
|
||||
streams = await streams_realtime(streams,id,client)
|
||||
if provider_maps['TOONITALIA'] == '1' and TI == '1':
|
||||
streams = await toonitalia(streams,id,client,MFP,MFP_CREDENTIALS)
|
||||
if provider_maps['ONLINESERIETV'] == '1' and OST == '1':
|
||||
streams = await onlineserietv(streams,id,client)
|
||||
if provider_maps['VIDXGO'] == '1' and VD == '1':
|
||||
streams = await vidxgoalta(streams,id,client,instance_url)
|
||||
|
||||
return respond_with(streams)
|
||||
if not streams['streams']:
|
||||
raise HTTPException(status_code=404)
|
||||
@@ -345,14 +329,8 @@ async def addon_stream(request: Request,config, type, id,):
|
||||
async def uprot(request: Request):
|
||||
async with AsyncSession(proxies = proxies) as client:
|
||||
image, cookies = await get_uprot_numbers(client)
|
||||
context = {
|
||||
'request': request,
|
||||
'image_url': image
|
||||
}
|
||||
|
||||
response = static.TemplateResponse(name='uprot.html',context=context,request=request)
|
||||
if cookies:
|
||||
response.set_cookie(key='PHPSESSID', value=cookies.get('PHPSESSID'),httponly=True)
|
||||
response = static.TemplateResponse('uprot.html',{'request':request,"image_url": image})
|
||||
response.set_cookie(key='PHPSESSID', value=cookies['PHPSESSID'],httponly=True)
|
||||
|
||||
return response
|
||||
@app.post("/uprot")
|
||||
@@ -363,28 +341,9 @@ async def execute_uprot(request: Request,user_input = Form(...),PHPSESSID: str =
|
||||
}
|
||||
status = await generate_uprot_txt(user_input,cookies,client)
|
||||
if status == True:
|
||||
context = {
|
||||
'request': request,
|
||||
'image_url': 'https://tinyurl.com/doneokdone'
|
||||
}
|
||||
return static.TemplateResponse(name='uprot.html',context=context,request=request)
|
||||
response = static.TemplateResponse('uprot.html',{'request':request,"image_url": 'https://tinyurl.com/doneokdone'})
|
||||
elif status == False:
|
||||
context = {
|
||||
'request': request,
|
||||
'image_url': 'https://tinyurl.com/tryagaindumb'
|
||||
}
|
||||
return static.TemplateResponse('uprot.html',context=context,request=request)
|
||||
|
||||
@app.get('/update')
|
||||
async def update(request: Request):
|
||||
async with AsyncSession(proxies = proxies) as client:
|
||||
result = await update_all_sites(client)
|
||||
print(result)
|
||||
if result:
|
||||
return JSONResponse(content={"message": "200"})
|
||||
if not result:
|
||||
return JSONResponse(content={"message": "Failed"})
|
||||
|
||||
return static.TemplateResponse('uprot.html',{'request':request,"image_url": 'https://tinyurl.com/tryagaindumb'})
|
||||
|
||||
if __name__ == '__main__':
|
||||
import uvicorn
|
||||
|
||||
+2
-14
@@ -180,7 +180,7 @@ CONFIGURE = """
|
||||
<img src="https://creazilla-store.fra1.digitaloceanspaces.com/emojis/49647/pizza-emoji-clipart-md.png" alt="Logo">
|
||||
</div>
|
||||
<h1 class="name">Mamma Mia</h1>
|
||||
<h2 class="version">v2.2.0</h2>
|
||||
<h2 class="version">v2.1.0</h2>
|
||||
<div id="additionalText">
|
||||
<h2>This addon provides Movie, Series, Anime, and Live TV HTTPS Streams.<br> https://github.com/UrloMythus/MammaMia/</h2>
|
||||
</div>
|
||||
@@ -219,16 +219,6 @@ CONFIGURE = """
|
||||
<input type="checkbox" id="cb01"> CB01 🕵️♂️
|
||||
</label>
|
||||
</div>
|
||||
<div class="provider-group">
|
||||
<label for="onlineserietv" class="provider-label">
|
||||
<input type="checkbox" id="onlineserietv"> OnlineSerieTV
|
||||
</label>
|
||||
</div>
|
||||
<div class="provider-group">
|
||||
<label for="vidxgo" class="provider-label">
|
||||
<input type="checkbox" id="vidxgo"> Vidxgo
|
||||
</label>
|
||||
</div>
|
||||
<div class="provider-group">
|
||||
<label for="streamingcommunity" class="provider-label">
|
||||
<input type="checkbox" id="streamingcommunity"> StreamingCommunity 🕵️♂️
|
||||
@@ -242,7 +232,7 @@ CONFIGURE = """
|
||||
</div>
|
||||
<div class="provider-group">
|
||||
<label for="realtime" class="provider-label">
|
||||
<input type="checkbox" id="toonitalia"> Toonitalia 🕵️♂️
|
||||
<input type="checkbox" id="toonitalia"> Toonitalia
|
||||
</label>
|
||||
</div>
|
||||
<div class="provider-group">
|
||||
@@ -297,8 +287,6 @@ CONFIGURE = """
|
||||
"eurostreaming": "ES",
|
||||
"realtime": "RT",
|
||||
"toonitalia": "TI",
|
||||
"onlineserietv": "OST",
|
||||
"vidxgo": "VD",
|
||||
"streamingcommunity_mfp": "SC_MFP",
|
||||
"mediaflowproxy": "MFP"
|
||||
};
|
||||
|
||||
+2
-14
@@ -180,7 +180,7 @@ HTML = """
|
||||
<img src="https://creazilla-store.fra1.digitaloceanspaces.com/emojis/49647/pizza-emoji-clipart-md.png" alt="Logo">
|
||||
</div>
|
||||
<h1 class="name">Mamma Mia</h1>
|
||||
<h2 class="version">v2.2.0</h2>
|
||||
<h2 class="version">v2.1.0</h2>
|
||||
<div id="additionalText">
|
||||
<h2>This addon provides Movie, Series, Anime, and Live TV HTTPS Streams.<br> https://github.com/UrloMythus/MammaMia/</h2>
|
||||
</div>
|
||||
@@ -219,16 +219,6 @@ HTML = """
|
||||
<input type="checkbox" id="cb01"> CB01 🕵️♂️
|
||||
</label>
|
||||
</div>
|
||||
<div class="provider-group">
|
||||
<label for="onlineserietv" class="provider-label">
|
||||
<input type="checkbox" id="onlineserietv"> OnlineSerieTV
|
||||
</label>
|
||||
</div>
|
||||
<div class="provider-group">
|
||||
<label for="vidxgo" class="provider-label">
|
||||
<input type="checkbox" id="vidxgo"> Vidxgo
|
||||
</label>
|
||||
</div>
|
||||
<div class="provider-group">
|
||||
<label for="streamingcommunity" class="provider-label">
|
||||
<input type="checkbox" id="streamingcommunity"> StreamingCommunity 🕵️♂️
|
||||
@@ -242,7 +232,7 @@ HTML = """
|
||||
</div>
|
||||
<div class="provider-group">
|
||||
<label for="realtime" class="provider-label">
|
||||
<input type="checkbox" id="toonitalia"> Toonitalia 🕵️♂️
|
||||
<input type="checkbox" id="toonitalia"> Toonitalia
|
||||
</label>
|
||||
</div>
|
||||
<div class="provider-group">
|
||||
@@ -297,8 +287,6 @@ HTML = """
|
||||
"eurostreaming": "ES",
|
||||
"realtime": "RT",
|
||||
"toonitalia": "TI",
|
||||
"onlineserietv": "OST",
|
||||
"vidxgo": "VD",
|
||||
"streamingcommunity_mfp": "SC_MFP",
|
||||
"mediaflowproxy": "MFP"
|
||||
};
|
||||
|
||||
+1
-1
@@ -116,7 +116,7 @@
|
||||
<div id="additionalText">
|
||||
<h2>Inserire i numeri in foto per abilitare la fonte MaxStream per la durata di un giorno<br> https://github.com/UrloMythus/MammaMia/</h2>
|
||||
<div class="captchaimg">
|
||||
<img src="{{ image_url }}" alt="Failed to get the captcha">
|
||||
<img src="{{ image_url }}" alt="captcha1">
|
||||
</div>
|
||||
<form id = 'form' action="/uprot" method="post">
|
||||
<input type="text" name="user_input" required>
|
||||
|
||||
Reference in New Issue
Block a user