Added partial proxy support for tantifilm
This commit is contained in:
@@ -101,4 +101,3 @@ def animeworld(id):
|
|||||||
except:
|
except:
|
||||||
print("Animeworld failed")
|
print("Animeworld failed")
|
||||||
return None
|
return None
|
||||||
animeworld("kitsi:12:10")
|
|
||||||
|
|||||||
+2
-2
@@ -10,7 +10,7 @@
|
|||||||
"domain": "makeup"
|
"domain": "makeup"
|
||||||
},
|
},
|
||||||
"Tuttifilm":{
|
"Tuttifilm":{
|
||||||
"enabled": "0",
|
"enabled": "1",
|
||||||
"domain": "bond",
|
"domain": "bond",
|
||||||
"fast_search": "0"
|
"fast_search": "0"
|
||||||
},
|
},
|
||||||
@@ -31,7 +31,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"General":{
|
"General":{
|
||||||
"load_env": "0",
|
"load_env": "1",
|
||||||
"HOST": "0.0.0.0",
|
"HOST": "0.0.0.0",
|
||||||
"PORT": "8080",
|
"PORT": "8080",
|
||||||
"HF": "0"
|
"HF": "0"
|
||||||
|
|||||||
+3
-5
@@ -2,11 +2,9 @@ import requests
|
|||||||
from tmdbv3api import TMDb, Movie, TV
|
from tmdbv3api import TMDb, Movie, TV
|
||||||
from loadenv import load_env
|
from loadenv import load_env
|
||||||
import config
|
import config
|
||||||
MYSTERIUS = config.MYSTERIUS
|
env_vars = load_env()
|
||||||
if MYSTERIUS == "1":
|
|
||||||
TMDB_KEY,_= load_env()
|
TMDB_KEY = env_vars.get('TMDB_KEY')
|
||||||
else:
|
|
||||||
TMDB_KEY= load_env()
|
|
||||||
def get_TMDb_id_from_IMDb_id(imdb_id):
|
def get_TMDb_id_from_IMDb_id(imdb_id):
|
||||||
response = requests.get(f'https://api.themoviedb.org/3/find/{imdb_id}',
|
response = requests.get(f'https://api.themoviedb.org/3/find/{imdb_id}',
|
||||||
params={'external_source': 'imdb_id', 'api_key': f'{TMDB_KEY}'})
|
params={'external_source': 'imdb_id', 'api_key': f'{TMDB_KEY}'})
|
||||||
|
|||||||
@@ -3,7 +3,8 @@ import json
|
|||||||
from info import get_info_tmdb,is_movie
|
from info import get_info_tmdb,is_movie
|
||||||
from convert import get_TMDb_id_from_IMDb_id
|
from convert import get_TMDb_id_from_IMDb_id
|
||||||
from loadenv import load_env
|
from loadenv import load_env
|
||||||
_,MYSTERIUS_KEY = load_env()
|
env_vars = load_env()
|
||||||
|
MYSTERIUS_KEY = env_vars.get('MYSTERIUS_KEY')
|
||||||
def get_links(slug,season,episode,ismovie):
|
def get_links(slug,season,episode,ismovie):
|
||||||
try:
|
try:
|
||||||
headers = {
|
headers = {
|
||||||
|
|||||||
+8
-10
@@ -8,25 +8,23 @@ STREAM = {
|
|||||||
{
|
{
|
||||||
"id": "la7",
|
"id": "la7",
|
||||||
"title": "LA7",
|
"title": "LA7",
|
||||||
|
"name": "LA7",
|
||||||
|
"poster": "https://static.wikia.nocookie.net/logopedia/images/0/02/LA7_-_Logo_2011.svg/revision/latest?cb=20190728152519",
|
||||||
"url": "https://d3749synfikwkv.cloudfront.net/v1/master/3722c60a815c199d9c0ef36c5b73da68a62b09d1/cc-74ylxpgd78bpb/Live.m3u8"
|
"url": "https://d3749synfikwkv.cloudfront.net/v1/master/3722c60a815c199d9c0ef36c5b73da68a62b09d1/cc-74ylxpgd78bpb/Live.m3u8"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "rai1",
|
"id": "rai1",
|
||||||
"title": "Rai 1",
|
"title": "Rai 1",
|
||||||
"url": "https://m3u.iranvids.com/rai01/output.m3u8",
|
"name": "Full HD",
|
||||||
"behaviorHints": {
|
"poster": "https://upload.wikimedia.org/wikipedia/commons/thumb/f/fa/Rai_1_-_Logo_2016.svg/1280px-Rai_1_-_Logo_2016.svg.png",
|
||||||
"notWebReady": True,
|
"url": "http://173.208.52.200/rai1/index.m3u8"
|
||||||
"proxyHeaders": {
|
|
||||||
"request": {
|
|
||||||
"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://m3u.iranvids.com/rai02/output.m3u8"
|
"name": "Full HD",
|
||||||
|
"poster": "https://upload.wikimedia.org/wikipedia/commons/thumb/9/99/Rai_2_-_Logo_2016.svg/1280px-Rai_2_-_Logo_2016.svg.png",
|
||||||
|
"url": "http://173.208.52.200/rai2/index.m3u8"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,11 +6,9 @@ import config
|
|||||||
import json
|
import json
|
||||||
SC_FAST_SEARCH = config.SC_FAST_SEARCH
|
SC_FAST_SEARCH = config.SC_FAST_SEARCH
|
||||||
TF_FAST_SEARCH = config.TF_FAST_SEARCH
|
TF_FAST_SEARCH = config.TF_FAST_SEARCH
|
||||||
MYSTERIUS = config.MYSTERIUS
|
env_vars = load_env()
|
||||||
if MYSTERIUS == "1":
|
TMDB_KEY = env_vars.get('TMDB_KEY')
|
||||||
TMDB_KEY,_= load_env()
|
|
||||||
else:
|
|
||||||
TMDB_KEY= load_env()
|
|
||||||
|
|
||||||
def get_info_tmdb(tmbda,ismovie,type):
|
def get_info_tmdb(tmbda,ismovie,type):
|
||||||
tmdb = TMDb()
|
tmdb = TMDb()
|
||||||
|
|||||||
+9
-4
@@ -3,6 +3,8 @@ import config
|
|||||||
import config
|
import config
|
||||||
MYSTERIUS = config.MYSTERIUS
|
MYSTERIUS = config.MYSTERIUS
|
||||||
dotenv = config.dotenv
|
dotenv = config.dotenv
|
||||||
|
TUTTIFILM = config.TUTTIFILM
|
||||||
|
HF = config.HF
|
||||||
#You need to keep dotenv disabled on remote servers
|
#You need to keep dotenv disabled on remote servers
|
||||||
if dotenv == "1":
|
if dotenv == "1":
|
||||||
from dotenv import load_dotenv
|
from dotenv import load_dotenv
|
||||||
@@ -10,8 +12,11 @@ if dotenv == "1":
|
|||||||
|
|
||||||
|
|
||||||
def load_env():
|
def load_env():
|
||||||
TMDB_KEY = os.getenv('TMDB_KEY')
|
env_vars = {}
|
||||||
|
env_vars['TMDB_KEY'] = os.getenv('TMDB_KEY')
|
||||||
if MYSTERIUS == "1":
|
if MYSTERIUS == "1":
|
||||||
MYSTERIUS_KEY = os.getenv('MYSTERIUS_KEY')
|
env_vars['MYSTERIUS_KEY'] = os.getenv('MYSTERIUS_KEY')
|
||||||
return TMDB_KEY, MYSTERIUS_KEY
|
if TUTTIFILM == "1":
|
||||||
return TMDB_KEY
|
if HF == "1":
|
||||||
|
env_vars['PROXY_CREDENTIALS'] = os.getenv('PROXY')
|
||||||
|
return env_vars
|
||||||
|
|||||||
@@ -47,14 +47,6 @@ MANIFEST = {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
okru = {
|
|
||||||
"rai1": "https://ok.ru/videoembed/7703488765552?nochat=1",
|
|
||||||
"rai2": "https://ok.ru/videoembed/7805618364016?nochat=1"
|
|
||||||
}
|
|
||||||
|
|
||||||
MANIFEST["catalogs"].append({"type": "tv", "id": "channels", "name": "Channels"})
|
|
||||||
|
|
||||||
|
|
||||||
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'] = '*'
|
||||||
@@ -80,7 +72,7 @@ def addon_catalog(type, id):
|
|||||||
"id": channel["id"],
|
"id": channel["id"],
|
||||||
"type": "tv",
|
"type": "tv",
|
||||||
"name": channel["title"],
|
"name": channel["title"],
|
||||||
"poster": "", # Add poster URL if available
|
"poster": channel["poster"], # Add poster URL if available
|
||||||
"description": f"Watch {channel['title']}"
|
"description": f"Watch {channel['title']}"
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -97,12 +89,11 @@ def addon_meta(type, id):
|
|||||||
"id": id,
|
"id": id,
|
||||||
"type": "tv",
|
"type": "tv",
|
||||||
"name": channel["title"],
|
"name": channel["title"],
|
||||||
"poster": "", # Add poster URL if available
|
"poster": channel["poster"], # Add poster URL if available
|
||||||
"description": f"Watch {channel['title']}",
|
"description": f"Watch {channel['title']}",
|
||||||
"background": "", # Add background image URL if available
|
"background": "", # Add background image URL if available
|
||||||
"logo": "", # Add logo URL if available
|
"logo": "", # Add logo URL if available
|
||||||
"videos": [{
|
"videos": [{
|
||||||
"id": id,
|
|
||||||
"title": channel["title"],
|
"title": channel["title"],
|
||||||
"streams": [{
|
"streams": [{
|
||||||
"title": channel["title"],
|
"title": channel["title"],
|
||||||
@@ -126,12 +117,12 @@ 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': channel['title'] + "OKRU",
|
'title': channel['name'] + "OKRU",
|
||||||
'url': channel_url
|
'url': channel_url
|
||||||
})
|
})
|
||||||
else:
|
else:
|
||||||
streams['streams'].append({
|
streams['streams'].append({
|
||||||
'title': channel['title'],
|
'title': channel['name'],
|
||||||
'url': channel['url']
|
'url': channel['url']
|
||||||
})
|
})
|
||||||
if not streams['streams']:
|
if not streams['streams']:
|
||||||
|
|||||||
@@ -218,4 +218,4 @@ def streaming_community(imdb):
|
|||||||
return url,url720,quality
|
return url,url720,quality
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print("StreamingCommunity failed")
|
print("StreamingCommunity failed")
|
||||||
return None,None
|
return None,None,None
|
||||||
+14
-4
@@ -4,11 +4,14 @@ import re
|
|||||||
import time
|
import time
|
||||||
from info import is_movie,get_info_imdb,get_info_tmdb
|
from info import is_movie,get_info_imdb,get_info_tmdb
|
||||||
import config
|
import config
|
||||||
|
from loadenv import load_env
|
||||||
TF_FAST_SEARCH = config.TF_FAST_SEARCH
|
TF_FAST_SEARCH = config.TF_FAST_SEARCH
|
||||||
TF_DOMAIN = config.TF_DOMAIN
|
TF_DOMAIN = config.TF_DOMAIN
|
||||||
|
HF = config.HF
|
||||||
|
env_vars = load_env()
|
||||||
|
PROXY_CREDENTIALS = env_vars.get('PROXY_CREDENTIALS')
|
||||||
|
|
||||||
|
|
||||||
##FOR NOW ONLY MOVIES WORK, I HOPE I CAN FIX SERIES
|
|
||||||
def search(showname,ismovie,date):
|
def search(showname,ismovie,date):
|
||||||
url = f'https://www.tanti.{TF_DOMAIN}/search/{showname}'
|
url = f'https://www.tanti.{TF_DOMAIN}/search/{showname}'
|
||||||
response = requests.get(url)
|
response = requests.get(url)
|
||||||
@@ -157,11 +160,17 @@ def true_url(protect_link):
|
|||||||
"Range": "bytes=0-",
|
"Range": "bytes=0-",
|
||||||
"Referer": "https://d000d.com/",
|
"Referer": "https://d000d.com/",
|
||||||
}
|
}
|
||||||
|
if HF == "1":
|
||||||
|
proxy = PROXY_CREDENTIALS
|
||||||
|
proxies = {
|
||||||
|
"http": proxy,
|
||||||
|
"https": proxy
|
||||||
|
}
|
||||||
|
response = requests.get(protect_link, proxies=proxies)
|
||||||
|
else:
|
||||||
response = requests.get(protect_link)
|
response = requests.get(protect_link)
|
||||||
link = response.url
|
link = response.url
|
||||||
#Get the ID
|
|
||||||
doodstream_id = link.rsplit('/e/', 1)[-1]
|
|
||||||
# Make a GET request
|
|
||||||
|
|
||||||
if response.status_code == 200:
|
if response.status_code == 200:
|
||||||
# Get unique timestamp for the request
|
# Get unique timestamp for the request
|
||||||
@@ -177,6 +186,7 @@ def true_url(protect_link):
|
|||||||
if match:
|
if match:
|
||||||
# Create real link (match[0] includes all matched elements)
|
# Create real link (match[0] includes all matched elements)
|
||||||
url =f'https://d000d.com{match[1]}'
|
url =f'https://d000d.com{match[1]}'
|
||||||
|
print("MD5: ", url)
|
||||||
rebobo = requests.get(url, headers=headers)
|
rebobo = requests.get(url, headers=headers)
|
||||||
real_url = f'{rebobo.text}123456789{match[2]}{real_time}'
|
real_url = f'{rebobo.text}123456789{match[2]}{real_time}'
|
||||||
print(real_url)
|
print(real_url)
|
||||||
|
|||||||
Reference in New Issue
Block a user