Update run.py

Added support for animeworld
This commit is contained in:
Urlo30
2024-08-23 21:17:55 +02:00
committed by GitHub
Unverified
parent 796f464441
commit 01b1e507c4
+61 -67
View File
@@ -8,6 +8,7 @@ import json
import config import config
import logging import logging
from okru import okru_get_url from okru import okru_get_url
from animeworld import animeworld
# Configure logging # Configure logging
FILMPERTUTTI = config.FILMPERTUTTI FILMPERTUTTI = config.FILMPERTUTTI
STREAMINGCOMMUNITY = config.STREAMINGCOMMUNITY STREAMINGCOMMUNITY = config.STREAMINGCOMMUNITY
@@ -16,6 +17,7 @@ TUTTIFILM = config.TUTTIFILM
TF_DOMAIN = config.TF_DOMAIN TF_DOMAIN = config.TF_DOMAIN
LORDCHANNEL = config.LORDCHANNEL LORDCHANNEL = config.LORDCHANNEL
STREAMINGWATCH= config.STREAMINGWATCH STREAMINGWATCH= config.STREAMINGWATCH
ANIMEWORLD = config.ANIMEWORLD
HOST = config.HOST HOST = config.HOST
PORT = int(config.PORT) PORT = int(config.PORT)
HF = config.HF HF = config.HF
@@ -53,47 +55,24 @@ STREAM = {
"title": "Rai 1", "title": "Rai 1",
"url": "https://m3u.iranvids.com/rai01/output.m3u8", "url": "https://m3u.iranvids.com/rai01/output.m3u8",
"behaviorHints": { "behaviorHints": {
"notWebReady": True, "notWebReady": True,
"proxyHeaders": { "proxyHeaders": {
"request": { "request": {
"User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36" "User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36"
}
} }
} }
}
}, },
{ {
"id": "rai2", "id": "rai2",
"title": "Rai 2", "title": "Rai 2",
"url": "https://ddy6.mizhls.ru/ddy6/premium851/playlist.m3u8", "url": "https://m3u.iranvids.com/rai02/output.m3u8"
"behaviorHints": {
"notWebReady": True,
"proxyHeaders": {
"request": {
"Referer": "https://quest4play.xyz/",
"Origin": "null",
"User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36"
}
}
}
},
{
"id": "sky24",
"title": "Sky News 24",
"url": "https://07-24.mizhls.ru/fls/cdn/calcioXskysport24/playlist.m3u8",
"behaviorHints": {
"notWebReady": True,
"proxyHeaders": {
"request": {
"Referer": "https://claplivehdplay.ru/",
"Origin": "https://claplivehdplay.ru",
"User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36"
}
}
}
} }
] ]
} }
okru = { okru = {
"rai1": "https://ok.ru/videoembed/7703488765552?nochat=1", "rai1": "https://ok.ru/videoembed/7703488765552?nochat=1",
"rai2": "https://ok.ru/videoembed/7805618364016?nochat=1" "rai2": "https://ok.ru/videoembed/7805618364016?nochat=1"
@@ -173,7 +152,7 @@ def addon_stream(type, id):
if id in okru: if id in okru:
channel_url = okru_get_url(id) channel_url = okru_get_url(id)
streams['streams'].append({ streams['streams'].append({
'title': "okru"+channel['title'], 'title': channel['title'] + "OKRU",
'url': channel_url 'url': channel_url
}) })
else: else:
@@ -186,41 +165,56 @@ def addon_stream(type, id):
return respond_with(streams) return respond_with(streams)
else: else:
logging.debug(f"Handling movie or series: {id}") logging.debug(f"Handling movie or series: {id}")
if MYSTERIUS == "1": if "kitsu" in id:
results = cool(id) if ANIMEWORLD == "1":
if results: animeworld_urls = animeworld(id)
for resolution, link in results.items(): print(animeworld_urls)
streams['streams'].append({'title': f'{HF}Mysterious {resolution}', 'url': link}) if animeworld_urls:
if STREAMINGCOMMUNITY == "1": i = 0
url_streaming_community,url_720_streaming_community,quality_sc = streaming_community(id) for url in animeworld_urls:
if url_streaming_community is not None: if url:
if quality_sc == "1080": if i == 0:
streams['streams'].append({'title': f'{HF}StreamingCommunity 1080p Max', 'url': url_streaming_community}) title = "Original"
streams['streams'].append({'title': f'{HF}StreamingCommunity 720p Max', 'url': url_720_streaming_community}) elif i == 1:
else: title = "Italian"
streams['streams'].append({'title': f'{HF}StreamingCommunity 720p Max', 'url': url_streaming_community}) streams['streams'].append({'title': f'{HF}Animeworld {title}', 'url': url})
if LORDCHANNEL == "1": i+=1
url_lordchannel,quality_lordchannel =lordchannel(id) else:
if quality_lordchannel == "FULL HD" and url_lordchannel != None: if MYSTERIUS == "1":
streams['streams'].append({'title': f'{HF}LordChannel 1080p', 'url': url_lordchannel}) results = cool(id)
elif url_lordchannel != None: if results:
streams['streams'].append({'title': f'{HF}LordChannel 720p', 'url': url_lordchannel}) for resolution, link in results.items():
if FILMPERTUTTI == "1": streams['streams'].append({'title': f'{HF}Mysterious {resolution}', 'url': link})
url_filmpertutti = filmpertutti(id) if STREAMINGCOMMUNITY == "1":
if url_filmpertutti is not None: url_streaming_community,url_720_streaming_community,quality_sc = streaming_community(id)
streams['streams'].append({'title': 'Filmpertutti', 'url': url_filmpertutti}) if url_streaming_community is not None:
if TUTTIFILM == "1": if quality_sc == "1080":
url_tuttifilm = tantifilm(id) streams['streams'].append({'title': f'{HF}StreamingCommunity 1080p Max', 'url': url_streaming_community})
if url_tuttifilm: streams['streams'].append({'title': f'{HF}StreamingCommunity 720p Max', 'url': url_720_streaming_community})
if not isinstance(url_tuttifilm, str): else:
for title, url in url_tuttifilm.items(): streams['streams'].append({'title': f'{HF}StreamingCommunity 720p Max', 'url': url_streaming_community})
streams['streams'].append({'title': f'{HF}Tantifilm {title}', 'url': url, 'behaviorHints': {'proxyHeaders': {"request": {"Referer": "https://d000d.com/"}}, 'notWebReady': True}}) if LORDCHANNEL == "1":
if STREAMINGWATCH == "1": url_lordchannel,quality_lordchannel =lordchannel(id)
url_streamingwatch = streamingwatch(id) if quality_lordchannel == "FULL HD" and url_lordchannel != None:
if url_streamingwatch: streams['streams'].append({'title': f'{HF}LordChannel 1080p', 'url': url_lordchannel})
streams['streams'].append({'title': '{HF}StreamingWatch 720p', 'url': url_streamingwatch}) elif url_lordchannel != None:
if not streams['streams']: streams['streams'].append({'title': f'{HF}LordChannel 720p', 'url': url_lordchannel})
abort(404) if FILMPERTUTTI == "1":
url_filmpertutti = filmpertutti(id)
if url_filmpertutti is not None:
streams['streams'].append({'title': 'Filmpertutti', 'url': url_filmpertutti})
if TUTTIFILM == "1":
url_tuttifilm = tantifilm(id)
if url_tuttifilm:
if not isinstance(url_tuttifilm, str):
for title, url in url_tuttifilm.items():
streams['streams'].append({'title': f'{HF}Tantifilm {title}', 'url': url, 'behaviorHints': {'proxyHeaders': {"request": {"Referer": "https://d000d.com/"}}, 'notWebReady': True}})
if STREAMINGWATCH == "1":
url_streamingwatch = streamingwatch(id)
if url_streamingwatch:
streams['streams'].append({'title': f'{HF}StreamingWatch 720p', 'url': url_streamingwatch})
if not streams['streams']:
abort(404)
return respond_with(streams) return respond_with(streams)