Whatever
This commit is contained in:
@@ -151,7 +151,7 @@ async def animeworld(id,client):
|
|||||||
async def test_animeworld():
|
async def test_animeworld():
|
||||||
async with AsyncSession() as client:
|
async with AsyncSession() as client:
|
||||||
# Replace with actual id, for example 'anime_id:episode' format
|
# Replace with actual id, for example 'anime_id:episode' format
|
||||||
test_id = "kitsu:508:2" # This is an example ID format
|
test_id = "kitsu:46474:1" # This is an example ID format
|
||||||
results = await animeworld(test_id, client)
|
results = await animeworld(test_id, client)
|
||||||
print(results)
|
print(results)
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
{}
|
||||||
+3
-3
@@ -3,6 +3,7 @@ from Src.Utilities.info import get_info_tmdb,is_movie
|
|||||||
from Src.Utilities.convert import get_TMDb_id_from_IMDb_id
|
from Src.Utilities.convert import get_TMDb_id_from_IMDb_id
|
||||||
from Src.Utilities.loadenv import load_env
|
from Src.Utilities.loadenv import load_env
|
||||||
env_vars = load_env()
|
env_vars = load_env()
|
||||||
|
ForwardProxy = env_vars.get('ALTERNATIVE_LINK')
|
||||||
MYSTERIUS_KEY = env_vars.get('MYSTERIUS_KEY')
|
MYSTERIUS_KEY = env_vars.get('MYSTERIUS_KEY')
|
||||||
|
|
||||||
async def get_links(slug,season,episode,ismovie,client):
|
async def get_links(slug,season,episode,ismovie,client):
|
||||||
@@ -16,7 +17,7 @@ async def get_links(slug,season,episode,ismovie,client):
|
|||||||
ap_session = Auths.get('auth')
|
ap_session = Auths.get('auth')
|
||||||
|
|
||||||
cookies = {'ap_session': ap_session}
|
cookies = {'ap_session': ap_session}
|
||||||
|
print(cookies)
|
||||||
headers = {
|
headers = {
|
||||||
'accept': 'application/json, text/plain, */*',
|
'accept': 'application/json, text/plain, */*',
|
||||||
'accept-language': 'it-IT,it;q=0.9,en-US;q=0.8,en;q=0.7',
|
'accept-language': 'it-IT,it;q=0.9,en-US;q=0.8,en;q=0.7',
|
||||||
@@ -140,7 +141,7 @@ async def cool(imdb,client):
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
print("Cool Error",e)
|
print("Cool Error",e)
|
||||||
return None
|
return None
|
||||||
'''
|
|
||||||
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:
|
||||||
@@ -151,4 +152,3 @@ async def test_animeworld():
|
|||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
import asyncio
|
import asyncio
|
||||||
asyncio.run(test_animeworld())
|
asyncio.run(test_animeworld())
|
||||||
'''
|
|
||||||
@@ -4,7 +4,7 @@ from bs4 import BeautifulSoup, SoupStrainer
|
|||||||
from Src.Utilities.info import get_info_imdb, is_movie, get_info_tmdb
|
from Src.Utilities.info import get_info_imdb, is_movie, get_info_tmdb
|
||||||
import urllib.parse
|
import urllib.parse
|
||||||
import Src.Utilities.config as config
|
import Src.Utilities.config as config
|
||||||
import urllib.parse
|
|
||||||
DDL_DOMAIN = config.DDL_DOMAIN
|
DDL_DOMAIN = config.DDL_DOMAIN
|
||||||
ips4_device_key = config.ips4_device_key
|
ips4_device_key = config.ips4_device_key
|
||||||
ips4_login_key = config.ips4_login_key
|
ips4_login_key = config.ips4_login_key
|
||||||
@@ -14,12 +14,12 @@ cookies = {
|
|||||||
'ips4_device_key': ips4_device_key,
|
'ips4_device_key': ips4_device_key,
|
||||||
'ips4_IPSSessionFront': ips4_IPSSessionFront,
|
'ips4_IPSSessionFront': ips4_IPSSessionFront,
|
||||||
'ips4_member_id': ips4_member_id,
|
'ips4_member_id': ips4_member_id,
|
||||||
'ips4_login_key': ips4_login_key,
|
'ips4_login_key': ips4_login_key
|
||||||
}
|
}
|
||||||
|
|
||||||
async def search_series(client,id,season,episode,showname):
|
async def search_series(client,id,season,episode,showname):
|
||||||
showname = showname.replace(" ", "%20").replace("–", "+").replace("—","+")
|
showname = showname.replace(" ", "%20").replace("–", "+").replace("—","+")
|
||||||
response = await client.get(f"{DDL_DOMAIN}/search/?&q={showname}%20{season}%20Streaming&type=videobox_video&quick=1&nodes=11,36&search_and_or=and&search_in=titles&sortby=relevancy")
|
response = await client.get(f"{DDL_DOMAIN}/search/?&q={showname}%20{season}%20Streaming&type=videobox_video&quick=1&nodes=11,36&search_and_or=and&search_in=titles&sortby=relevancy", cookies = cookies)
|
||||||
soup = BeautifulSoup(response.text, 'lxml',parse_only=SoupStrainer('a'))
|
soup = BeautifulSoup(response.text, 'lxml',parse_only=SoupStrainer('a'))
|
||||||
a_tags = soup.find_all('a', {'data-linktype': 'link'})
|
a_tags = soup.find_all('a', {'data-linktype': 'link'})
|
||||||
for a in a_tags:
|
for a in a_tags:
|
||||||
@@ -55,7 +55,6 @@ async def get_episode(client,link,episode):
|
|||||||
'Sec-Fetch-Site': 'same-origin',
|
'Sec-Fetch-Site': 'same-origin',
|
||||||
'Sec-Fetch-User': '?1',
|
'Sec-Fetch-User': '?1',
|
||||||
'Connection': 'keep-alive',
|
'Connection': 'keep-alive',
|
||||||
# 'Cookie': 'ips4_device_key=b6f084be79c28bb53ecfc556fd7a2a70; ips4_IPSSessionFront=f2b9db91793e084cf2003a07c563e6aa; ips4_ipsTimezone=Europe/Rome; ips4_hasJS=true; ips4_noCache=1; ips4_announcement_3=true; ips4_member_id=4029711; ips4_login_key=41b6a70b16cce2fd39482f5b21a9c35f; ips4_loggedIn=1725985598',
|
|
||||||
'Priority': 'u=1',
|
'Priority': 'u=1',
|
||||||
'Pragma': 'no-cache',
|
'Pragma': 'no-cache',
|
||||||
'Cache-Control': 'no-cache',
|
'Cache-Control': 'no-cache',
|
||||||
@@ -65,8 +64,7 @@ async def get_episode(client,link,episode):
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
response = await client.get(link, cookies = cookies, headers = headers, params = params, impersonate="chrome120")
|
response = await client.get(link, cookies = cookies, headers = headers, params = params, impersonate="chrome124")
|
||||||
|
|
||||||
pattern = rf'<a\s+href="([^"]+)"[^>]*>\s*Part {episode}\s*</a>'
|
pattern = rf'<a\s+href="([^"]+)"[^>]*>\s*Part {episode}\s*</a>'
|
||||||
match = re.search(pattern, response.text)
|
match = re.search(pattern, response.text)
|
||||||
mp4_link = match.group(1)
|
mp4_link = match.group(1)
|
||||||
@@ -149,7 +147,7 @@ async def ddlstream(imdb,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 = "tt14948432" # This is an example ID format
|
test_id = "tt3148266:3:4" # This is an example ID format
|
||||||
results = await ddlstream(test_id, client)
|
results = await ddlstream(test_id, client)
|
||||||
print(results)
|
print(results)
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,284 @@
|
|||||||
|
from Src.Utilities.info import get_info_tmdb, is_movie, get_info_imdb
|
||||||
|
import Src.Utilities.config as config
|
||||||
|
from fake_headers import Headers
|
||||||
|
from urllib.parse import quote
|
||||||
|
from Src.Utilities.loadenv import load_env
|
||||||
|
import re
|
||||||
|
from bs4 import BeautifulSoup,SoupStrainer
|
||||||
|
env_vars = load_env()
|
||||||
|
from fake_headers import Headers
|
||||||
|
random_headers = Headers()
|
||||||
|
import pytesseract
|
||||||
|
from PIL import Image
|
||||||
|
import base64
|
||||||
|
from io import BytesIO
|
||||||
|
import time
|
||||||
|
from Src.Utilities.eval import eval_solver
|
||||||
|
import os
|
||||||
|
import json
|
||||||
|
|
||||||
|
import random
|
||||||
|
ES_DOMAIN = config.ES_DOMAIN
|
||||||
|
|
||||||
|
ES_PROXY = config.ES_PROXY
|
||||||
|
proxies = {}
|
||||||
|
if ES_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
|
||||||
|
}
|
||||||
|
ES_ForwardProxy = config.ES_ForwardProxy
|
||||||
|
if ES_ForwardProxy == "1":
|
||||||
|
ForwardProxy = env_vars.get('ForwardProxy')
|
||||||
|
else:
|
||||||
|
ForwardProxy = ""
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
'''
|
||||||
|
OK <a href="https://uprot.net/msf/fwbtgsssmt0q" target="_blank" rel="noopener">MaxStream</a> – <a href="https://clicka.cc/delta/6svqpze62r8z" target="_blank" rel="noopener">DeltaBit</a> – <a href="https://clicka.cc/tv/5eumjxxt" target="_blank" rel="noopener">Turbovid</a>
|
||||||
|
pattern = r'href="([^"]+)"'
|
||||||
|
match = re.search(pattern, text)
|
||||||
|
href_value = match.group(1)
|
||||||
|
'''
|
||||||
|
async def mixdrop(url,MFP,client):
|
||||||
|
"""Extract Mixdrop URL."""
|
||||||
|
if "club" in url:
|
||||||
|
url = url.replace("club", "cv").split("/2")[0]
|
||||||
|
if "cfd" in url:
|
||||||
|
url = url.replace("cfd", "cv").replace("emb","e").split("/2")[0]
|
||||||
|
if MFP == "1":
|
||||||
|
return url,""
|
||||||
|
headers = {"accept-language": "en-US,en;q=0.5"}
|
||||||
|
final_url = f"https:{await eval_solver(url, proxies , ForwardProxy, client)}"
|
||||||
|
return final_url,""
|
||||||
|
|
||||||
|
async def deltabit(page_url,client):
|
||||||
|
"""Extract Deltabit URL."""
|
||||||
|
i = 0
|
||||||
|
#Set up some headers
|
||||||
|
headers = random_headers.generate()
|
||||||
|
headers2 = random_headers.generate()
|
||||||
|
|
||||||
|
#Get the redirected link, so the actual deltabit link.
|
||||||
|
page_url_response = await client.get(ForwardProxy + page_url,headers={**headers, 'Range': 'bytes=0-0'}, proxies=proxies)
|
||||||
|
page_url = page_url_response.url
|
||||||
|
print("Page_URl is",page_url)
|
||||||
|
|
||||||
|
#Change the referer and user agent of the generated headers
|
||||||
|
headers2['referer'] = 'https://safego.cc/'
|
||||||
|
headers2['user-agent'] = 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36'
|
||||||
|
|
||||||
|
#Request to the deltabit link
|
||||||
|
response = await client.get(ForwardProxy + page_url, headers = headers2, allow_redirects = True, proxies = proxies)
|
||||||
|
page_url = response.url
|
||||||
|
|
||||||
|
#Often deltabit redirects to another deltabit link. We need the redirected link to put it in the headers.
|
||||||
|
headers['origin'] = f'https://{page_url.split('/')[2]}'
|
||||||
|
headers['referer'] = page_url
|
||||||
|
headers['user-agent'] = 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36'
|
||||||
|
|
||||||
|
#We check the page for the data such as hash and fname.
|
||||||
|
soup = BeautifulSoup(response.text, 'lxml', parse_only=SoupStrainer('input'))
|
||||||
|
data = {}
|
||||||
|
for input in soup:
|
||||||
|
name = input.get('name')
|
||||||
|
value = input.get('value')
|
||||||
|
data[name] = value
|
||||||
|
data['imhuman'] = ''
|
||||||
|
data['referer']= page_url
|
||||||
|
|
||||||
|
#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)
|
||||||
|
link = re.findall(r'sources:\s*\["([^"]+)"', response.text, re.DOTALL)
|
||||||
|
print(link)
|
||||||
|
if not link:
|
||||||
|
if not i >= 3:
|
||||||
|
link,fname = await deltabit(page_url,client)
|
||||||
|
i +=1
|
||||||
|
else:
|
||||||
|
link = link[0]
|
||||||
|
|
||||||
|
|
||||||
|
return link,fname
|
||||||
|
|
||||||
|
|
||||||
|
def convert_numbers(base64_data):
|
||||||
|
image_data = base64.b64decode(base64_data)
|
||||||
|
image = Image.open(BytesIO(image_data))
|
||||||
|
custom_config = r'--oem 3 --psm 6 outputbase digits'
|
||||||
|
number_string = pytesseract.image_to_string(image, config=custom_config)
|
||||||
|
return number_string.strip()
|
||||||
|
|
||||||
|
|
||||||
|
async def get_numbers(safego_url,client):
|
||||||
|
headers = random_headers.generate()
|
||||||
|
headers['User-Agent'] = 'Mozilla/5.0 (X11; Linux x86_64; rv:138.0) Gecko/20100101 Firefox/138.0'
|
||||||
|
response = await client.get(ForwardProxy + safego_url,headers = headers, proxies = proxies)
|
||||||
|
cookies = (response.cookies.get_dict())
|
||||||
|
soup = BeautifulSoup(response.text,'lxml',parse_only=SoupStrainer('img'))
|
||||||
|
numbers = soup.img['src'].split(',')[1]
|
||||||
|
return numbers,cookies
|
||||||
|
|
||||||
|
async def real_page(safego_url,client):
|
||||||
|
try:
|
||||||
|
current_directory = os.path.dirname(os.path.abspath(__file__))
|
||||||
|
file_path = os.path.join(current_directory, 'cookie.txt')
|
||||||
|
headers = random_headers.generate()
|
||||||
|
headers['Origin'] = 'https://safego.cc'
|
||||||
|
headers['Referer'] = safego_url
|
||||||
|
headers['User-Agent'] = 'Mozilla/5.0 (X11; Linux x86_64; rv:138.0) Gecko/20100101 Firefox/138.0'
|
||||||
|
with open(file_path, 'r') as file:
|
||||||
|
cookies = file.read()
|
||||||
|
cookies = json.loads(cookies.replace("'", '"'))
|
||||||
|
response = await client.post(ForwardProxy + safego_url,headers=headers, cookies = cookies, proxies = proxies)
|
||||||
|
soup = BeautifulSoup(response.text,'lxml', parse_only=SoupStrainer('a'))
|
||||||
|
if len(soup)>= 1:
|
||||||
|
return soup.a['href']
|
||||||
|
else:
|
||||||
|
print("Getting numbers")
|
||||||
|
numbers,cookies = await get_numbers(safego_url,client)
|
||||||
|
numbers = convert_numbers(numbers)
|
||||||
|
data = {'captch4': numbers}
|
||||||
|
response = await client.post(ForwardProxy + safego_url,headers=headers, data=data, cookies = cookies, proxies = proxies)
|
||||||
|
cap4 = response.headers.get('set-cookie').split(';')[0]
|
||||||
|
cookies[cap4.split('=')[0]] = cap4.split('=')[1]
|
||||||
|
with open(file_path, 'w') as file:
|
||||||
|
file.write(str(cookies))
|
||||||
|
soup = BeautifulSoup(response.text,'lxml', parse_only=SoupStrainer('a'))
|
||||||
|
return soup.a['href']
|
||||||
|
except Exception as e:
|
||||||
|
print(e)
|
||||||
|
async def get_host_link(pattern,atag,client):
|
||||||
|
match = re.search(pattern, atag)
|
||||||
|
headers = random_headers.generate()
|
||||||
|
if match:
|
||||||
|
href_value = match.group(1)
|
||||||
|
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,client):
|
||||||
|
#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" and "DeltaBit" in atag:
|
||||||
|
pattern = r'<a\s+href="([^"]+)"[^>]*rel="noopener"[^>]*>DeltaBit</a>'
|
||||||
|
href = await get_host_link(pattern,atag,client)
|
||||||
|
try:
|
||||||
|
full_url,name = await deltabit(href,client)
|
||||||
|
except Exception as e:
|
||||||
|
pattern = r'<a\s+href="([^"]+)"[^>]*rel="noopener"[^>]*>MixDrop</a>'
|
||||||
|
href = await get_host_link(pattern,atag,client)
|
||||||
|
full_url,name = await mixdrop(href,MFP,client)
|
||||||
|
return full_url,name
|
||||||
|
if "MixDrop" in atag and "DeltaBit" not in atag:
|
||||||
|
pattern = r'<a\s+href="([^"]+)"[^>]*rel="noopener"[^>]*>MixDrop</a>'
|
||||||
|
href = await get_host_link(pattern,atag,client)
|
||||||
|
full_url,name = await mixdrop(href,MFP,client)
|
||||||
|
return full_url,name
|
||||||
|
if 'DeltaBit' in atag and "MixDrop" not in atag:
|
||||||
|
pattern = r'<a\s+href="([^"]+)"[^>]*rel="noopener"[^>]*>DeltaBit</a>'
|
||||||
|
href = await get_host_link(pattern,atag,client)
|
||||||
|
full_url,name = await deltabit(href,client)
|
||||||
|
return full_url,name
|
||||||
|
if 'DeltaBit' not in atag and 'MixDrop' not in atag:
|
||||||
|
print("Just give up")
|
||||||
|
return None,""
|
||||||
|
|
||||||
|
|
||||||
|
async def search(showname,date,season,episode,MFP,client):
|
||||||
|
headers = random_headers.generate()
|
||||||
|
|
||||||
|
response = await client.get(ForwardProxy + f'{ES_DOMAIN}/wp-json/wp/v2/search?search={showname}&_fields=id', proxies = proxies, headers = headers)
|
||||||
|
results = response.json()
|
||||||
|
for i in results:
|
||||||
|
response = await client.get(ForwardProxy + f'{ES_DOMAIN}/wp-json/wp/v2/posts/{i['id']}?_fields=content', proxies = proxies, headers = headers)
|
||||||
|
if f'ID articolo non valido' in response.text:
|
||||||
|
continue
|
||||||
|
description = response.json()
|
||||||
|
description = description['content']['rendered']
|
||||||
|
year_pattern = re.compile(r'(?<!/)(19|20)\d{2}(?!/)')
|
||||||
|
match = year_pattern.search(description)
|
||||||
|
if match:
|
||||||
|
year = match.group(0)
|
||||||
|
|
||||||
|
else:
|
||||||
|
pattern = r'<a\s+href="([^"]+)"[^>]*>Continua a leggere</a>'
|
||||||
|
match = re.search(pattern, description)
|
||||||
|
if match:
|
||||||
|
href_value = match.group(1)
|
||||||
|
response_2 = await client.get(ForwardProxy + href_value, proxies = proxies, headers = headers)
|
||||||
|
match = year_pattern.search(response_2.text)
|
||||||
|
if match:
|
||||||
|
year = match.group(0)
|
||||||
|
if year == str(date):
|
||||||
|
episode = episode.zfill(2)
|
||||||
|
pattern = rf'{season}×{episode}\s*(.*?)(?=<br\s*/?>)'
|
||||||
|
match = re.findall(pattern, description)
|
||||||
|
urls= {}
|
||||||
|
if match:
|
||||||
|
for episode_details in match:
|
||||||
|
if "href" in episode_details:
|
||||||
|
full_url,name = await scraping_links(episode_details.split(' – ', 1)[1],MFP,client)
|
||||||
|
if full_url:
|
||||||
|
urls[full_url] = name
|
||||||
|
return urls
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
async def eurostreaming(id,client,MFP):
|
||||||
|
try:
|
||||||
|
general = await is_movie(id)
|
||||||
|
ismovie = general[0]
|
||||||
|
clean_id = general[1]
|
||||||
|
type = "Eurostreaming"
|
||||||
|
if ismovie == 0 :
|
||||||
|
season = str(general[2])
|
||||||
|
episode = str(general[3])
|
||||||
|
elif ismovie == 1:
|
||||||
|
return None
|
||||||
|
if "tmdb" in id:
|
||||||
|
showname,date = get_info_tmdb(clean_id,ismovie,type)
|
||||||
|
else:
|
||||||
|
showname,date = await get_info_imdb(clean_id,ismovie,type,client)
|
||||||
|
print(showname)
|
||||||
|
showname = quote(showname)
|
||||||
|
urls = await search(showname,date, season,episode,MFP,client)
|
||||||
|
return urls
|
||||||
|
except Exception as e:
|
||||||
|
print(e)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
async def test_euro():
|
||||||
|
from curl_cffi.requests import AsyncSession
|
||||||
|
async with AsyncSession() as client:
|
||||||
|
results = await eurostreaming("tt6156584:4:5",client,0)
|
||||||
|
print(results)
|
||||||
|
|
||||||
|
async def test_deltabit():
|
||||||
|
from curl_cffi.requests import AsyncSession
|
||||||
|
async with AsyncSession() as client:
|
||||||
|
results = await deltabit("https://deltabit.co/fgeki2456ab1",client)
|
||||||
|
print(results)
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
import asyncio
|
||||||
|
asyncio.run(test_euro())
|
||||||
|
#python3 -m Src.API.eurostreaming
|
||||||
|
|
||||||
|
'''tt11950864'''
|
||||||
@@ -12,7 +12,7 @@ async def search(showname,date,season,episode,ismovie,client):
|
|||||||
}
|
}
|
||||||
|
|
||||||
headers = {
|
headers = {
|
||||||
'authority': f'lordchannel.{LC_DOMAIN}',
|
'authority': f'{LC_DOMAIN}',
|
||||||
'accept': '*/*',
|
'accept': '*/*',
|
||||||
'accept-language': 'it-IT,it;q=0.9,en-US;q=0.8,en;q=0.7',
|
'accept-language': 'it-IT,it;q=0.9,en-US;q=0.8,en;q=0.7',
|
||||||
# 'cookie': 'csrftoken=7lvc502CZe8Zbx7iSX1xkZOBA1NbDxJZ',
|
# 'cookie': 'csrftoken=7lvc502CZe8Zbx7iSX1xkZOBA1NbDxJZ',
|
||||||
@@ -31,7 +31,7 @@ async def search(showname,date,season,episode,ismovie,client):
|
|||||||
'media': showname,
|
'media': showname,
|
||||||
'_': '1724421723999',
|
'_': '1724421723999',
|
||||||
}
|
}
|
||||||
response = await client.get(f'{LC_DOMAIN}/live_search/', params=params, cookies=cookies, headers=headers, allow_redirects=True, impersonate = "chrome120")
|
response = await client.get(f'{LC_DOMAIN}/live_search/', params=params, cookies=cookies, headers=headers, allow_redirects=True, impersonate = "chrome124")
|
||||||
data = json.loads(response.text)
|
data = json.loads(response.text)
|
||||||
for entry in data['data']:
|
for entry in data['data']:
|
||||||
if entry is not None: # check if the a_tag exists
|
if entry is not None: # check if the a_tag exists
|
||||||
@@ -98,7 +98,6 @@ async def lordchannel(imdb,client):
|
|||||||
print("MammaMia: Lordchannel Failed",e)
|
print("MammaMia: Lordchannel Failed",e)
|
||||||
return None,None
|
return None,None
|
||||||
|
|
||||||
'''
|
|
||||||
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:
|
||||||
@@ -109,4 +108,3 @@ if __name__ == "__main__":
|
|||||||
import asyncio
|
import asyncio
|
||||||
asyncio.run(test_animeworld())
|
asyncio.run(test_animeworld())
|
||||||
#python3 -m Src.API.lordchannel
|
#python3 -m Src.API.lordchannel
|
||||||
'''
|
|
||||||
@@ -114,7 +114,6 @@ async def search(query,date,ismovie, client,SC_FAST_SEARCH,movie_id):
|
|||||||
print(movie_id)
|
print(movie_id)
|
||||||
#Here we need to convert because the IMDB ID is often bugged
|
#Here we need to convert because the IMDB ID is often bugged
|
||||||
tmdb_id = str(data['props']['title']['tmdb_id'])
|
tmdb_id = str(data['props']['title']['tmdb_id'])
|
||||||
print(tmdb_id)
|
|
||||||
if tmdb_id == movie_id:
|
if tmdb_id == movie_id:
|
||||||
return tid,slug,version
|
return tid,slug,version
|
||||||
elif SC_FAST_SEARCH == "1":
|
elif SC_FAST_SEARCH == "1":
|
||||||
|
|||||||
@@ -288,7 +288,7 @@ 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:
|
||||||
# Replace with actual id, for example 'anime_id:episode' format
|
# Replace with actual id, for example 'anime_id:episode' format
|
||||||
test_id = "tt1839578:1:1" # This is an example ID format
|
test_id = "tt3148266:1:1" # This is an example ID format
|
||||||
results = await tantifilm(test_id, client,"0")
|
results = await tantifilm(test_id, client,"0")
|
||||||
print(results)
|
print(results)
|
||||||
|
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ DLHD_DOMAIN = SITE['DaddyLiveHD']['url']
|
|||||||
GS_DOMAIN = SITE['Guardaserie']['url']
|
GS_DOMAIN = SITE['Guardaserie']['url']
|
||||||
GHD_DOMAIN = SITE['GuardaHD']['url']
|
GHD_DOMAIN = SITE['GuardaHD']['url']
|
||||||
OST_DOMAIN = SITE['Onlineserietv']['domain']
|
OST_DOMAIN = SITE['Onlineserietv']['domain']
|
||||||
|
ES_DOMAIN = SITE['Eurostreaming']['url']
|
||||||
SC = SITE['StreamingCommunity']['enabled']
|
SC = SITE['StreamingCommunity']['enabled']
|
||||||
FT = SITE['Filmpertutti']['enabled']
|
FT = SITE['Filmpertutti']['enabled']
|
||||||
TF = SITE['Tantifilm']['enabled']
|
TF = SITE['Tantifilm']['enabled']
|
||||||
@@ -34,6 +35,7 @@ MYSTERIUS = SITE['Mysterius']['enabled']
|
|||||||
GS = SITE['Guardaserie']['enabled']
|
GS = SITE['Guardaserie']['enabled']
|
||||||
GHD = SITE['GuardaHD']['enabled']
|
GHD = SITE['GuardaHD']['enabled']
|
||||||
OST = SITE['Onlineserietv']['enabled']
|
OST = SITE['Onlineserietv']['enabled']
|
||||||
|
ES= SITE['Eurostreaming']['enabled']
|
||||||
DLHD = SITE['DaddyLiveHD']['enabled']
|
DLHD = SITE['DaddyLiveHD']['enabled']
|
||||||
TF_ForwardProxy = SITE['Tantifilm']["TF_ForwardProxy"]
|
TF_ForwardProxy = SITE['Tantifilm']["TF_ForwardProxy"]
|
||||||
SC_ForwardProxy = SITE['StreamingCommunity']["SC_ForwardProxy"]
|
SC_ForwardProxy = SITE['StreamingCommunity']["SC_ForwardProxy"]
|
||||||
@@ -44,6 +46,7 @@ AW_ForwardProxy = SITE['AnimeWorld']["AW_ForwardProxy"]
|
|||||||
MX_ForwardProxy = SITE['CB01']["MX_ForwardProxy"]
|
MX_ForwardProxy = SITE['CB01']["MX_ForwardProxy"]
|
||||||
CB_ForwardProxy = SITE['CB01']["CB_ForwardProxy"]
|
CB_ForwardProxy = SITE['CB01']["CB_ForwardProxy"]
|
||||||
OST_ForwardProxy = SITE['Onlineserietv']["OST_ForwardProxy"]
|
OST_ForwardProxy = SITE['Onlineserietv']["OST_ForwardProxy"]
|
||||||
|
ES_ForwardProxy = SITE['Eurostreaming']['ES_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"]
|
||||||
TF_PROXY = SITE['Tantifilm']["TF_PROXY"]
|
TF_PROXY = SITE['Tantifilm']["TF_PROXY"]
|
||||||
@@ -53,6 +56,7 @@ VX_PROXY = SITE['StreamingCommunity']["VX_PROXY"]
|
|||||||
AW_PROXY = SITE['AnimeWorld']["AW_PROXY"]
|
AW_PROXY = SITE['AnimeWorld']["AW_PROXY"]
|
||||||
MX_PROXY = SITE['CB01']["MX_PROXY"]
|
MX_PROXY = SITE['CB01']["MX_PROXY"]
|
||||||
OST_PROXY = SITE['Onlineserietv']["OST_PROXY"]
|
OST_PROXY = SITE['Onlineserietv']["OST_PROXY"]
|
||||||
|
ES_PROXY = SITE['Eurostreaming']['ES_PROXY']
|
||||||
ips4_device_key = SITE['DDLStream']['cookies']["ips4_device_key"]
|
ips4_device_key = SITE['DDLStream']['cookies']["ips4_device_key"]
|
||||||
ips4_IPSSessionFront = SITE['DDLStream']['cookies']["ips4_IPSSessionFront"]
|
ips4_IPSSessionFront = SITE['DDLStream']['cookies']["ips4_IPSSessionFront"]
|
||||||
ips4_member_id = SITE['DDLStream']['cookies']["ips4_member_id"]
|
ips4_member_id = SITE['DDLStream']['cookies']["ips4_member_id"]
|
||||||
|
|||||||
@@ -13,8 +13,10 @@ async def get_TMDb_id_from_IMDb_id(imdb_id,client):
|
|||||||
else:
|
else:
|
||||||
return None
|
return None
|
||||||
async def get_IMDB_id_from_TMDb_id(tmdb_id,client):
|
async def get_IMDB_id_from_TMDb_id(tmdb_id,client):
|
||||||
|
print(tmdb_id)
|
||||||
url = f"https://api.themoviedb.org/3/movie/{tmdb_id}?api_key={TMDB_KEY}"
|
url = f"https://api.themoviedb.org/3/movie/{tmdb_id}?api_key={TMDB_KEY}"
|
||||||
response = await client.get(url)
|
response = await client.get(url)
|
||||||
|
print(response.text)
|
||||||
if response.status_code == 200:
|
if response.status_code == 200:
|
||||||
data = response.json()
|
data = response.json()
|
||||||
imdb_id = data.get('imdb_id')
|
imdb_id = data.get('imdb_id')
|
||||||
|
|||||||
@@ -206,301 +206,6 @@ STREAM = {
|
|||||||
"poster": "https://static.sky.it/static_clientlibs/skycielo/clientlibs/clientlib-site/resources/images/facebook.jpg",
|
"poster": "https://static.sky.it/static_clientlibs/skycielo/clientlibs/clientlib-site/resources/images/facebook.jpg",
|
||||||
"url": "https://hlslive-web-gcdn-skycdn-it.akamaized.net/TACT/11219/cieloweb/master.m3u8?hdnea=st=1701861650~exp=1765449000~acl=/*~hmac=84c9f3f71e57b13c3a67afa8b29a8591ea9ed84bf786524399545d94be1ec04d"
|
"url": "https://hlslive-web-gcdn-skycdn-it.akamaized.net/TACT/11219/cieloweb/master.m3u8?hdnea=st=1701861650~exp=1765449000~acl=/*~hmac=84c9f3f71e57b13c3a67afa8b29a8591ea9ed84bf786524399545d94be1ec04d"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"id": "sky-cinema-action",
|
|
||||||
"title": "Sky Cinema Action",
|
|
||||||
"name": "",
|
|
||||||
"genres": ["Sky"],
|
|
||||||
"poster": "https://www.sorrisi.com/guidatv/bundles/tvscnewsite/css/images/loghi/sky-cinema-action_c.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "sky-arte",
|
|
||||||
"title": "Sky Arte",
|
|
||||||
"name": "",
|
|
||||||
"genres": ["Sky"],
|
|
||||||
"poster": "https://www.davinciface.com/wp-content/uploads/2022/07/sky_arte_logo-270x270.jpg"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "sky-atlantic",
|
|
||||||
"title": "Sky Atlantic",
|
|
||||||
"name": "",
|
|
||||||
"genres": ["Sky"],
|
|
||||||
"poster": "https://www.sorrisi.com/guidatv/bundles/tvscnewsite/css/images/loghi/sky-atlantic_c.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "sky-cinema-collection",
|
|
||||||
"title": "Sky Cinema Collection",
|
|
||||||
"name": "",
|
|
||||||
"genres": ["Sky"],
|
|
||||||
"poster": "https://www.sorrisi.com/guidatv/bundles/tvscnewsite/css/images/loghi/sky-cinema-collection_c.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "sky-cinema-comedy",
|
|
||||||
"title": "Sky Cinema Comedy",
|
|
||||||
"name": "",
|
|
||||||
"genres": ["Sky"],
|
|
||||||
"poster": "https://www.sorrisi.com/guidatv/bundles/tvscnewsite/css/images/loghi/sky-cinema-comedy_c.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "sky-cinema-drama",
|
|
||||||
"title": "Sky Cinema Drama",
|
|
||||||
"name": "",
|
|
||||||
"genres": ["Sky"],
|
|
||||||
"poster":"https://i.imgur.com/Z8hr5aR.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "sky-cinema-due",
|
|
||||||
"title": "Sky Cinema Due",
|
|
||||||
"name": "",
|
|
||||||
"genres": ["Sky"],
|
|
||||||
"poster": "https://i.imgur.com/xfbZiXs.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "sky-cinema-family",
|
|
||||||
"title": "Sky Cinema Family",
|
|
||||||
"name": "",
|
|
||||||
"genres": ["Sky"],
|
|
||||||
"poster": "https://www.sorrisi.com/guidatv/bundles/tvscnewsite/css/images/loghi/sky-cinema-family_c.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "sky-cinema-romance",
|
|
||||||
"title": "Sky Cinema Romance",
|
|
||||||
"name": "",
|
|
||||||
"genres": ["Sky"],
|
|
||||||
"poster": "https://www.sorrisi.com/guidatv/bundles/tvscnewsite/css/images/loghi/sky-cinema-romance_c.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "sky-cinema-suspence",
|
|
||||||
"title": "Sky Cinema Suspence",
|
|
||||||
"name": "",
|
|
||||||
"genres": ["Sky"],
|
|
||||||
"poster": "https://i.imgur.com/vS97bNg.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "sky-cinema-uno",
|
|
||||||
"title": "Sky Cinema Uno",
|
|
||||||
"name": "",
|
|
||||||
"genres": ["Sky"],
|
|
||||||
"poster": "https://www.sorrisi.com/guidatv/bundles/tvscnewsite/css/images/loghi/sky-cinema-1_c.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "sky-crime",
|
|
||||||
"title": "Sky Crime",
|
|
||||||
"name": "",
|
|
||||||
"genres": ["Sky"],
|
|
||||||
"poster": "https://i.imgur.com/j2JdQaH.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "sky-documentaries",
|
|
||||||
"title": "Sky Documentaries",
|
|
||||||
"name": "",
|
|
||||||
"genres": ["Sky"],
|
|
||||||
"poster": "https://artworks.thetvdb.com/banners/posters/117551-3.jpg"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "sky-investigation",
|
|
||||||
"title": "Sky Investigation",
|
|
||||||
"name": "",
|
|
||||||
"genres": ["Sky"],
|
|
||||||
"poster": "https://www.sorrisi.com/guidatv/bundles/tvscnewsite/css/images/loghi/sky-investigation_c.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "sky-nature",
|
|
||||||
"title": "Sky Nature",
|
|
||||||
"name": "",
|
|
||||||
"genres": ["Sky"],
|
|
||||||
"poster":"https://search.bus-hit.me/image_proxy?url=https%3A%2F%2Fstatic.wikia.nocookie.net%2Flogosfake%2Fimages%2Fa%2Fad%2FSky_Nature_Generic_ID_2020.png%2Frevision%2Flatest%2Fscale-to-width-down%2F1200%3Fcb%3D20200725184630&h=71ab69ffa3abfe2ce6c20912b44f862adff4f10b9d4d761c18d292b7ffa3e9a9"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "sky-serie",
|
|
||||||
"title": "Sky Serie",
|
|
||||||
"name": "",
|
|
||||||
"genres": ["Sky"],
|
|
||||||
"poster": "https://i.imgur.com/FYvSq5T.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "sky-uno",
|
|
||||||
"title": "Sky Uno",
|
|
||||||
"name": "",
|
|
||||||
"genres": ["Sky"],
|
|
||||||
"poster": "https://www.miotvonline.com/wp-content/uploads/2020/09/sky-uno-straming-live-miotv.jpg"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "sky-sport-24",
|
|
||||||
"title": "Sky Sport 24",
|
|
||||||
"name": "",
|
|
||||||
"genres": ["Sky"],
|
|
||||||
"poster": "https://img2.sport-tv-guide.live/images/tv-station-sky-sport24-it-356.png"
|
|
||||||
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "sky-sport-golf",
|
|
||||||
"title": "Sky Sport Golf",
|
|
||||||
"name": "",
|
|
||||||
"genres": ["Sky"],
|
|
||||||
"poster": "https://search.bus-hit.me/image_proxy?url=https%3A%2F%2Fencrypted-tbn0.gstatic.com%2Fimages%3Fq%3Dtbn%3AANd9GcRQoDZOK798-OYz0E_NAahzde_JW-hLcHK-PjLm0rCXyVVcj_Y%26s&h=4b1b7a276442b52778daf26f745d06f57ff6c0cf401f4d7f3e371a566247f3ef"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "sky-sport-251",
|
|
||||||
"title": "Sky Sport 251",
|
|
||||||
"name": "",
|
|
||||||
"genres": ["Sky"],
|
|
||||||
"poster": "https://logodownload.org/wp-content/uploads/2020/06/sky-sports-logo-0-1.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "sky-sport-252",
|
|
||||||
"title": "Sky Sport 252",
|
|
||||||
"name": "",
|
|
||||||
"genres": ["Sky"],
|
|
||||||
"poster": "https://logodownload.org/wp-content/uploads/2020/06/sky-sports-logo-0-1.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "sky-sport-253",
|
|
||||||
"title": "Sky Sport 253",
|
|
||||||
"name": "",
|
|
||||||
"genres": ["Sky"],
|
|
||||||
"poster": "https://logodownload.org/wp-content/uploads/2020/06/sky-sports-logo-0-1.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "sky-sport-254",
|
|
||||||
"title": "Sky Sport 254",
|
|
||||||
"name": "",
|
|
||||||
"genres": ["Sky"],
|
|
||||||
"poster": "https://logodownload.org/wp-content/uploads/2020/06/sky-sports-logo-0-1.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "sky-sport-255",
|
|
||||||
"title": "Sky Sport 255",
|
|
||||||
"name": "",
|
|
||||||
"genres": ["Sky"],
|
|
||||||
"poster": "https://logodownload.org/wp-content/uploads/2020/06/sky-sports-logo-0-1.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "sky-sport-256",
|
|
||||||
"title": "Sky Sport 256",
|
|
||||||
"name": "",
|
|
||||||
"genres": ["Sky"],
|
|
||||||
"poster": "https://logodownload.org/wp-content/uploads/2020/06/sky-sports-logo-0-1.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "sky-sport-257",
|
|
||||||
"title": "Sky Sport 257",
|
|
||||||
"name": "",
|
|
||||||
"genres": ["Sky"],
|
|
||||||
"poster": "https://logodownload.org/wp-content/uploads/2020/06/sky-sports-logo-0-1.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "sky-sport-258",
|
|
||||||
"title": "Sky Sport 258",
|
|
||||||
"name": "",
|
|
||||||
"genres": ["Sky"],
|
|
||||||
"poster": "https://logodownload.org/wp-content/uploads/2020/06/sky-sports-logo-0-1.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "sky-sport-259",
|
|
||||||
"title": "Sky Sport 259",
|
|
||||||
"name": "",
|
|
||||||
"genres": ["Sky"],
|
|
||||||
"poster": "https://logodownload.org/wp-content/uploads/2020/06/sky-sports-logo-0-1.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "sky-sport-260",
|
|
||||||
"title": "Sky Sport 260",
|
|
||||||
"name": "",
|
|
||||||
"genres": ["Sky"],
|
|
||||||
"poster": "https://logodownload.org/wp-content/uploads/2020/06/sky-sports-logo-0-1.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "sky-sport-261",
|
|
||||||
"title": "Sky Sport 261",
|
|
||||||
"name": "",
|
|
||||||
"genres": ["Sky"],
|
|
||||||
"poster": "https://logodownload.org/wp-content/uploads/2020/06/sky-sports-logo-0-1.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "sky-sport-max",
|
|
||||||
"title": "Sky Sport Max",
|
|
||||||
"name": "",
|
|
||||||
"genres": ["Sky"],
|
|
||||||
"poster": "https://i.imgur.com/TWl58VI.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "sky-sport-uno",
|
|
||||||
"title": "Sky Sport Uno",
|
|
||||||
"name": "",
|
|
||||||
"genres": ["Sky"],
|
|
||||||
"poster": "https://www.sorrisi.com/guidatv/bundles/tvscnewsite/css/images/loghi/sky-sport-1_c.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "sky-sport-f1",
|
|
||||||
"title": "Sky Sport F1",
|
|
||||||
"name": "",
|
|
||||||
"genres": ["Sky"],
|
|
||||||
"poster": "https://i1.wp.com/cache.pressmailing.net/thumbnail/story_hires/395b1e2f-a1c6-4cf6-9869-02155da4021f/Sky_F1_Logo.jpg.jpg"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "sky-sport-motogp",
|
|
||||||
"title": "Sky Sport MotoGP",
|
|
||||||
"name": "",
|
|
||||||
"genres": ["Sky"],
|
|
||||||
"poster": "https://img2.sport-tv-guide.live/images/tv-station-sky-sport-motogp-360.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "sky-sport-calcio",
|
|
||||||
"title": "Sky Sport Calcio",
|
|
||||||
"name": "",
|
|
||||||
"genres": ["Sky"],
|
|
||||||
"poster": "https://www.sorrisi.com/guidatv/bundles/tvscnewsite/css/images/loghi/sky-sport-2_c.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "sky-sport-arena",
|
|
||||||
"title": "Sky Sport Arena",
|
|
||||||
"name": "",
|
|
||||||
"genres": ["Sky"],
|
|
||||||
"poster": "https://img2.sport-tv-guide.live/images/tv-station-sky-sport-arena-354.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "sky-sport-tennis",
|
|
||||||
"title": "Sky Sport Tennis",
|
|
||||||
"name": "",
|
|
||||||
"genres": ["Sky"],
|
|
||||||
"poster": "https://pbs.twimg.com/profile_images/1752313472325431296/jr-YrkR6_400x400.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "sky-sport-nba",
|
|
||||||
"title": "Sky Sport NBA",
|
|
||||||
"name": "",
|
|
||||||
"genres": ["Sky"],
|
|
||||||
"poster": "https://www.nbareligion.com/wp-content/uploads/2019/09/sky-sport-nba.jpg"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "dazn-zona-a",
|
|
||||||
"title": "DAZN Zona A",
|
|
||||||
"name": "",
|
|
||||||
"genres": ["DAZN"],
|
|
||||||
"poster": "https://i.ytimg.com/vi/0cEfGLq-tz4/maxresdefault.jpg"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "dazn-1",
|
|
||||||
"title": "DAZN 1",
|
|
||||||
"name": "",
|
|
||||||
"genres": ["DAZN"],
|
|
||||||
"poster": "https://i.ytimg.com/vi/0cEfGLq-tz4/maxresdefault.jpg"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "eurosport-1",
|
|
||||||
"title": "Eurosport 1",
|
|
||||||
"name": "",
|
|
||||||
"genres": ["Warner Bros"],
|
|
||||||
"poster": "https://www.sorrisi.com/guidatv/bundles/tvscnewsite/css/images/loghi/eurosport-1_c.png"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "eurosport-2",
|
|
||||||
"title": "Eurosport 2",
|
|
||||||
"name": "",
|
|
||||||
"genres": ["Warner Bros"],
|
|
||||||
"poster": "https://www.sorrisi.com/guidatv/bundles/tvscnewsite/css/images/loghi/eurosport-2_c.png"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"id": "dmax",
|
"id": "dmax",
|
||||||
"title": "DMAX",
|
"title": "DMAX",
|
||||||
@@ -914,4 +619,5 @@ provider_map = {
|
|||||||
"GS": "GUARDASERIE",
|
"GS": "GUARDASERIE",
|
||||||
"GHD": "GUARDAHD",
|
"GHD": "GUARDAHD",
|
||||||
"OST": "ONLINESERIETV",
|
"OST": "ONLINESERIETV",
|
||||||
|
"ES": "EUROSTREAMING"
|
||||||
}
|
}
|
||||||
+21
-3
@@ -139,8 +139,8 @@ random_headers = Headers()
|
|||||||
async def eval_solver(stream_link,proxies, ForwardProxy, client):
|
async def eval_solver(stream_link,proxies, ForwardProxy, client):
|
||||||
try:
|
try:
|
||||||
headers = random_headers.generate()
|
headers = random_headers.generate()
|
||||||
headers["user-agent"] = "Mozilla/5.0 (Linux; Android 12) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.5060.71 Mobile 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["User-Agent"] = "Mozilla/5.0 (Linux; Android 12) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.5060.71 Mobile Safari/537.36"
|
headers["accept-language"] = 'en-US,en;q=0.5'
|
||||||
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")
|
||||||
print("Eval:",response.status_code)
|
print("Eval:",response.status_code)
|
||||||
soup = BeautifulSoup(response.text, "lxml",parse_only=SoupStrainer("script"))
|
soup = BeautifulSoup(response.text, "lxml",parse_only=SoupStrainer("script"))
|
||||||
@@ -148,10 +148,28 @@ async def eval_solver(stream_link,proxies, ForwardProxy, client):
|
|||||||
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)
|
||||||
match = re.search( r'file:"(.*?)"', unpacked_code)
|
if "mixdrop" in stream_link:
|
||||||
|
pattern = r'MDCore.wurl ?= ?"(.*?)"'
|
||||||
|
|
||||||
|
else:
|
||||||
|
pattern = r'file:"(.*?)"'
|
||||||
|
match = re.search(pattern, unpacked_code)
|
||||||
if match:
|
if match:
|
||||||
m3u8_url = match.group(1)
|
m3u8_url = match.group(1)
|
||||||
return m3u8_url
|
return m3u8_url
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print("Eval solver error\n",e)
|
print("Eval solver error\n",e)
|
||||||
raise Exception("Error in eval_solver")
|
raise Exception("Error in eval_solver")
|
||||||
|
|
||||||
|
|
||||||
|
#Testing
|
||||||
|
async def test_animeworld():
|
||||||
|
from curl_cffi.requests import AsyncSession
|
||||||
|
async with AsyncSession() as client:
|
||||||
|
results = await eval_solver("https://mixdrop.cv/e/l6kqxrm4t4l4or",{},"",client)
|
||||||
|
print("https:"+results)
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
import asyncio
|
||||||
|
asyncio.run(test_animeworld())
|
||||||
|
#python3 -m Src.Utilities.eval
|
||||||
|
|||||||
@@ -53,6 +53,10 @@ def get_info_tmdb(tmbda,ismovie,type):
|
|||||||
date = show.first_air_date
|
date = show.first_air_date
|
||||||
date = date.split("-")[0]
|
date = date.split("-")[0]
|
||||||
return showname,date
|
return showname,date
|
||||||
|
elif type == "Eurostreaming":
|
||||||
|
date = show.first_air_date
|
||||||
|
date = date.split("-")[0]
|
||||||
|
return showname,date
|
||||||
|
|
||||||
elif ismovie == 1:
|
elif ismovie == 1:
|
||||||
movie = Movie()
|
movie = Movie()
|
||||||
@@ -133,6 +137,10 @@ async def get_info_imdb(imdb_id, ismovie, type,client):
|
|||||||
date = data['tv_results'][0]['first_air_date']
|
date = data['tv_results'][0]['first_air_date']
|
||||||
date = date.split("-")[0]
|
date = date.split("-")[0]
|
||||||
return showname,date
|
return showname,date
|
||||||
|
elif type == "Eurostreaming":
|
||||||
|
date = data['tv_results'][0]['first_air_date']
|
||||||
|
date = date.split("-")[0]
|
||||||
|
return showname,date
|
||||||
|
|
||||||
elif ismovie == 1:
|
elif ismovie == 1:
|
||||||
showname= data['movie_results'][0]['title']
|
showname= data['movie_results'][0]['title']
|
||||||
|
|||||||
+16
-11
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"Siti": {
|
"Siti": {
|
||||||
"StreamingCommunity": {
|
"StreamingCommunity": {
|
||||||
"url": "https://streamingcommunity.paris",
|
"url": "https://vixsrc.to",
|
||||||
"SC_ForwardProxy": "0",
|
"SC_ForwardProxy": "0",
|
||||||
"SC_PROXY": "0",
|
"SC_PROXY": "0",
|
||||||
"VX_ForwardProxy": "0",
|
"VX_ForwardProxy": "0",
|
||||||
@@ -10,20 +10,20 @@
|
|||||||
},
|
},
|
||||||
"Filmpertutti": {
|
"Filmpertutti": {
|
||||||
"url": "https://filmpertutti.motorcycles",
|
"url": "https://filmpertutti.motorcycles",
|
||||||
"enabled": "1"
|
"enabled": "0"
|
||||||
},
|
},
|
||||||
"Tantifilm":{
|
"Tantifilm":{
|
||||||
"url": "https://www.tanti.bond",
|
"url": "https://www.tanti.bond",
|
||||||
"TF_ForwardProxy": "0",
|
"TF_ForwardProxy": "1",
|
||||||
"TF_PROXY": "0",
|
"TF_PROXY": "0",
|
||||||
"enabled": "1"
|
"enabled": "0"
|
||||||
},
|
},
|
||||||
"Mysterius":{
|
"Mysterius":{
|
||||||
"enabled": "0"
|
"enabled": "0"
|
||||||
},
|
},
|
||||||
"LordChannel":{
|
"LordChannel":{
|
||||||
"url":"https://lordchannel.net",
|
"url":"https://lordchannel.net",
|
||||||
"enabled":"1"
|
"enabled":"0"
|
||||||
},
|
},
|
||||||
"StreamingWatch":{
|
"StreamingWatch":{
|
||||||
"url":"https://www.streamingwatch.org",
|
"url":"https://www.streamingwatch.org",
|
||||||
@@ -45,10 +45,10 @@
|
|||||||
"ips4_member_id": null,
|
"ips4_member_id": null,
|
||||||
"ips4_login_key": null
|
"ips4_login_key": null
|
||||||
},
|
},
|
||||||
"enabled":"1"
|
"enabled":"0"
|
||||||
},
|
},
|
||||||
"Guardaserie":{
|
"Guardaserie":{
|
||||||
"url":"https://guardaserietv.mom",
|
"url":"https://guardaserietv.cc",
|
||||||
"enabled":"1",
|
"enabled":"1",
|
||||||
"GS_ForwardProxy":"0",
|
"GS_ForwardProxy":"0",
|
||||||
"GS_PROXY":"0"
|
"GS_PROXY":"0"
|
||||||
@@ -61,9 +61,15 @@
|
|||||||
},
|
},
|
||||||
"Onlineserietv":{
|
"Onlineserietv":{
|
||||||
"domain":"com",
|
"domain":"com",
|
||||||
"enabled":"1",
|
"enabled":"0",
|
||||||
"OST_ForwardProxy":"0",
|
"OST_ForwardProxy":"0",
|
||||||
"OST_PROXY":"0"
|
"OST_PROXY":"0"
|
||||||
|
},
|
||||||
|
"Eurostreaming":{
|
||||||
|
"url": "https://eurostreaming.garden",
|
||||||
|
"enabled": "1",
|
||||||
|
"ES_ForwardProxy": "0",
|
||||||
|
"ES_PROXY": "0"
|
||||||
},
|
},
|
||||||
"AnimeWorld":{
|
"AnimeWorld":{
|
||||||
"url":"https://www.animeworld.so",
|
"url":"https://www.animeworld.so",
|
||||||
@@ -83,12 +89,11 @@
|
|||||||
"General":{
|
"General":{
|
||||||
"load_env": "0",
|
"load_env": "0",
|
||||||
"HOST": "0.0.0.0",
|
"HOST": "0.0.0.0",
|
||||||
"PORT": "8080",
|
"PORT": 8080,
|
||||||
"Name": "MammaMia",
|
"Name": "MammaMia",
|
||||||
"Icon": "🍕️",
|
"Icon": "🍕️",
|
||||||
"Public_Instance": "0",
|
"Public_Instance": "0",
|
||||||
"Remote_Instance": "1",
|
"Remote_Instance": "0",
|
||||||
"Global_Proxy": "0"
|
"Global_Proxy": "0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -17,6 +17,7 @@ from Src.Utilities.dictionaries import okru,STREAM,extra_sources,webru_vary,webr
|
|||||||
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.webru import webru,get_skystreaming
|
from Src.API.webru import webru,get_skystreaming
|
||||||
from Src.API.onlineserietv import onlineserietv
|
from Src.API.onlineserietv import onlineserietv
|
||||||
|
from Src.API.eurostreaming import eurostreaming
|
||||||
from curl_cffi.requests import AsyncSession
|
from curl_cffi.requests import AsyncSession
|
||||||
from slowapi import Limiter
|
from slowapi import Limiter
|
||||||
from slowapi.util import get_remote_address
|
from slowapi.util import get_remote_address
|
||||||
@@ -53,6 +54,7 @@ DDL = config.DDL
|
|||||||
GS = config.GS
|
GS = config.GS
|
||||||
GHD = config.GHD
|
GHD = config.GHD
|
||||||
OST = config.OST
|
OST = config.OST
|
||||||
|
ES = config.ES
|
||||||
HOST = config.HOST
|
HOST = config.HOST
|
||||||
PORT = int(config.PORT)
|
PORT = int(config.PORT)
|
||||||
Icon = config.Icon
|
Icon = config.Icon
|
||||||
@@ -68,7 +70,7 @@ app.include_router(m3u8_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)
|
||||||
User_Agent= "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:127.0) Gecko/20100101 Firefox/127.0"
|
User_Agent= "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36"
|
||||||
MANIFEST = {
|
MANIFEST = {
|
||||||
"id": "org.stremio.mammamia",
|
"id": "org.stremio.mammamia",
|
||||||
"version": "1.5.0",
|
"version": "1.5.0",
|
||||||
@@ -111,10 +113,9 @@ async def transform_mfp(mfp_stream_url,client):
|
|||||||
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])}"
|
||||||
|
|
||||||
|
|
||||||
return url
|
return url
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print("Transforing MFP failed",e)
|
print("Converting MFP failed",e)
|
||||||
return None
|
return None
|
||||||
@app.get('/config')
|
@app.get('/config')
|
||||||
def config():
|
def config():
|
||||||
@@ -404,6 +405,29 @@ async def addon_stream(request: Request,config, type, id,):
|
|||||||
if url_onlineserietv:
|
if url_onlineserietv:
|
||||||
print(f"OnlineSerieTV Found Results for {id}")
|
print(f"OnlineSerieTV Found Results for {id}")
|
||||||
streams['streams'].append({'name': f"{Name}",'title': f'{Icon}OnlineSerieTV\n{name}', 'url': url_onlineserietv, 'behaviorHints': {'proxyHeaders': {'request': {"User-Agent": 'Mozilla/5.0 (Linux; Android 12) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.5060.71 Mobile Safari/537.36', "Referer": "https://flexy.stream/"}}, 'bingeGroup': 'onlineserietv', 'notWebReady': True}})
|
streams['streams'].append({'name': f"{Name}",'title': f'{Icon}OnlineSerieTV\n{name}', 'url': url_onlineserietv, 'behaviorHints': {'proxyHeaders': {'request': {"User-Agent": 'Mozilla/5.0 (Linux; Android 12) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.5060.71 Mobile Safari/537.36', "Referer": "https://flexy.stream/"}}, 'bingeGroup': 'onlineserietv', 'notWebReady': True}})
|
||||||
|
if provider_maps['EUROSTREAMING'] == "1" and ES == "1":
|
||||||
|
urls_eurostreaming = await eurostreaming(id,client,MFP)
|
||||||
|
if urls_eurostreaming:
|
||||||
|
i = 0
|
||||||
|
for url_eurostreaming,name_es in urls_eurostreaming.items():
|
||||||
|
if len(urls_eurostreaming) == 1:
|
||||||
|
language = "ITA/SUB ITA"
|
||||||
|
elif len(urls_eurostreaming)>1:
|
||||||
|
if i == 0:
|
||||||
|
language = "ITA"
|
||||||
|
else:
|
||||||
|
language = "SUB ITA"
|
||||||
|
if "cdn.net" in url_eurostreaming:
|
||||||
|
streams['streams'].append({'name': f"{Name}\n{language}",'title': f'{Icon}Eurostreaming\nDeltabit\n{name_es}', 'url': url_eurostreaming, 'behaviorHints': {'bingeGroup': 'eurostreaming'}})
|
||||||
|
elif "delivery" in url_eurostreaming:
|
||||||
|
streams['streams'].append({'name': f"{Name}\n{language}",'title': f'{Icon}Eurostreaming\nMixDrop\n{name_es}', 'url': url_eurostreaming, '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'}}, 'notWebReady': True, 'bingeGroup': 'eurostreaming'}})
|
||||||
|
elif "mixdrop" in url_eurostreaming:
|
||||||
|
if MFP == "1":
|
||||||
|
url_eurostreaming = f'{MFP_url}/extractor/video?api_password={MFP_password}&d={url_eurostreaming}&host=Mixdrop&redirect_stream=false'
|
||||||
|
url_eurostreaming = await transform_mfp(url_eurostreaming,client)
|
||||||
|
if url_eurostreaming:
|
||||||
|
streams['streams'].append({'name': f"{Name}\n{language}",'title': f'{Icon}Eurostreaming\nMixDrop\n{name_es}', 'url': url_eurostreaming, 'behaviorHints':{'bingeGroup': 'eurostreaming'}})
|
||||||
|
i+=1
|
||||||
|
|
||||||
if not streams['streams']:
|
if not streams['streams']:
|
||||||
raise HTTPException(status_code=404)
|
raise HTTPException(status_code=404)
|
||||||
|
|||||||
Reference in New Issue
Block a user