379 Commits
31 changed files with 816 additions and 225 deletions
+4 -3
View File
@@ -52,6 +52,7 @@ showname_replace = {
"Shippuuden": "Shippuden", "Shippuuden": "Shippuden",
" ": "+", " ": "+",
"Solo+Leveling+2": "Solo+Leveling+2:", "Solo+Leveling+2": "Solo+Leveling+2:",
"Case+Book": "Casebook",
"-": "" "-": ""
} }
async def security_cookie (response): async def security_cookie (response):
@@ -78,15 +79,15 @@ async def get_mp4(anime_url,ismovie,episode,client,i,streams):
episode_page = soup.find('a', {'data-episode-num':episode }) episode_page = soup.find('a', {'data-episode-num':episode })
if episode_page is None: if episode_page is None:
return streams return streams
episode_page = f'{AW_DOMAIN}{episode_page["href"]}' episode_page = f'{AW_DOMAIN}/api/episode/serverPlayerAnimeWorld?id={episode_page["href"].split("/")[-1]}'
response = await client.get(ForwardProxy + episode_page,allow_redirects=True, cookies = cookies,impersonate = "chrome124", proxies=proxies) response = await client.get(ForwardProxy + episode_page,allow_redirects=True, cookies = cookies,impersonate = "chrome124", proxies=proxies)
if response.status_code == 202: if response.status_code == 202:
cookies = await security_cookie(response) cookies = await security_cookie(response)
response = await client.get(ForwardProxy + episode_page,allow_redirects=True, cookies = cookies,impersonate = "chrome124", proxies=proxies) response = await client.get(ForwardProxy + episode_page,allow_redirects=True, cookies = cookies,impersonate = "chrome124", proxies=proxies)
soup = BeautifulSoup(response.text,'lxml') soup = BeautifulSoup(response.text,'lxml')
a_tag = soup.find('a', {'id': 'alternativeDownloadLink', 'class': 'm-1 btn btn-sm btn-primary'}) a_tag = soup.find('source')
url = a_tag['href'] url = a_tag['src']
response = await client.head(url) response = await client.head(url)
if response.status_code == 404: if response.status_code == 404:
url = None url = None
+3 -3
View File
@@ -172,14 +172,14 @@ async def series_search_streams(text,search_text,response_text,headers,season,ep
if match: if match:
streams = await get_maxstream(match.group(2),streams,client) streams = await get_maxstream(match.group(2),streams,client)
else: 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: if match:
links = match.group(0) links = match.group(0)
soup = BeautifulSoup(links,'lxml',parse_only=SoupStrainer('a')) soup = BeautifulSoup(links,'lxml',parse_only=SoupStrainer('a'))
host_links = soup.find_all('a') host_links = soup.find_all('a')
mixdrop_real_link = await get_stayonline(host_links[1]['href'],client) mixdrop_real_link = await get_stayonline(host_links[1]['href'],client)
status = False 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: if status == False:
streams = await get_maxstream(host_links[0]['href'],streams,client) streams = await get_maxstream(host_links[0]['href'],streams,client)
return streams return streams
@@ -255,7 +255,7 @@ async def cb01(streams,id,MFP,MFP_CREDENTIALS,client):
async def test_animeworld(): async def test_animeworld():
from curl_cffi.requests import AsyncSession from curl_cffi.requests import AsyncSession
async with AsyncSession() as client: async with AsyncSession() as client:
test_id = "tt0158552:1:2" # This is an example ID format test_id = "tt11378946" # This is an example ID format
MFP = "0" MFP = "0"
results = await cb01({'streams': []},test_id,MFP,['test','test'],client) results = await cb01({'streams': []},test_id,MFP,['test','test'],client)
print(results) print(results)
+1 -1
View File
@@ -1 +1 @@
{'PHPSESSID': '351o0p0f00aaa7m0rughtn63og', 'captch5': 'e6cf235e0bcfee6044841d9dc4a7ea82'} {}
+24 -8
View File
@@ -98,7 +98,7 @@ async def real_page(safego_url,client):
soup = BeautifulSoup(response.text,'lxml', parse_only=SoupStrainer('a')) soup = BeautifulSoup(response.text,'lxml', parse_only=SoupStrainer('a'))
if len(soup)>= 1: if len(soup)>= 1:
return soup.a['href'] return soup.a['href']
else: elif 'The requested URL was not found on this server.' not in response.text:
logger.info("Getting numbers") logger.info("Getting numbers")
numbers,cookies = await get_numbers(safego_url,client) numbers,cookies = await get_numbers(safego_url,client)
numbers = convert_numbers(numbers) numbers = convert_numbers(numbers)
@@ -117,17 +117,24 @@ async def get_host_link(pattern,atag,client):
headers = random_headers.generate() headers = random_headers.generate()
if match: if match:
href_value = match.group(1) href_value = match.group(1)
response = await client.head(ForwardProxy + href_value, headers={**headers, 'Range': 'bytes=0-0'}, proxies = proxies) 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 href_value = response.url
if '%20' in href_value:
href_value = href_value.replace('%20','')
k+=1
if k == 5:
break
href = await real_page(href_value,client) href = await real_page(href_value,client)
return href return href
async def scraping_links(atag,MFP,MFP_CREDENTIALS,client,streams,language): 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. #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: if "MixDrop" in atag and "DeltaBit" in atag:
pattern = r'<a\s+href="([^"]+)"[^>]*rel="noopener"[^>]*>DeltaBit</a>' pattern = r'<a\s+href="([^"]+)"[^>]*[^>]*>DeltaBit</a>'
href = await get_host_link(pattern,atag,client) href = await get_host_link(pattern,atag,client)
try: try:
streams = await deltabit(href,client,streams,"Eurostreaming",proxies,ForwardProxy,language) streams = await deltabit(href,client,streams,"Eurostreaming",proxies,ForwardProxy,language,'Deltabit')
except Exception as e: except Exception as e:
pattern = r'<a\s+href="([^"]+)"[^>]*rel="noopener"[^>]*>MixDrop</a>' pattern = r'<a\s+href="([^"]+)"[^>]*rel="noopener"[^>]*>MixDrop</a>'
href = await get_host_link(pattern,atag,client) href = await get_host_link(pattern,atag,client)
@@ -145,7 +152,7 @@ async def scraping_links(atag,MFP,MFP_CREDENTIALS,client,streams,language):
try: try:
pattern = r'<a\s+href="([^"]+)"[^>]*rel="noopener"[^>]*>DeltaBit</a>' pattern = r'<a\s+href="([^"]+)"[^>]*rel="noopener"[^>]*>DeltaBit</a>'
href = await get_host_link(pattern,atag,client) href = await get_host_link(pattern,atag,client)
streams = await deltabit(href,client,streams,"Eurostreaming",proxies,ForwardProxy,language) streams = await deltabit(href,client,streams,"Eurostreaming",proxies,ForwardProxy,language,'Deltabit')
return streams return streams
except Exception as e: except Exception as e:
return streams return streams
@@ -159,6 +166,14 @@ async def scraping_links(atag,MFP,MFP_CREDENTIALS,client,streams,language):
return streams return streams
except Exception as e: except Exception as e:
return streams 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: if 'DeltaBit' not in atag and 'MixDrop' not in atag and 'MaxStream' not in atag:
logger.info("Just give up") logger.info("Just give up")
return streams return streams
@@ -180,7 +195,7 @@ async def episodes_find(description,season,episode,MFP,MFP_CREDENTIALS,client,st
return streams return streams
async def search(showname,date,season,episode,MFP,MFP_CREDENTIALS,client,streams): async def search(showname,date,season,episode,MFP,MFP_CREDENTIALS,client,streams):
headers = random_headers.generate() 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) 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() results = response.json()
for i in results: for i in results:
@@ -191,7 +206,7 @@ async def search(showname,date,season,episode,MFP,MFP_CREDENTIALS,client,streams
title = description['title']['rendered'] title = description['title']['rendered']
description = description['content']['rendered'] description = description['content']['rendered']
ratio = difflib.SequenceMatcher(None, title, showname).ratio() ratio = difflib.SequenceMatcher(None, title, showname).ratio()
if ratio >=0.96: if ratio >=0.96 or (showname in title):
streams = await episodes_find(description,season,episode,MFP,MFP_CREDENTIALS,client,streams) streams = await episodes_find(description,season,episode,MFP,MFP_CREDENTIALS,client,streams)
return streams return streams
else: else:
@@ -209,6 +224,7 @@ async def search(showname,date,season,episode,MFP,MFP_CREDENTIALS,client,streams
match = year_pattern.search(response_2.text) match = year_pattern.search(response_2.text)
if match: if match:
year = match.group(0) year = match.group(0)
print(abs(int(year)),int(date))
if abs(int(year) - int(date)) <=1: if abs(int(year) - int(date)) <=1:
streams = await episodes_find(description,season,episode,MFP,MFP_CREDENTIALS,client,streams) streams = await episodes_find(description,season,episode,MFP,MFP_CREDENTIALS,client,streams)
return streams return streams
@@ -244,7 +260,7 @@ async def eurostreaming(streams,id,client,MFP,MFP_CREDENTIALS):
async def test_euro(): async def test_euro():
from curl_cffi.requests import AsyncSession from curl_cffi.requests import AsyncSession
async with AsyncSession() as client: async with AsyncSession() as client:
results = await eurostreaming({'streams': []},"tt0460681:11:1",client,"0",['test','test']) results = await eurostreaming({'streams': []},"tt2701582:7:2",client,"0",['test','test'])
print(results) print(results)
+23 -14
View File
@@ -5,6 +5,7 @@ import re
import time import time
import logging import logging
from Src.Utilities.config import setup_logging from Src.Utilities.config import setup_logging
from Src.Utilities.eval import eval_solver
level = config.LEVEL level = config.LEVEL
logger = setup_logging(level) logger = setup_logging(level)
Icon = config.Icon Icon = config.Icon
@@ -15,9 +16,8 @@ random_headers = Headers()
async def deltabit(page_url,client,streams,site_name,proxies,ForwardProxy,language): async def deltabit(page_url,client,streams,site_name,proxies,ForwardProxy,language,extractor):
"""Extract Deltabit URL.""" """Extract Deltabit URL."""
i = 0
#Set up some headers #Set up some headers
headers = random_headers.generate() headers = random_headers.generate()
headers2 = random_headers.generate() headers2 = random_headers.generate()
@@ -46,25 +46,34 @@ async def deltabit(page_url,client,streams,site_name,proxies,ForwardProxy,langua
name = input.get('name') name = input.get('name')
value = input.get('value') value = input.get('value')
data[name] = value data[name] = value
data['imhuman'] = '' if extractor == 'Deltabit':
imhuman = ''
elif extractor == 'Turbovid':
imhuman = 'Proceed+to+video'
data['imhuman'] = imhuman
data['referer']= page_url data['referer']= page_url
#We need to wait 2.5 seconds or the request will fail #We need to wait 2.5/5 seconds or the request will fail
if extractor == 'Deltabit':
time.sleep(2.5) time.sleep(2.5)
elif extractor == 'Turbovid':
time.sleep(5)
fname = data['fname'] fname = data['fname']
#Request to the deltabit link #Request to the deltabit link
response = await client.post(ForwardProxy + page_url, data = data, headers = headers, proxies = proxies) 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) link = re.findall(r'sources:\s*\["([^"]+)"', response.text, re.DOTALL)
if not link:
if not i >= 3:
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: if link:
streams['streams'].append({'name': f"{Name}{language}",'title': f'{Icon}{site_name}\n▶️ Deltabit\n{fname}', 'url': link, 'behaviorHints': {'bingeGroup': f'{site_name.lower()}'}}) link = link[0]
elif extractor == 'Turbovid':
link = await eval_solver(response.text,proxies, ForwardProxy, client,r'sources:\s*\["([^"]+)"')
if not link:
i = 0
if not i >= 3:
link,fname = await deltabit(page_url,client,streams,site_name,proxies,ForwardProxy,language,extractor)
i +=1
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()}'}})
return streams return streams
@@ -76,7 +85,7 @@ async def deltabit(page_url,client,streams,site_name,proxies,ForwardProxy,langua
async def test_deltabit(): async def test_deltabit():
from curl_cffi.requests import AsyncSession from curl_cffi.requests import AsyncSession
async with AsyncSession() as client: async with AsyncSession() as client:
results = await deltabit("https://deltabit.co/a54ehb8w42pe",client,{'streams': []},'Deltabit', {},"","") results = await deltabit("https://turbovid.me/squc5gdzptgw",client,{'streams': []},'Deltabit', {},"","",'Turbovid')
print(results) print(results)
if __name__ == "__main__": if __name__ == "__main__":
import asyncio import asyncio
+1 -1
View File
@@ -25,7 +25,7 @@ async def mixdrop(url,client,MFP,MFP_CREDENTIALS,streams,site_name,proxies,Forwa
else: else:
headers = {"accept-language": "en-US,en;q=0.5"} headers = {"accept-language": "en-US,en;q=0.5"}
url = await eval_solver(url, proxies , ForwardProxy, client) url = await eval_solver(url, proxies , ForwardProxy, client,r'MDCore.wurl ?= ?"(.*?)"')
if url: if url:
url = "https:" + url url = "https:" + url
logger.info(f"{site_name} on Mixdrop found results for the current ID") logger.info(f"{site_name} on Mixdrop found results for the current ID")
+45
View File
@@ -0,0 +1,45 @@
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())
+1 -1
View File
@@ -11,7 +11,7 @@ Name = config.Name
async def supervideo(supervideo_link,client,streams, site_name, proxies,ForwardProxy): async def supervideo(supervideo_link,client,streams, site_name, proxies,ForwardProxy):
url = await eval_solver(supervideo_link,proxies, ForwardProxy, client) url = await eval_solver(supervideo_link,proxies, ForwardProxy, client,r'file:"(.*?)"')
if url: if url:
streams['streams'].append({'name': f"{Name}",'title': f'{Icon}{site_name}\n▶️ Supervideo', 'url': url, 'behaviorHints': {'bingeGroup': f'{site_name.lower()}'}}) 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") logger.info(f"{site_name} on SuperVideo found results for the current ID")
+36 -9
View File
@@ -5,7 +5,8 @@ import logging
import Src.Utilities.config as config import Src.Utilities.config as config
from Src.Utilities.config import setup_logging from Src.Utilities.config import setup_logging
from Src.Utilities.loadenv import load_env from Src.Utilities.loadenv import load_env
from fake_headers import Headers
random_headers = Headers()
UT_PROXY = config.UT_PROXY UT_PROXY = config.UT_PROXY
UT_ForwardProxy = config.UT_ForwardProxy UT_ForwardProxy = config.UT_ForwardProxy
level = config.LEVEL level = config.LEVEL
@@ -31,8 +32,10 @@ else:
ForwardProxy = "" ForwardProxy = ""
url = 'https://uprot.net/msf/r4hcq47tarq8' url = 'https://uprot.net/msf/r4hcq47tarq8'
headers = { headers = {
'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64; rv:146.0) Gecko/20100101 Firefox/146.0', 'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/144.0.0.0 Safari/537.36',
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
'Accept-Language': 'en-US,en;q=0.5', 'Accept-Language': 'en-US,en;q=0.5',
'Content-Type': 'application/x-www-form-urlencoded', 'Content-Type': 'application/x-www-form-urlencoded',
@@ -50,7 +53,8 @@ headers = {
} }
async def get_uprot_numbers(client): async def get_uprot_numbers(client):
try: try:
response = await client.post(ForwardProxy + url, headers=headers, proxies = proxies) response = await client.post(ForwardProxy + url, headers=headers, proxies = proxies, impersonate = 'chrome')
set_cookie = response.headers.get('set-cookie') set_cookie = response.headers.get('set-cookie')
parts = set_cookie.split(';')[0].split('=') parts = set_cookie.split(';')[0].split('=')
key = parts[0] key = parts[0]
@@ -63,14 +67,14 @@ async def get_uprot_numbers(client):
img = soup.find('img')['src'] img = soup.find('img')['src']
return img,cookies return img,cookies
except Exception as e: except Exception as e:
logger.info(f'Uprot failed to generate numberers/cookies: {e}') logger.info(f'Uprot failed to generate numbers/cookies: {e}')
return None,None return None,None
async def generate_uprot_txt(numbers,cookies,client): async def generate_uprot_txt(numbers,cookies,client):
try: try:
data = { data = {
'captcha': str(numbers), 'captcha': str(numbers),
} }
response = await client.post(ForwardProxy + url, cookies=cookies, headers=headers, data=data, proxies = proxies) response = await client.post(ForwardProxy + url, cookies=cookies, headers=headers, data=data, proxies = proxies, impersonate = 'chrome')
if response.status_code != 200: if response.status_code != 200:
return False return False
set_cookie = response.headers.get('set-cookie') set_cookie = response.headers.get('set-cookie')
@@ -88,14 +92,18 @@ async def generate_uprot_txt(numbers,cookies,client):
logger.info(f'Uprot failed to generate captcha cookie: {e}') logger.info(f'Uprot failed to generate captcha cookie: {e}')
return False return False
async def get_maxstream_link(text,client):
async def find_link(text,client):
soup = BeautifulSoup(text,'lxml',parse_only=SoupStrainer('a')) soup = BeautifulSoup(text,'lxml',parse_only=SoupStrainer('a'))
a_tags = soup.find_all('a') a_tags = soup.find_all('a')
max_stream = None max_stream = None
for tag in a_tags: for tag in a_tags:
if 'C O N T I N U E' in tag.text.upper(): if 'C O N T I N U E' in tag.text.upper() or 'CONTINUE' in tag.text.upper() :
max_stream = tag['href'] max_stream = tag['href']
return max_stream
async def get_maxstream_link(text,client):
max_stream = await find_link(text,client)
if max_stream: if max_stream:
redirect = max_stream redirect = max_stream
time = 0 time = 0
@@ -103,13 +111,25 @@ async def get_maxstream_link(text,client):
response = await client.head(ForwardProxy + max_stream,headers=headers,impersonate = 'chrome', allow_redirects = True, proxies = proxies) response = await client.head(ForwardProxy + max_stream,headers=headers,impersonate = 'chrome', allow_redirects = True, proxies = proxies)
redirect = response.url redirect = response.url
time+=1 time+=1
if time == 1000: if time == 10:
return False return False
max_stream = 'https://maxstream.video/emvvv/' + response.url.split('watchfree/')[1].split('/')[1] max_stream = 'https://maxstream.video/emvvv/' + response.url.split('watchfree/')[1].split('/')[1]
return max_stream return max_stream
async def bypass_uprot(client,link): async def bypass_uprot(client,link):
try: 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: if 'mse' in link:
link = link.replace('mse','msf') link = link.replace('mse','msf')
current_directory = os.path.dirname(os.path.abspath(__file__)) current_directory = os.path.dirname(os.path.abspath(__file__))
@@ -120,8 +140,15 @@ async def bypass_uprot(client,link):
cookies = json.loads(parts[0].replace("'", '"')) cookies = json.loads(parts[0].replace("'", '"'))
data = json.loads(parts[1].replace("'", '"')) data = json.loads(parts[1].replace("'", '"'))
response = await client.post(ForwardProxy + link, cookies=cookies, headers=headers, data =data, impersonate = 'chrome', proxies = proxies) 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) max_stream = await get_maxstream_link(response.text,client)
if response.status_code == 403:
max_stream = False
return max_stream return max_stream
except Exception as e: except Exception as e:
logger.info(f'Uprot failed: {e}') logger.info(f'Uprot failed: {e}')
if '[Errno 2] No such file or directory' in e: if '[Errno 2] No such file or directory' in e:
+2 -2
View File
@@ -1,2 +1,2 @@
{'PHPSESSID': 'bm1qtf1pe0dnr4u4nhvofitk8u', 'captcha': 'ca5612d51c9bbc60f8d76051693d3315'} {}
{'captcha': '853'} {}
+128
View File
@@ -0,0 +1,128 @@
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
+6 -2
View File
@@ -28,7 +28,11 @@ async def vixcloud(link,client,MFP,MFP_CREDENTIALS,streams,site_name,proxies,For
headers['Origin'] = f"{SC_DOMAIN}" headers['Origin'] = f"{SC_DOMAIN}"
headers['User-Agent'] = User_Agent headers['User-Agent'] = User_Agent
headers['user-agent'] = User_Agent headers['user-agent'] = User_Agent
response = await client.get(link) # 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)
if response.status_code != 200: if response.status_code != 200:
logger.warning(f"Failed to extract URL components from VixSRC, Invalid Request: {response.status_code}") logger.warning(f"Failed to extract URL components from VixSRC, Invalid Request: {response.status_code}")
soup = BeautifulSoup(response.text, "lxml", parse_only=SoupStrainer("body")) soup = BeautifulSoup(response.text, "lxml", parse_only=SoupStrainer("body"))
@@ -69,7 +73,7 @@ async def vixcloud(link,client,MFP,MFP_CREDENTIALS,streams,site_name,proxies,For
async def test_vixcloud(): async def test_vixcloud():
from curl_cffi.requests import AsyncSession from curl_cffi.requests import AsyncSession
async with AsyncSession() as client: 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) print(results)
if __name__ == "__main__": if __name__ == "__main__":
import asyncio import asyncio
+15 -2
View File
@@ -9,6 +9,7 @@ from Src.API.extractors.uqload import uqload
from Src.API.extractors.dropload import dropload from Src.API.extractors.dropload import dropload
import logging import logging
from Src.Utilities.config import setup_logging from Src.Utilities.config import setup_logging
from Src.Utilities.update_config import update_site
import json import json
import random import random
level = config.LEVEL level = config.LEVEL
@@ -36,7 +37,15 @@ if GF_ForwardProxy == "1":
else: else:
ForwardProxy = "" 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): async def get_player(page_link,MFP, MFP_CREDENTIALS,client, headers,streams):
response = await client.get(ForwardProxy + page_link, headers= headers, proxies = proxies) 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, 'term': showname,
} }
response = await client.post(ForwardProxy + f'{GF_DOMAIN}/wp-admin/admin-ajax.php', headers=headers, data=data, proxies = proxies) 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 != 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}") logger.warning(f"Guardaflix Failed to fetch search results: {response.status_code}")
soup = BeautifulSoup(response.text,'lxml', parse_only= SoupStrainer('a')) soup = BeautifulSoup(text,'lxml', parse_only= SoupStrainer('a'))
a_tags = soup.find_all('a') a_tags = soup.find_all('a')
for a in a_tags: for a in a_tags:
href = a['href'] href = a['href']
+15 -9
View File
@@ -4,7 +4,8 @@ import re
import Src.Utilities.config as config import Src.Utilities.config as config
from fake_headers import Headers from fake_headers import Headers
from Src.Utilities.loadenv import load_env from Src.Utilities.loadenv import load_env
from Src.API.extractors.supervideo import supervideo from Src.API.extractors.streamhg import streamhg
from Src.API.extractors.mixdrop import mixdrop
import json, random import json, random
import logging import logging
from Src.Utilities.config import setup_logging from Src.Utilities.config import setup_logging
@@ -41,22 +42,27 @@ async def search(clean_id,client):
logger.warning(f"GuardaHD Failed to fetch search results: {response.status_code}") logger.warning(f"GuardaHD Failed to fetch search results: {response.status_code}")
soup = BeautifulSoup(response.text,'lxml',parse_only=SoupStrainer('li')) soup = BeautifulSoup(response.text,'lxml',parse_only=SoupStrainer('li'))
li_tags = soup.find_all('li') li_tags = soup.find_all('li')
results = {}
for tag in li_tags: for tag in li_tags:
if 'supervideo' in tag['data-link']: if tag.get('data-link') and (('mixdrop') in tag.text or ('streamhg') in tag.text):
href = 'https:' + tag['data-link'] results[tag.text.strip()] = 'https:' + tag['data-link']
return href return results
async def guardahd(streams,id,client): async def guardahd(streams,id,client,MFP,MFP_CREDENTIALS):
try: try:
general = await is_movie(id) general = await is_movie(id)
ismovie = general[0] ismovie = general[0]
clean_id = general[1] clean_id = general[1]
if ismovie == 0: if ismovie == 0:
return streams return streams
supervideo_link = await search(clean_id,client) results = await search(clean_id,client)
streams = await supervideo(supervideo_link, client,streams,"GuardaHD",proxies, ForwardProxy) 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,'')
return streams return streams
except Exception as e: except Exception as e:
logger.warning(f"MammaMia: GuardaHD Failed {e}") logger.warning(f"MammaMia: GuardaHD Failed {e}")
@@ -66,8 +72,8 @@ async def test_script():
from curl_cffi.requests import AsyncSession from curl_cffi.requests import AsyncSession
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 = "tt12300742" # This is an example ID format test_id = "tt16426418" # This is an example ID format
results = await guardahd({'streams': []},test_id, client) results = await guardahd({'streams': []},test_id, client,'0','')
print(results) print(results)
if __name__ == "__main__": if __name__ == "__main__":
+1 -1
View File
@@ -117,7 +117,7 @@ async def test_script():
from curl_cffi.requests import AsyncSession from curl_cffi.requests import AsyncSession
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 = "tt10919420:1:1" # This is an example ID format tt0460649 test_id = "tt33318655:2:5" # This is an example ID format tt0460649
results = await guardaserie({'streams': []},test_id, client) results = await guardaserie({'streams': []},test_id, client)
print(results) print(results)
+16 -2
View File
@@ -10,6 +10,7 @@ from Src.API.extractors.loadm import loadm
from Src.API.extractors.dropload import dropload from Src.API.extractors.dropload import dropload
import logging import logging
from Src.Utilities.config import setup_logging from Src.Utilities.config import setup_logging
from Src.Utilities.update_config import update_site
level = config.LEVEL level = config.LEVEL
import json import json
import random import random
@@ -32,12 +33,21 @@ if GO_PROXY == "1":
"https": proxy "https": proxy
} }
GO_ForwardProxy = config.GO_ForwardProxy GO_ForwardProxy = config.GO_ForwardProxy
if GO_ForwardProxy == "1": if GO_ForwardProxy == "1":
ForwardProxy = env_vars.get('ForwardProxy') ForwardProxy = env_vars.get('ForwardProxy')
else: else:
ForwardProxy = "" 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): async def get_player(page_link,MFP,MFP_CREDENTIALS,client, headers, streams):
response = await client.get(ForwardProxy + page_link, headers= headers, proxies = proxies) 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) showname = quote(showname)
data = f's={showname}&action=searchwp_live_search&swpengine=default&swpquery={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) 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 != 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}") logger.warning(f"Guardoserie Failed to fetch search results: {response.status_code}")
soup = BeautifulSoup(response.text,'lxml', parse_only= SoupStrainer('a', class_='ss-title')) soup = BeautifulSoup(text,'lxml', parse_only= SoupStrainer('a', class_='ss-title'))
a_tags = soup.find_all('a') a_tags = soup.find_all('a')
for a in a_tags: for a in a_tags:
href = a['href'] href = a['href']
@@ -7,10 +7,18 @@ import json, random
import re import re
from Src.Utilities.eval import eval_solver from Src.Utilities.eval import eval_solver
import urllib.parse import urllib.parse
from Src.API.extractors.maxstream import maxstream
from Src.API.extractors.uprot import bypass_uprot
OST_DOMAIN = config.OST_DOMAIN OST_DOMAIN = config.OST_DOMAIN
OST_PROXY = config.OST_PROXY OST_PROXY = config.OST_PROXY
env_vars = load_env() env_vars = load_env()
proxies = {} proxies = {}
random_headers = Headers()
import logging
from Src.Utilities.config import setup_logging
level = config.LEVEL
logger = setup_logging(level)
if OST_PROXY == "1": if OST_PROXY == "1":
PROXY_CREDENTIALS = env_vars.get('PROXY_CREDENTIALS') PROXY_CREDENTIALS = env_vars.get('PROXY_CREDENTIALS')
proxy_list = json.loads(PROXY_CREDENTIALS) proxy_list = json.loads(PROXY_CREDENTIALS)
@@ -27,25 +35,12 @@ if OST_ForwardProxy == "1":
ForwardProxy = env_vars.get('ForwardProxy') ForwardProxy = env_vars.get('ForwardProxy')
else: else:
ForwardProxy = "" ForwardProxy = ""
headers = { Name = config.Name
'User-Agent': 'Mozilla/5.0 (Linux; Android 12) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.5060.71 Mobile Safari/537.36', Icon = config.Icon
'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): async def search(showname,date,client,ismovie,episode,season):
headers = random_headers.generate()
headers['Referer'] = f'{OST_DOMAIN}/'
cookies = { cookies = {
'player_opt': 'fx', 'player_opt': 'fx',
} }
@@ -57,64 +52,69 @@ async def search(showname,date,client,ismovie,episode,season):
'origin_id': '50141', 'origin_id': '50141',
'searchwp_live_search_client_nonce': 'undefined', 'searchwp_live_search_client_nonce': 'undefined',
} }
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) 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)
if response.status_code != 200: if response.status_code != 200:
print("IP Blocked by OnlineserieTV",response) logger.info("IP Blocked by OnlineserieTV",response)
soup = BeautifulSoup(response.text, 'lxml', parse_only=SoupStrainer('a')) soup = BeautifulSoup(response.text, 'lxml', parse_only=SoupStrainer('a'))
a_tags_with_href = soup.find_all("a", href=True) a_tags_with_href = soup.find_all("a", href=True)
for a_tag in a_tags_with_href: for a_tag in a_tags_with_href:
href = a_tag.get("href") href = a_tag.get("href")
if ismovie == 1: if ismovie == 1:
if "film" in href: if "film" in href:
response = await client.get(ForwardProxy + href, headers=headers, impersonate = "chrome124", proxies = proxies) response = await client.get(ForwardProxy + href, headers=headers, impersonate = "chrome", proxies = proxies)
if response.status_code != 200: if response.status_code != 200:
print("IP Blocked by OnlineserieTV",response) logger.info("IP Blocked by OnlineserieTV",response)
year_match = re.search(r'Anno: <i>(\d{4})</i>', response.text) year_match = re.search(r'Anno: <i>(\d{4})</i>', response.text)
year = year_match.group(1) if year_match else None year = year_match.group(1) if year_match else None
if year == date: if year == date:
pattern = r'https://uprot\.net/fxf/[^\s"<>]+' pattern = r'https://uprot\.net/msf/[^\s"<>]+'
match = re.search(pattern, response.text) match = re.search(pattern, response.text)
if match: if match:
name = a_tag.text.replace("\t","").replace("\n","") name = a_tag.text.replace("\t","").replace("\n","")
flexy_link = match.group() maxstream_link = match.group()
return flexy_link,name return maxstream_link,name
else: else:
print("No flexy link found.") logger.info("No Maxstream link found.")
else: else:
continue continue
elif ismovie == 0: elif ismovie == 0:
if "serietv" in href: if "serietv" in href:
response = await client.get(ForwardProxy + href, headers=headers, impersonate = "chrome124", proxies = proxies) response = await client.get(ForwardProxy + href, headers=headers, impersonate = "chrome", proxies = proxies)
if response.status_code != 200: if response.status_code != 200:
print("IP Blocked by OnlineserieTV",response) logger.info("IP Blocked by OnlineserieTV",response)
year_match = re.search(r'Anno: <i>(\d{4})</i>', response.text) year_match = re.search(r'Anno: <i>(\d{4})</i>', response.text)
year = year_match.group(1) if year_match else None year = year_match.group(1) if year_match else None
if year == date: if year == date:
season = season.zfill(2) season = season.zfill(2)
episode = episode.zfill(2) episode = episode.zfill(2)
if season == "0000000000000": pattern = rf'{season}x{episode}.*?<a href=[\'"](https://uprot\.net/msf/[^\'"]+)'
print(True,season,episode) match = re.search(pattern, response.text, re.DOTALL)
#pattern = rf'{season}x{episode}.*?<a href=[\'"](https://uprot\.net/fxf/[^\'"]+)|0{episode}.*?<a href=[\'"](https://uprot\.net/fxf/[^\'"]+)' if not match:
pattern = rf'0{episode}.*?<a href=[\'"](https://uprot\.net/fxf/[^\'"]+)' pattern = rf'0{episode}.*?<a href=[\'"](https://uprot\.net/msf/[^\'"]+)'
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) match = re.search(pattern, response.text, re.DOTALL)
if match: if match:
name = a_tag.text.replace("\t","").replace("\n","") name = a_tag.text.replace("\t","").replace("\n","")
flexy_link = match.group(1) maxstream_link = match.group(1)
print(match,flexy_link) return maxstream_link,name
return flexy_link,name
else: else:
print("No flexy link found.") logger.info("No maxstream link found.")
else: else:
continue 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: try:
general = await is_movie(id) general = await is_movie(id)
ismovie = general[0] ismovie = general[0]
@@ -131,22 +131,21 @@ async def onlineserietv(id,client):
else: else:
showname,date = get_info_tmdb(clean_id,ismovie,type) showname,date = get_info_tmdb(clean_id,ismovie,type)
showname = showname.replace("'"," ") showname = showname.replace("'"," ")
flexy_link,name = await search(showname,date,client,ismovie,episode,season) uprot_link,name = await search(showname,date,client,ismovie,episode,season)
flexy_link = flexy_link.replace("fxf","fxe") if uprot_link != None:
real_url = await client.head(ForwardProxy + flexy_link, headers=headers, impersonate = "chrome124", proxies = proxies) streams = await get_maxstream(uprot_link,streams,'',client)
real_url = real_url.url return streams
final_url = await eval_solver(real_url,proxies, ForwardProxy, client)
return final_url,name
except Exception as e: except Exception as e:
print("MammaMia: Onlineserietv Failed",e) logger.info("MammaMia: Onlineserietv Failed")
return None,None logger.info(e)
return streams
async def test_animeworld(): async def test_animeworld():
from curl_cffi.requests import AsyncSession from curl_cffi.requests import AsyncSession
async with AsyncSession() as client: async with AsyncSession() as client:
test_id = "tt0206516:2:1" # This is an example ID format test_id = "tt16426418" # This is an example ID format
results = await onlineserietv(test_id, client) results = await onlineserietv({'streams': []},test_id, client)
print(results) print(results)
if __name__ == "__main__": if __name__ == "__main__":
+4 -2
View File
@@ -14,6 +14,7 @@ import logging
from Src.Utilities.config import setup_logging from Src.Utilities.config import setup_logging
level = config.LEVEL level = config.LEVEL
import re import re
import json
import random import random
logger = setup_logging(level) logger = setup_logging(level)
@@ -71,6 +72,7 @@ async def search(showname,date,season,episode,MFP,MFP_CREDENTIALS,ismovie,client
else: else:
streams = await voe(url,streams,'ToonItalia',MFP,MFP_CREDENTIALS,proxies,ForwardProxy,client) streams = await voe(url,streams,'ToonItalia',MFP,MFP_CREDENTIALS,proxies,ForwardProxy,client)
return streams return streams
return streams
@@ -104,7 +106,7 @@ async def toonitalia(streams,id,client,MFP,MFP_CREDENTIALS):
streams = await search(showname,date, season,episode,MFP,MFP_CREDENTIALS,ismovie,client,streams) streams = await search(showname,date, season,episode,MFP,MFP_CREDENTIALS,ismovie,client,streams)
return streams return streams
except Exception as e: except Exception as e:
print(e) logger.warning(f'Toonitalia Error: {e}')
return streams return streams
@@ -112,7 +114,7 @@ async def toonitalia(streams,id,client,MFP,MFP_CREDENTIALS):
async def test_toonitalia(): async def test_toonitalia():
from curl_cffi.requests import AsyncSession from curl_cffi.requests import AsyncSession
async with AsyncSession() as client: 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) print(results)
+65
View File
@@ -0,0 +1,65 @@
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())
+8 -2
View File
@@ -5,7 +5,6 @@ import logging
with open('config.json') as f: with open('config.json') as f:
# Load JSON data from file # Load JSON data from file
config = json.load(f) config = json.load(f)
# Accessing SC_DOMAIN # Accessing SC_DOMAIN
SITE = config["Siti"] SITE = config["Siti"]
SC_DOMAIN = SITE["StreamingCommunity"]['url'] SC_DOMAIN = SITE["StreamingCommunity"]['url']
@@ -18,6 +17,8 @@ GF_DOMAIN = SITE['Guardaflix']['url']
GO_DOMAIN = SITE['Guardoserie']['url'] GO_DOMAIN = SITE['Guardoserie']['url']
RT_DOMAIN = SITE['Realtime']['url'] RT_DOMAIN = SITE['Realtime']['url']
TI_DOMAIN = SITE['Toonitalia']['url'] TI_DOMAIN = SITE['Toonitalia']['url']
OST_DOMAIN = SITE['OnlineSerieTV']['url']
VD_DOMAIN = SITE['Vidxgo']['url']
SC = SITE['StreamingCommunity']['enabled'] SC = SITE['StreamingCommunity']['enabled']
AW = SITE['AnimeWorld']['enabled'] AW = SITE['AnimeWorld']['enabled']
CB = SITE['CB01']['enabled'] CB = SITE['CB01']['enabled']
@@ -28,6 +29,8 @@ GF = SITE['Guardaflix']['enabled']
GO = SITE['Guardoserie']['enabled'] GO = SITE['Guardoserie']['enabled']
RT = SITE['Realtime']['enabled'] RT = SITE['Realtime']['enabled']
TI = SITE['Toonitalia']['enabled'] TI = SITE['Toonitalia']['enabled']
OST = SITE['OnlineSerieTV']['enabled']
VD = SITE['Vidxgo']['enabled']
SC_ForwardProxy = SITE['StreamingCommunity']["SC_ForwardProxy"] SC_ForwardProxy = SITE['StreamingCommunity']["SC_ForwardProxy"]
GS_ForwardProxy = SITE['Guardaserie']["GS_ForwardProxy"] GS_ForwardProxy = SITE['Guardaserie']["GS_ForwardProxy"]
GH_ForwardProxy = SITE['GuardaHD']["GH_ForwardProxy"] GH_ForwardProxy = SITE['GuardaHD']["GH_ForwardProxy"]
@@ -39,8 +42,9 @@ ES_ForwardProxy = SITE['Eurostreaming']['ES_ForwardProxy']
GF_ForwardProxy = SITE['Guardaflix']['GF_ForwardProxy'] GF_ForwardProxy = SITE['Guardaflix']['GF_ForwardProxy']
GO_ForwardProxy = SITE['Guardoserie']['GO_ForwardProxy'] GO_ForwardProxy = SITE['Guardoserie']['GO_ForwardProxy']
RT_ForwardProxy = SITE['Realtime']['RT_ForwardProxy'] RT_ForwardProxy = SITE['Realtime']['RT_ForwardProxy']
OST_ForwardProxy = SITE['OnlineSerieTV']['OST_ForwardProxy']
TI_ForwardProxy = SITE['Toonitalia']['TI_ForwardProxy'] TI_ForwardProxy = SITE['Toonitalia']['TI_ForwardProxy']
VD_ForwardProxy = SITE['Vidxgo']['VD_ForwardProxy']
GS_PROXY = SITE['Guardaserie']["GS_PROXY"] GS_PROXY = SITE['Guardaserie']["GS_PROXY"]
GH_PROXY = SITE['GuardaHD']["GH_PROXY"] GH_PROXY = SITE['GuardaHD']["GH_PROXY"]
CB_PROXY = SITE['CB01']["CB_PROXY"] CB_PROXY = SITE['CB01']["CB_PROXY"]
@@ -53,6 +57,8 @@ GF_PROXY = SITE['Guardaflix']['GF_PROXY']
GO_PROXY = SITE['Guardoserie']['GO_PROXY'] GO_PROXY = SITE['Guardoserie']['GO_PROXY']
RT_PROXY = SITE['Realtime']['RT_PROXY'] RT_PROXY = SITE['Realtime']['RT_PROXY']
TI_PROXY = SITE['Toonitalia']['TI_PROXY'] TI_PROXY = SITE['Toonitalia']['TI_PROXY']
OST_PROXY = SITE['OnlineSerieTV']['OST_PROXY']
VD_PROXY = SITE['Vidxgo']['VD_PROXY']
#Captcha #Captcha
CAPTCHA = config['Captcha'] CAPTCHA = config['Captcha']
UT_ForwardProxy = CAPTCHA['Uprot']['UT_ForwardProxy'] UT_ForwardProxy = CAPTCHA['Uprot']['UT_ForwardProxy']
+3 -1
View File
@@ -458,5 +458,7 @@ provider_map = {
"GO": "GUARDOSERIE", "GO": "GUARDOSERIE",
"RT": "REALTIME", "RT": "REALTIME",
"TI": "TOONITALIA", "TI": "TOONITALIA",
"GF": "GUARDAFLIX" "GF": "GUARDAFLIX",
"OST": "ONLINESERIETV",
"VD": "VIDXGO"
} }
+6 -7
View File
@@ -141,23 +141,22 @@ class UnpackingError(Exception):
random_headers = Headers() random_headers = Headers()
async def eval_solver(stream_link,proxies, ForwardProxy, client): async def eval_solver(stream_link,proxies, ForwardProxy, client,pattern):
try: try:
headers = random_headers.generate() 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["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' 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") 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) logger.debug("Eval:",response.status_code)
soup = BeautifulSoup(response.text, "lxml",parse_only=SoupStrainer("script")) else:
text = stream_link
soup = BeautifulSoup(text, "lxml",parse_only=SoupStrainer("script"))
script_all = soup.find_all("script") script_all = soup.find_all("script")
for i in script_all: for i in script_all:
if detect(i.text): if detect(i.text):
unpacked_code = unpack(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) match = re.search(pattern, unpacked_code)
if match: if match:
m3u8_url = match.group(1) m3u8_url = match.group(1)
+104
View File
@@ -0,0 +1,104 @@
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())
+9 -2
View File
@@ -6,10 +6,17 @@ import urllib.parse
level = config.LEVEL level = config.LEVEL
logger = setup_logging(level) logger = setup_logging(level)
async def transform_mfp(mfp_stream_url,client): async def transform_mfp(mfp_stream_url,MFP_url,MFP_password,client):
try: try:
response = await client.get(mfp_stream_url) response = await client.get(mfp_stream_url)
data = response.json() 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']: for i in data['request_headers']:
url += f"&h_{i}={urllib.parse.quote(data['request_headers'][i])}" url += f"&h_{i}={urllib.parse.quote(data['request_headers'][i])}"
@@ -23,5 +30,5 @@ async def build_mfp(MFP_CREDENTIALS,url,host,client):
MFP_password = MFP_CREDENTIALS[1] MFP_password = MFP_CREDENTIALS[1]
url_mfp = f'{MFP_url}/extractor/video?api_password={MFP_password}&d={url}&host={host}&redirect_stream=false' url_mfp = f'{MFP_url}/extractor/video?api_password={MFP_password}&d={url}&host={host}&redirect_stream=false'
#To build pieces together #To build pieces together
url_mfp = await transform_mfp(url_mfp,client) url_mfp = await transform_mfp(url_mfp,MFP_url,MFP_password,client)
return url_mfp return url_mfp
+66
View File
@@ -0,0 +1,66 @@
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())
+19 -7
View File
@@ -9,7 +9,7 @@
"enabled": "1" "enabled": "1"
}, },
"CB01": { "CB01": {
"url": "https://cb01.uno", "url": "https://cb01uno.click",
"CB_PROXY": "0", "CB_PROXY": "0",
"CB_ForwardProxy": "0", "CB_ForwardProxy": "0",
"MX_ForwardProxy": "0", "MX_ForwardProxy": "0",
@@ -17,7 +17,7 @@
"enabled": "1" "enabled": "1"
}, },
"Guardaserie": { "Guardaserie": {
"url": "https://guardaserietv.asia", "url": "https://guarda-serie.click",
"enabled": "1", "enabled": "1",
"GS_ForwardProxy": "0", "GS_ForwardProxy": "0",
"GS_PROXY": "0" "GS_PROXY": "0"
@@ -29,19 +29,19 @@
"GH_PROXY": "0" "GH_PROXY": "0"
}, },
"Eurostreaming": { "Eurostreaming": {
"url": "https://eurostreamings.life", "url": "https://eurostream.ing",
"enabled": "1", "enabled": "1",
"ES_ForwardProxy": "0", "ES_ForwardProxy": "0",
"ES_PROXY": "0" "ES_PROXY": "0"
}, },
"Guardaflix": { "Guardaflix": {
"url": "https://guardaplay.blog", "url": "https://guardaplay.live",
"enabled": "1", "enabled": "1",
"GF_ForwardProxy": "0", "GF_ForwardProxy": "0",
"GF_PROXY": "0" "GF_PROXY": "0"
}, },
"Guardoserie": { "Guardoserie": {
"url": "https://guardoserie.blog", "url": "https://guardoserie.run",
"enabled": "1", "enabled": "1",
"GO_ForwardProxy": "0", "GO_ForwardProxy": "0",
"GO_PROXY": "0" "GO_PROXY": "0"
@@ -63,6 +63,18 @@
"enabled": "1", "enabled": "1",
"TI_ForwardProxy": "0", "TI_ForwardProxy": "0",
"TI_PROXY": "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": { "Captcha": {
@@ -72,11 +84,11 @@
} }
}, },
"General": { "General": {
"load_env": "1", "load_env": "0",
"HOST": "0.0.0.0", "HOST": "0.0.0.0",
"PORT": 8080, "PORT": 8080,
"Name": "MammaMia", "Name": "MammaMia",
"Icon": "🍕", "Icon": "\ud83c\udf55",
"level": "info", "level": "info",
"Global_Proxy": "0" "Global_Proxy": "0"
} }
+1
View File
@@ -12,3 +12,4 @@ fake-headers
pycryptodome pycryptodome
rich rich
python-multipart python-multipart
jinja2
+47 -6
View File
@@ -14,11 +14,14 @@ from Src.API.animeworld import animeworld
from Src.API.guardaflix import guardaflix from Src.API.guardaflix import guardaflix
from Src.API.guardoserie import guardoserie from Src.API.guardoserie import guardoserie
from Src.API.eurostreaming import eurostreaming 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.toonitalia import toonitalia
from Src.API.realtime import search_catalog as realtime 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 meta_catalog as meta_catalog_realtime
from Src.API.realtime import realtime as streams_realtime from Src.API.realtime import realtime as streams_realtime
from Src.Utilities.dictionaries import STREAM,extra_sources,provider_map 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.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 from Src.API.extractors.uprot import get_uprot_numbers,generate_uprot_txt
import logging import logging
@@ -31,6 +34,7 @@ level = config.LEVEL
logger = setup_logging(level) logger = setup_logging(level)
from Src.Utilities.loadenv import load_env from Src.Utilities.loadenv import load_env
env_vars = load_env() env_vars = load_env()
from Src.Utilities.manifest import router as clone
#Configure Env Vars #Configure Env Vars
Global_Proxy = config.Global_Proxy Global_Proxy = config.Global_Proxy
@@ -55,14 +59,16 @@ GF = config.GF
GO = config.GO GO = config.GO
RT = config.RT RT = config.RT
TI = config.TI TI = config.TI
OST = config.OST
VD = config.VD
HOST = config.HOST HOST = config.HOST
PORT = int(config.PORT) PORT = int(config.PORT)
if env_vars.get('PORT_ENV'): if env_vars.get('PORT_ENV'):
PORT = int(env_vars.get('PORT_ENV')) PORT = int(env_vars.get('PORT_ENV'))
Icon = config.Icon Icon = config.Icon
Name = config.Name Name = config.Name
#Cool code to set the hugging face if the service is hosted there.
app = FastAPI() app = FastAPI()
app.include_router(clone)
limiter = Limiter(key_func=get_remote_address) limiter = Limiter(key_func=get_remote_address)
app.state.limiter = limiter app.state.limiter = limiter
app.add_middleware(SlowAPIMiddleware) app.add_middleware(SlowAPIMiddleware)
@@ -272,6 +278,10 @@ async def addon_stream(request: Request,config, type, id,):
else: else:
MFP = "0" MFP = "0"
MFP_CREDENTIALS = ['',''] 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: async with AsyncSession(proxies = proxies) as client:
if type == "tv": if type == "tv":
for channel in STREAM["channels"]: for channel in STREAM["channels"]:
@@ -303,12 +313,13 @@ async def addon_stream(request: Request,config, type, id,):
else: else:
SC_MFP = '0' SC_MFP = '0'
streams = await streaming_community(streams,id,client,SC_MFP,MFP_CREDENTIALS) streams = await streaming_community(streams,id,client,SC_MFP,MFP_CREDENTIALS)
if provider_maps['CB01'] == "1" and CB == "1": if provider_maps['CB01'] == "1" and CB == "1":
streams = await cb01(streams,id,MFP,MFP_CREDENTIALS,client) streams = await cb01(streams,id,MFP,MFP_CREDENTIALS,client)
if provider_maps['GUARDASERIE'] == "1" and GS == "1": if provider_maps['GUARDASERIE'] == "1" and GS == "1":
streams = await guardaserie(streams,id,client) streams = await guardaserie(streams,id,client)
if provider_maps['GUARDAHD'] == "1" and GHD == "1": if provider_maps['GUARDAHD'] == "1" and GHD == "1":
streams = await guardahd(streams,id,client) streams = await guardahd(streams,id,client,MFP,MFP_CREDENTIALS)
if provider_maps['EUROSTREAMING'] == "1" and ES == "1": if provider_maps['EUROSTREAMING'] == "1" and ES == "1":
streams = await eurostreaming(streams,id,client,MFP,MFP_CREDENTIALS) streams = await eurostreaming(streams,id,client,MFP,MFP_CREDENTIALS)
if provider_maps['GUARDAFLIX'] == "1" and GF == "1": if provider_maps['GUARDAFLIX'] == "1" and GF == "1":
@@ -319,6 +330,11 @@ async def addon_stream(request: Request,config, type, id,):
streams = await streams_realtime(streams,id,client) streams = await streams_realtime(streams,id,client)
if provider_maps['TOONITALIA'] == '1' and TI == '1': if provider_maps['TOONITALIA'] == '1' and TI == '1':
streams = await toonitalia(streams,id,client,MFP,MFP_CREDENTIALS) 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) return respond_with(streams)
if not streams['streams']: if not streams['streams']:
raise HTTPException(status_code=404) raise HTTPException(status_code=404)
@@ -329,8 +345,14 @@ async def addon_stream(request: Request,config, type, id,):
async def uprot(request: Request): async def uprot(request: Request):
async with AsyncSession(proxies = proxies) as client: async with AsyncSession(proxies = proxies) as client:
image, cookies = await get_uprot_numbers(client) image, cookies = await get_uprot_numbers(client)
response = static.TemplateResponse('uprot.html',{'request':request,"image_url": image}) context = {
response.set_cookie(key='PHPSESSID', value=cookies['PHPSESSID'],httponly=True) '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)
return response return response
@app.post("/uprot") @app.post("/uprot")
@@ -341,9 +363,28 @@ async def execute_uprot(request: Request,user_input = Form(...),PHPSESSID: str =
} }
status = await generate_uprot_txt(user_input,cookies,client) status = await generate_uprot_txt(user_input,cookies,client)
if status == True: if status == True:
response = static.TemplateResponse('uprot.html',{'request':request,"image_url": 'https://tinyurl.com/doneokdone'}) context = {
'request': request,
'image_url': 'https://tinyurl.com/doneokdone'
}
return static.TemplateResponse(name='uprot.html',context=context,request=request)
elif status == False: elif status == False:
return static.TemplateResponse('uprot.html',{'request':request,"image_url": 'https://tinyurl.com/tryagaindumb'}) 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"})
if __name__ == '__main__': if __name__ == '__main__':
import uvicorn import uvicorn
+14 -2
View File
@@ -180,7 +180,7 @@ CONFIGURE = """
<img src="https://creazilla-store.fra1.digitaloceanspaces.com/emojis/49647/pizza-emoji-clipart-md.png" alt="Logo"> <img src="https://creazilla-store.fra1.digitaloceanspaces.com/emojis/49647/pizza-emoji-clipart-md.png" alt="Logo">
</div> </div>
<h1 class="name">Mamma Mia</h1> <h1 class="name">Mamma Mia</h1>
<h2 class="version">v2.1.0</h2> <h2 class="version">v2.2.0</h2>
<div id="additionalText"> <div id="additionalText">
<h2>This addon provides Movie, Series, Anime, and Live TV HTTPS Streams.<br> https://github.com/UrloMythus/MammaMia/</h2> <h2>This addon provides Movie, Series, Anime, and Live TV HTTPS Streams.<br> https://github.com/UrloMythus/MammaMia/</h2>
</div> </div>
@@ -219,6 +219,16 @@ CONFIGURE = """
<input type="checkbox" id="cb01"> CB01 🕵️‍♂️ <input type="checkbox" id="cb01"> CB01 🕵️‍♂️
</label> </label>
</div> </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"> <div class="provider-group">
<label for="streamingcommunity" class="provider-label"> <label for="streamingcommunity" class="provider-label">
<input type="checkbox" id="streamingcommunity"> StreamingCommunity 🕵️‍♂️ <input type="checkbox" id="streamingcommunity"> StreamingCommunity 🕵️‍♂️
@@ -232,7 +242,7 @@ CONFIGURE = """
</div> </div>
<div class="provider-group"> <div class="provider-group">
<label for="realtime" class="provider-label"> <label for="realtime" class="provider-label">
<input type="checkbox" id="toonitalia"> Toonitalia <input type="checkbox" id="toonitalia"> Toonitalia 🕵️‍♂️
</label> </label>
</div> </div>
<div class="provider-group"> <div class="provider-group">
@@ -287,6 +297,8 @@ CONFIGURE = """
"eurostreaming": "ES", "eurostreaming": "ES",
"realtime": "RT", "realtime": "RT",
"toonitalia": "TI", "toonitalia": "TI",
"onlineserietv": "OST",
"vidxgo": "VD",
"streamingcommunity_mfp": "SC_MFP", "streamingcommunity_mfp": "SC_MFP",
"mediaflowproxy": "MFP" "mediaflowproxy": "MFP"
}; };
+14 -2
View File
@@ -180,7 +180,7 @@ HTML = """
<img src="https://creazilla-store.fra1.digitaloceanspaces.com/emojis/49647/pizza-emoji-clipart-md.png" alt="Logo"> <img src="https://creazilla-store.fra1.digitaloceanspaces.com/emojis/49647/pizza-emoji-clipart-md.png" alt="Logo">
</div> </div>
<h1 class="name">Mamma Mia</h1> <h1 class="name">Mamma Mia</h1>
<h2 class="version">v2.1.0</h2> <h2 class="version">v2.2.0</h2>
<div id="additionalText"> <div id="additionalText">
<h2>This addon provides Movie, Series, Anime, and Live TV HTTPS Streams.<br> https://github.com/UrloMythus/MammaMia/</h2> <h2>This addon provides Movie, Series, Anime, and Live TV HTTPS Streams.<br> https://github.com/UrloMythus/MammaMia/</h2>
</div> </div>
@@ -219,6 +219,16 @@ HTML = """
<input type="checkbox" id="cb01"> CB01 🕵️‍♂️ <input type="checkbox" id="cb01"> CB01 🕵️‍♂️
</label> </label>
</div> </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"> <div class="provider-group">
<label for="streamingcommunity" class="provider-label"> <label for="streamingcommunity" class="provider-label">
<input type="checkbox" id="streamingcommunity"> StreamingCommunity 🕵️‍♂️ <input type="checkbox" id="streamingcommunity"> StreamingCommunity 🕵️‍♂️
@@ -232,7 +242,7 @@ HTML = """
</div> </div>
<div class="provider-group"> <div class="provider-group">
<label for="realtime" class="provider-label"> <label for="realtime" class="provider-label">
<input type="checkbox" id="toonitalia"> Toonitalia <input type="checkbox" id="toonitalia"> Toonitalia 🕵️‍♂️
</label> </label>
</div> </div>
<div class="provider-group"> <div class="provider-group">
@@ -287,6 +297,8 @@ HTML = """
"eurostreaming": "ES", "eurostreaming": "ES",
"realtime": "RT", "realtime": "RT",
"toonitalia": "TI", "toonitalia": "TI",
"onlineserietv": "OST",
"vidxgo": "VD",
"streamingcommunity_mfp": "SC_MFP", "streamingcommunity_mfp": "SC_MFP",
"mediaflowproxy": "MFP" "mediaflowproxy": "MFP"
}; };
+1 -1
View File
@@ -116,7 +116,7 @@
<div id="additionalText"> <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> <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"> <div class="captchaimg">
<img src="{{ image_url }}" alt="captcha1"> <img src="{{ image_url }}" alt="Failed to get the captcha">
</div> </div>
<form id = 'form' action="/uprot" method="post"> <form id = 'form' action="/uprot" method="post">
<input type="text" name="user_input" required> <input type="text" name="user_input" required>