added live channels
This commit is contained in:
+1
-1
@@ -6,7 +6,7 @@
|
|||||||
"fast_search": "1"
|
"fast_search": "1"
|
||||||
},
|
},
|
||||||
"Filmpertutti": {
|
"Filmpertutti": {
|
||||||
"enabled": "1",
|
"enabled": "0",
|
||||||
"domain": "makeup"
|
"domain": "makeup"
|
||||||
},
|
},
|
||||||
"Tuttifilm":{
|
"Tuttifilm":{
|
||||||
|
|||||||
@@ -4,6 +4,11 @@ from streamingcommunity import streaming_community
|
|||||||
from tantifilm import tantifilm
|
from tantifilm import tantifilm
|
||||||
import json
|
import json
|
||||||
import config
|
import config
|
||||||
|
import logging
|
||||||
|
|
||||||
|
# Configure logging
|
||||||
|
logging.basicConfig(level=logging.DEBUG)
|
||||||
|
|
||||||
FILMPERTUTTI = config.FILMPERTUTTI
|
FILMPERTUTTI = config.FILMPERTUTTI
|
||||||
STREAMINGCOMMUNITY = config.STREAMINGCOMMUNITY
|
STREAMINGCOMMUNITY = config.STREAMINGCOMMUNITY
|
||||||
MYSTERIUS = config.MYSTERIUS
|
MYSTERIUS = config.MYSTERIUS
|
||||||
@@ -13,20 +18,107 @@ PORT = int(config.PORT)
|
|||||||
if MYSTERIUS == "1":
|
if MYSTERIUS == "1":
|
||||||
from cool import cool
|
from cool import cool
|
||||||
|
|
||||||
|
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
|
|
||||||
MANIFEST = {
|
MANIFEST = {
|
||||||
"id": "org.stremio.mammamia",
|
"id": "org.stremio.mammamia",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"catalogs": [],
|
"catalogs": [
|
||||||
"resources": ["stream"],
|
{"type": "tv", "id": "tv_channels", "name": "TV Channels"}
|
||||||
"types": ["movie", "series"],
|
],
|
||||||
|
"resources": ["stream", "catalog"],
|
||||||
|
"types": ["movie", "series", "tv"],
|
||||||
"name": "Mamma Mia",
|
"name": "Mamma Mia",
|
||||||
"description": "Addon providing HTTPS Stream for Italian Movies/Series",
|
"description": "Addon providing HTTPS Stream for Italian Movies/Series",
|
||||||
"logo": "https://creazilla-store.fra1.digitaloceanspaces.com/emojis/49647/pizza-emoji-clipart-md.png"
|
"logo": "https://creazilla-store.fra1.digitaloceanspaces.com/emojis/49647/pizza-emoji-clipart-md.png"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
STREAMS = {
|
||||||
|
"tv": {
|
||||||
|
"skysport24": [
|
||||||
|
{
|
||||||
|
"title": "Sky Sport 24",
|
||||||
|
"poster": "https://www.tanti.bond/public/upload/channel/sky-sport-24.webp",
|
||||||
|
"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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"Skyuno": [
|
||||||
|
{
|
||||||
|
"title": "Sky Uno",
|
||||||
|
"url": "https://07-24.mizhls.ru/fls/cdn/calcioXskyuno/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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"skyserie": [
|
||||||
|
{
|
||||||
|
"title": "Sky Serie",
|
||||||
|
"url": "https://07-24.mizhls.ru/fls/cdn/calcioXskyserie/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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"Sky Nature": [
|
||||||
|
{
|
||||||
|
"title": "Sky Nature",
|
||||||
|
"url": "https://07-24.mizhls.ru/fls/cdn/calcioXskynature/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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"skyinvestigation": [
|
||||||
|
{
|
||||||
|
"title": "skyinvestigation",
|
||||||
|
"url": "https://07-24.mizhls.ru/fls/cdn/calcioXskyinvestigation/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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
def respond_with(data):
|
def respond_with(data):
|
||||||
resp = jsonify(data)
|
resp = jsonify(data)
|
||||||
resp.headers['Access-Control-Allow-Origin'] = '*'
|
resp.headers['Access-Control-Allow-Origin'] = '*'
|
||||||
@@ -41,13 +133,34 @@ def addon_manifest():
|
|||||||
def root():
|
def root():
|
||||||
return "Hello, this is a Stremio Addon providing HTTPS Stream for Italian Movies/Series, to install it add /manifest.json to the url and then add it into the Stremio search bar"
|
return "Hello, this is a Stremio Addon providing HTTPS Stream for Italian Movies/Series, to install it add /manifest.json to the url and then add it into the Stremio search bar"
|
||||||
|
|
||||||
|
@app.route('/catalog/<type>/<id>.json')
|
||||||
|
def addon_catalog(type, id):
|
||||||
|
if type not in MANIFEST['types']:
|
||||||
|
abort(404)
|
||||||
|
catalog = {'metas': []}
|
||||||
|
if type in STREAMS:
|
||||||
|
for stream_id in STREAMS[type]:
|
||||||
|
for item in STREAMS[type][stream_id]:
|
||||||
|
meta_item = {
|
||||||
|
"id": stream_id,
|
||||||
|
"type": type,
|
||||||
|
"name": item['title'],
|
||||||
|
"poster": item.get('poster', "https://via.placeholder.com/150")
|
||||||
|
}
|
||||||
|
catalog['metas'].append(meta_item)
|
||||||
|
return respond_with(catalog)
|
||||||
|
|
||||||
@app.route('/stream/<type>/<id>.json')
|
@app.route('/stream/<type>/<id>.json')
|
||||||
def addon_stream(type, id):
|
def addon_stream(type, id):
|
||||||
if type not in MANIFEST['types']:
|
if type not in MANIFEST['types']:
|
||||||
abort(404)
|
abort(404)
|
||||||
streams = {'streams': []}
|
streams = {'streams': []}
|
||||||
|
|
||||||
|
if type in STREAMS and id in STREAMS[type]:
|
||||||
|
logging.debug(f"Found TV channel: {id}")
|
||||||
|
streams['streams'] = STREAMS[type][id]
|
||||||
|
else:
|
||||||
|
logging.debug(f"Handling movie or series: {id}")
|
||||||
if MYSTERIUS == "1":
|
if MYSTERIUS == "1":
|
||||||
results = cool(id)
|
results = cool(id)
|
||||||
if results:
|
if results:
|
||||||
@@ -59,8 +172,6 @@ def addon_stream(type, id):
|
|||||||
if url_streaming_community is not None:
|
if url_streaming_community is not None:
|
||||||
streams['streams'].append({'title': 'StreamingCommunity 1080p', 'url': f'{url_streaming_community}?rendition=1080p'})
|
streams['streams'].append({'title': 'StreamingCommunity 1080p', 'url': f'{url_streaming_community}?rendition=1080p'})
|
||||||
streams['streams'].append({'title': 'StreamingCommunity 720p', 'url': f'{url_streaming_community}?rendition=720p'})
|
streams['streams'].append({'title': 'StreamingCommunity 720p', 'url': f'{url_streaming_community}?rendition=720p'})
|
||||||
|
|
||||||
# If FILMPERTUTTI == 1, scrape that site
|
|
||||||
if FILMPERTUTTI == "1":
|
if FILMPERTUTTI == "1":
|
||||||
url_filmpertutti = filmpertutti(id)
|
url_filmpertutti = filmpertutti(id)
|
||||||
if url_filmpertutti is not None:
|
if url_filmpertutti is not None:
|
||||||
@@ -68,12 +179,11 @@ def addon_stream(type, id):
|
|||||||
if TUTTIFILM == "1":
|
if TUTTIFILM == "1":
|
||||||
url_tuttifilm = tantifilm(id)
|
url_tuttifilm = tantifilm(id)
|
||||||
streams['streams'].append({'title': 'Tantifilm', 'url': url_tuttifilm, 'behaviorHints': {'proxyHeaders': {"request": {"Referer": "https://d000d.com/"}}, 'notWebReady': True}})
|
streams['streams'].append({'title': 'Tantifilm', 'url': url_tuttifilm, 'behaviorHints': {'proxyHeaders': {"request": {"Referer": "https://d000d.com/"}}, 'notWebReady': True}})
|
||||||
# If no streams were added, abort with a 404 error
|
|
||||||
if not streams['streams']:
|
if not streams['streams']:
|
||||||
abort(404)
|
abort(404)
|
||||||
|
|
||||||
return respond_with(streams)
|
return respond_with(streams)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
app.run(host=HOST, port=PORT)
|
app.run(host=HOST, port=PORT)
|
||||||
|
|||||||
Reference in New Issue
Block a user