Added partial proxy support for tantifilm
This commit is contained in:
+1
-2
@@ -100,5 +100,4 @@ def animeworld(id):
|
||||
return final_urls
|
||||
except:
|
||||
print("Animeworld failed")
|
||||
return None
|
||||
animeworld("kitsi:12:10")
|
||||
return None
|
||||
+2
-2
@@ -10,7 +10,7 @@
|
||||
"domain": "makeup"
|
||||
},
|
||||
"Tuttifilm":{
|
||||
"enabled": "0",
|
||||
"enabled": "1",
|
||||
"domain": "bond",
|
||||
"fast_search": "0"
|
||||
},
|
||||
@@ -31,7 +31,7 @@
|
||||
}
|
||||
},
|
||||
"General":{
|
||||
"load_env": "0",
|
||||
"load_env": "1",
|
||||
"HOST": "0.0.0.0",
|
||||
"PORT": "8080",
|
||||
"HF": "0"
|
||||
|
||||
+3
-5
@@ -2,11 +2,9 @@ import requests
|
||||
from tmdbv3api import TMDb, Movie, TV
|
||||
from loadenv import load_env
|
||||
import config
|
||||
MYSTERIUS = config.MYSTERIUS
|
||||
if MYSTERIUS == "1":
|
||||
TMDB_KEY,_= load_env()
|
||||
else:
|
||||
TMDB_KEY= load_env()
|
||||
env_vars = load_env()
|
||||
|
||||
TMDB_KEY = env_vars.get('TMDB_KEY')
|
||||
def get_TMDb_id_from_IMDb_id(imdb_id):
|
||||
response = requests.get(f'https://api.themoviedb.org/3/find/{imdb_id}',
|
||||
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 convert import get_TMDb_id_from_IMDb_id
|
||||
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):
|
||||
try:
|
||||
headers = {
|
||||
|
||||
+8
-10
@@ -8,25 +8,23 @@ STREAM = {
|
||||
{
|
||||
"id": "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"
|
||||
},
|
||||
{
|
||||
"id": "rai1",
|
||||
"title": "Rai 1",
|
||||
"url": "https://m3u.iranvids.com/rai01/output.m3u8",
|
||||
"behaviorHints": {
|
||||
"notWebReady": True,
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
||||
"name": "Full HD",
|
||||
"poster": "https://upload.wikimedia.org/wikipedia/commons/thumb/f/fa/Rai_1_-_Logo_2016.svg/1280px-Rai_1_-_Logo_2016.svg.png",
|
||||
"url": "http://173.208.52.200/rai1/index.m3u8"
|
||||
},
|
||||
{
|
||||
"id": "rai2",
|
||||
"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
|
||||
SC_FAST_SEARCH = config.SC_FAST_SEARCH
|
||||
TF_FAST_SEARCH = config.TF_FAST_SEARCH
|
||||
MYSTERIUS = config.MYSTERIUS
|
||||
if MYSTERIUS == "1":
|
||||
TMDB_KEY,_= load_env()
|
||||
else:
|
||||
TMDB_KEY= load_env()
|
||||
env_vars = load_env()
|
||||
TMDB_KEY = env_vars.get('TMDB_KEY')
|
||||
|
||||
|
||||
def get_info_tmdb(tmbda,ismovie,type):
|
||||
tmdb = TMDb()
|
||||
|
||||
+9
-4
@@ -3,6 +3,8 @@ import config
|
||||
import config
|
||||
MYSTERIUS = config.MYSTERIUS
|
||||
dotenv = config.dotenv
|
||||
TUTTIFILM = config.TUTTIFILM
|
||||
HF = config.HF
|
||||
#You need to keep dotenv disabled on remote servers
|
||||
if dotenv == "1":
|
||||
from dotenv import load_dotenv
|
||||
@@ -10,8 +12,11 @@ if dotenv == "1":
|
||||
|
||||
|
||||
def load_env():
|
||||
TMDB_KEY = os.getenv('TMDB_KEY')
|
||||
env_vars = {}
|
||||
env_vars['TMDB_KEY'] = os.getenv('TMDB_KEY')
|
||||
if MYSTERIUS == "1":
|
||||
MYSTERIUS_KEY = os.getenv('MYSTERIUS_KEY')
|
||||
return TMDB_KEY, MYSTERIUS_KEY
|
||||
return TMDB_KEY
|
||||
env_vars['MYSTERIUS_KEY'] = os.getenv('MYSTERIUS_KEY')
|
||||
if TUTTIFILM == "1":
|
||||
if HF == "1":
|
||||
env_vars['PROXY_CREDENTIALS'] = os.getenv('PROXY')
|
||||
return env_vars
|
||||
|
||||
@@ -9,7 +9,7 @@ import config
|
||||
import logging
|
||||
from okru import okru_get_url
|
||||
from animeworld import animeworld
|
||||
from dictionaries import okru, STREAM
|
||||
from dictionaries import okru,STREAM
|
||||
# Configure logging
|
||||
FILMPERTUTTI = config.FILMPERTUTTI
|
||||
STREAMINGCOMMUNITY = config.STREAMINGCOMMUNITY
|
||||
@@ -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):
|
||||
resp = jsonify(data)
|
||||
resp.headers['Access-Control-Allow-Origin'] = '*'
|
||||
@@ -80,7 +72,7 @@ def addon_catalog(type, id):
|
||||
"id": channel["id"],
|
||||
"type": "tv",
|
||||
"name": channel["title"],
|
||||
"poster": "", # Add poster URL if available
|
||||
"poster": channel["poster"], # Add poster URL if available
|
||||
"description": f"Watch {channel['title']}"
|
||||
})
|
||||
|
||||
@@ -97,12 +89,11 @@ def addon_meta(type, id):
|
||||
"id": id,
|
||||
"type": "tv",
|
||||
"name": channel["title"],
|
||||
"poster": "", # Add poster URL if available
|
||||
"poster": channel["poster"], # Add poster URL if available
|
||||
"description": f"Watch {channel['title']}",
|
||||
"background": "", # Add background image URL if available
|
||||
"logo": "", # Add logo URL if available
|
||||
"videos": [{
|
||||
"id": id,
|
||||
"title": channel["title"],
|
||||
"streams": [{
|
||||
"title": channel["title"],
|
||||
@@ -126,12 +117,12 @@ def addon_stream(type, id):
|
||||
if id in okru:
|
||||
channel_url = okru_get_url(id)
|
||||
streams['streams'].append({
|
||||
'title': channel['title'] + "OKRU",
|
||||
'title': channel['name'] + "OKRU",
|
||||
'url': channel_url
|
||||
})
|
||||
else:
|
||||
streams['streams'].append({
|
||||
'title': channel['title'],
|
||||
'title': channel['name'],
|
||||
'url': channel['url']
|
||||
})
|
||||
if not streams['streams']:
|
||||
@@ -195,4 +186,4 @@ def addon_stream(type, id):
|
||||
|
||||
return respond_with({"meta": meta})
|
||||
if __name__ == '__main__':
|
||||
app.run(host=HOST, port=PORT)
|
||||
app.run(host=HOST, port=PORT)
|
||||
@@ -218,4 +218,4 @@ def streaming_community(imdb):
|
||||
return url,url720,quality
|
||||
except Exception as e:
|
||||
print("StreamingCommunity failed")
|
||||
return None,None
|
||||
return None,None,None
|
||||
+15
-5
@@ -4,11 +4,14 @@ import re
|
||||
import time
|
||||
from info import is_movie,get_info_imdb,get_info_tmdb
|
||||
import config
|
||||
from loadenv import load_env
|
||||
TF_FAST_SEARCH = config.TF_FAST_SEARCH
|
||||
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):
|
||||
url = f'https://www.tanti.{TF_DOMAIN}/search/{showname}'
|
||||
response = requests.get(url)
|
||||
@@ -157,11 +160,17 @@ def true_url(protect_link):
|
||||
"Range": "bytes=0-",
|
||||
"Referer": "https://d000d.com/",
|
||||
}
|
||||
response = requests.get(protect_link)
|
||||
if HF == "1":
|
||||
proxy = PROXY_CREDENTIALS
|
||||
proxies = {
|
||||
"http": proxy,
|
||||
"https": proxy
|
||||
}
|
||||
response = requests.get(protect_link, proxies=proxies)
|
||||
else:
|
||||
response = requests.get(protect_link)
|
||||
link = response.url
|
||||
#Get the ID
|
||||
doodstream_id = link.rsplit('/e/', 1)[-1]
|
||||
# Make a GET request
|
||||
|
||||
|
||||
if response.status_code == 200:
|
||||
# Get unique timestamp for the request
|
||||
@@ -177,6 +186,7 @@ def true_url(protect_link):
|
||||
if match:
|
||||
# Create real link (match[0] includes all matched elements)
|
||||
url =f'https://d000d.com{match[1]}'
|
||||
print("MD5: ", url)
|
||||
rebobo = requests.get(url, headers=headers)
|
||||
real_url = f'{rebobo.text}123456789{match[2]}{real_time}'
|
||||
print(real_url)
|
||||
|
||||
Reference in New Issue
Block a user