1.1.0 Updated! Added Live TV!

This commit is contained in:
UrloMythus
2024-09-02 16:25:57 +02:00 Unverified
parent 1d45b6dd76
commit c91e040bf5
24 changed files with 2028 additions and 405 deletions
-1
View File
@@ -1,3 +1,2 @@
.env
__pycache__/
cool.py
+141 -25
View File
@@ -2,6 +2,7 @@
# MammaMia
@@ -10,7 +11,10 @@
A Stremio Addon for high quality HTTPS Streams in Italian
Movies, Series, Anime and Live TV are supported.
@@ -19,7 +23,11 @@ Movies, Series, Anime and Live TV are supported.
While hosting, this project, remember that Filmpertutti uses Mixdrop. Mixdrop only allows seeing the videos from the same IP where they were generated so, if you want to scrape filmpertutti, you will have to host this project locally. Else, you can only scrape other providers.
While hosting, this project, remember that Filmpertutti uses Mixdrop. Mixdrop only allows seeing the videos from the same IP where they were generated so, if you want to scrape filmpertutti, you will have to host this project locally. Else, you can only scrape other providers.
@@ -33,19 +41,27 @@ Hosting your own instance is suggested, but you can use the public instance [lin
# Installation
## Local
Install required packages
1. Install required packages
@@ -53,10 +69,14 @@ Install required packages
``pip install -r requirements.txt ``
2. Create a .env file and fill it (look at example.env)
Then to start the Flask server just execute:
3. Then to start the Fast API app server just execute:
@@ -64,7 +84,9 @@ Then to start the Flask server just execute:
``python3 run.py``
Remember to create a .env file with your TMDB Key.
## Hugging Face
@@ -73,7 +95,9 @@ Remember to create a .env file with your TMDB Key.
To host this project with Hugging Face, go to the [linked](https://huggingface.co/spaces/MammaMia-Urlo/MammaMia/) page and follow these steps
To host this project with Hugging Face, go to the [linked](https://huggingface.co/spaces/MammaMia-Urlo/CloneThisSpace/) page and follow these steps:
@@ -81,13 +105,19 @@ To host this project with Hugging Face, go to the [linked](https://huggingface.c
1. Create an Hugging Face Account
1. Create an Hugging Face Account [here](https://huggingface.co/join)
2. Click on three dots on the top (right) part of the screen
2. Go to [linked](https://huggingface.co/spaces/MammaMia-Urlo/CloneThisSpace) page and click on three dots on the top (right) part of the screen
@@ -99,7 +129,11 @@ To host this project with Hugging Face, go to the [linked](https://huggingface.c
4. Insert TMDB Key
4. Insert TMDB Key and set visibility to Public
@@ -111,26 +145,38 @@ To host this project with Hugging Face, go to the [linked](https://huggingface.c
6. You are done!
7. To install it on Stremio altought, you will need the Direct URL. It can be found on three dots --> Embed This Space --> Direct URL
If you do not find it it means your space is Private. To fix so go to Settings and click Set Visibility to Public.
8. Do not forget to add /manifest.json
9. The Addon will update everytime you restart the service but you will need to change the config.json manually each time if there are any changes.
If you just want to syncronize with the public instance then there is a button in the settings to do so.
8. How do I handle updates? To update the addon you will have to Factory Rebuild your space (in Settings) and, if there are any changes to config.json, copy them from [here](https://github.com/UrloMythus/MammaMia/blob/main/config.json) to the config.json in your Space, under Files.
9. How can I use Live TV? For now you can't except on public Instance. Wait until next update.
On Hugging Face you are forced to use the 8080 port because it is the only one allowed to send/get network requests. Moreover, remember that load_env needs to be disabled (it should be by default if you clone the project from HF)
Technical Details:
On Hugging Face you are forced to use the 8080 port because it is the only one allowed to send/get network requests. Moreover, remember that load_env and Public Instance need to be disabled in the config.json (it should be by default if you clone the project from HF)
@@ -142,31 +188,43 @@ On Hugging Face you are forced to use the 8080 port because it is the only one a
To install this project on [Render](https://render.com/) follow these steps:
1. Create an Account
2. Create a Web Service
3. Fork the repo and then connect it to Render
4. Among the other environment variables, put PORT = 8080. This is needed because render needs the Port given as an environment variable.
4. Among the other environment variables, put PORT = 8080. This is needed because Render needs the Port given as an environment variable. Remember to put TMDB_KEY as an enviroment variable.
@@ -178,11 +236,17 @@ To install this project on [Render](https://render.com/) follow these steps:
6. Then just finish Render Setup and you are done :)
Remember, load_env needs to be disabled in the config.json
Remember, load_env and Public Instance needs to be disabled in the config.json
@@ -198,7 +262,11 @@ Remember, load_env needs to be disabled in the config.json
Just paste the URL/manifest.json in your search bar.
Open your instance URL and configure MammaMia. Once you are done you can click on INSTALL Button. If it doesn't work click on Generate Manifest and copy it. Then paste it in Stremio Search Bar. If you are on Mac or on Web go to addons, click Add an Addon, and paste it there.
@@ -212,50 +280,98 @@ Just paste the URL/manifest.json in your search bar.
| Enviroment Variable | Value |
|-------------------------|---|
|TMDB_KEY|INSERT YOUR API KEY HERE|
Here is [linked](https://developer.themoviedb.org/docs/getting-started) a tutorial about how to get a TMDB KEY
# Config
In the repo there is a config.json that you can modify to change some aspects of the addon like the domains of the sites. Down here all explained:
| Config | Value |
|-------------------------|---|
| Domain | The domain of the site, must be a string |
|enabled | If the site is enabled or not. "1" means true. "0" means false. Remember, there is no point in enabling filmpertutti on a remote server since it's IP-LOCKED|
|fast_search|"1" for enabled, "0" for disabled. It enables a faster search for supported Providers but in case there are two movies/series with the exactly same name then they might take the wrong one|
|load_env|Put "1" if enabled, "0" if disabled. It needs to be enabled if you need to load a .env file. On remote hosting services, like Hugging Face or Render, it needs to be disabled. |
|HOST| The host for the Flask APP|
|PORT| The port for the Flask APP. Default: 8080 |
For now Mysterius must be kept disabled if you do not know what you are doing.
For now Tantifilm, even if it's player is not IP-Locked, does not work on Hugging Face.
| Config | Value |
|-------------------------|---|
| Domain | The domain of the site, must be a string |
|enabled | If the site is enabled or not. "1" means true. "0" means false. Remember, there is no point in enabling filmpertutti on a remote server since it's IP-LOCKED|
|fast_search|"1" for enabled, "0" for disabled. It enables a faster search for supported providers but it is less accurate|
|load_env|Put "1" if enabled, "0" if disabled. It needs to be enabled if you need to load a .env file. On remote hosting services, like Hugging Face or Render, it needs to be disabled. |
|HOST| The host for the Fast API APP|
|PORT| The port for the Fast API APP. Default: 8080 |
For now Mysterius must be kept disabled if you do not know what you are doing.
For now Tantifilm, even if its player is not IP-Locked, does not work on Hugging Face.
Check those links to get the new Domain for the providers.
[FILMPERTUTTI](https://filmpertuttiiii.nuovo.live/)
[STREAMINGCOMMUNITY](https://t.me/+jlXmmprhtakxYWJh)
[TANTIFILM](https://tantinuovo.com/tantifilm-nuovo-indirizzo/)
[STREAMINGWATCH](https://t.me/streamingwatch)
[LORDCHANNEL](https://t.me/+5MQwrb3eqb81NGI0)
[ANIMEWORLD](https://t.me/AnimeWorldITA2)
## Credits
- Big thanks to [Lovi0](https://github.com/Lovi-0), the creator of StreamingCommunity downloader, for helping me with some aspects of this project.
- This project uses [MediaFlowProxy](https://github.com/mhdzumair/mediaflow-proxy/) in order to be able to play some Live TV channels. Big thanks to his creator, [mhdzumair](https://github.com/mhdzumair)
## Disclaimer
This project does not host any illegal content on his servers, if you want any content to be taken down, please contact the actual owners of those sites.
+18 -21
View File
@@ -1,12 +1,11 @@
import httpx
import asyncio
from bs4 import BeautifulSoup
import datetime
import json
from info import get_info_kitsu
import config
from Src.Utilities.info import get_info_kitsu
import Src.Utilities.config as config
import re
AW_DOMAIN = config.AW_DOMAIN
months = {
"Gennaio": "January", "Febbraio": "February", "Marzo": "March",
"Aprile": "April", "Maggio": "May", "Giugno": "June",
@@ -21,15 +20,14 @@ showname_replace = {
" ": "+",
}
AW_DOMAIN = config.AW_DOMAIN
async def get_mp4(anime_url,ismovie,episode,client):
response = await client.get(anime_url,follow_redirects=True)
response = await client.get(anime_url,allow_redirects=True, impersonate = "chrome120")
soup = BeautifulSoup(response.text,'lxml')
episode_page = soup.find('a', {'data-episode-num':episode })
if episode_page is None:
return None
episode_page = f'https://animeworld.{AW_DOMAIN}{episode_page["href"]}'
response = await client.get(episode_page,follow_redirects=True)
response = await client.get(episode_page,allow_redirects=True, impersonate = "chrome120")
soup = BeautifulSoup(response.text,'lxml')
a_tag = soup.find('a', {'id': 'alternativeDownloadLink', 'class': 'm-1 btn btn-sm btn-primary'})
url = a_tag['href']
@@ -72,7 +70,7 @@ async def old_search(showname,date,ismovie,episode,client):
'keyword': showname,
}
response = await client.post(f'https://www.animeworld.{AW_DOMAIN}/api/search/v2', params=params, cookies=cookies, headers=headers,follow_redirects=True)
response = await client.post(f'https://www.animeworld.{AW_DOMAIN}/api/search/v2', params=params, cookies=cookies, headers=headers,allow_redirects=True, impersonate = "chrome120")
data = json.loads(response.text)
final_urls = []
@@ -93,7 +91,7 @@ async def old_search(showname,date,ismovie,episode,client):
params = {
'keyword': showname,
}
response = await client.post(f'https://www.animeworld.{AW_DOMAIN}/api/search/v2', params=params, cookies=cookies, headers=headers, follow_redirects=True)
response = await client.post(f'https://www.animeworld.{AW_DOMAIN}/api/search/v2', params=params, cookies=cookies, headers=headers, allow_redirects=True, impersonate = "chrome120")
data = json.loads(response.text)
for anime in data["animes"]:
release_date = anime["release"]
@@ -112,13 +110,13 @@ async def old_search(showname,date,ismovie,episode,client):
async def search(showname,date,ismovie,episode,client):
search_year = date[:4]
response = await client.get(f'https://www.animeworld.so/filter?year={search_year}&sort=2&keyword={showname}',follow_redirects=True)
response = await client.get(f'https://www.animeworld.so/filter?year={search_year}&sort=2&keyword={showname}',allow_redirects=True, impersonate = "chrome120")
soup = BeautifulSoup(response.text,'lxml')
anime_list = soup.find_all('a', class_=['poster', 'tooltipstered'])
final_urls = []
for anime in anime_list:
anime_info_url = f'https://www.animeworld.{AW_DOMAIN}/{anime["data-tip"]}'
response = await client.get(anime_info_url,follow_redirects=True)
response = await client.get(anime_info_url,allow_redirects=True, impersonate = "chrome120")
pattern = r'<label>Data di uscita:</label>\s*<span>\s*(.*?)\s*</span>'
match = re.search(pattern, response.text, re.S)
release_date = match.group(1).strip()
@@ -126,7 +124,6 @@ async def search(showname,date,ismovie,episode,client):
release_date = release_date.replace(ita, eng)
release_date = datetime.datetime.strptime(release_date, "%d %B %Y")
release_date = release_date.strftime("%Y-%m-%d")
print(release_date)
if release_date == date:
anime_url = f'https://www.animeworld.{AW_DOMAIN}{anime["href"]}'
final_url = await get_mp4(anime_url,ismovie,episode,client)
@@ -153,14 +150,14 @@ async def animeworld(id,client):
print("Animeworld failed")
return None
# async def test_animeworld():
# async with httpx.AsyncClient() as client:
# # Replace with actual id, for example 'anime_id:episode' format
# test_id = "kitsu:1555:1" # This is an example ID format
# results = await animeworld(test_id, client)
# print(results)
#async def test_animeworld():
async with httpx.AsyncClient() as client:
# Replace with actual id, for example 'anime_id:episode' format
test_id = "kitsu:1555:1" # This is an example ID format
results = await animeworld(test_id, client)
print(results)
#if __name__ == "__main__":
# import httpx
# import asyncio
# asyncio.run(test_animeworld())
import httpx
import asyncio
asyncio.run(test_animeworld())
+5 -6
View File
@@ -1,8 +1,7 @@
import requests
import json
from info import get_info_tmdb,is_movie
from convert import get_TMDb_id_from_IMDb_id
from loadenv import load_env
from Src.Utilities.info import get_info_tmdb,is_movie
from Src.Utilities.convert import get_TMDb_id_from_IMDb_id
from Src.Utilities.loadenv import load_env
env_vars = load_env()
MYSTERIUS_KEY = env_vars.get('MYSTERIUS_KEY')
async def get_links(slug,season,episode,ismovie,client):
@@ -64,7 +63,7 @@ async def get_links(slug,season,episode,ismovie,client):
print(f"JSONDecodeError: {e}")
return None
except requests.RequestException as e:
except client.RequestException as e:
print(f"Request error: {e}")
return None
@@ -81,7 +80,7 @@ async def get_links(slug,season,episode,ismovie,client):
async def search_imdb(showname,tmdba,client):
tmdba = str(tmdba)
query = f'https://altadefinizione-originale.com/api/search?search={showname}&page=1'
response = await client.get(query,follow_redirects=True)
response = await client.get(query,allow_redirects=True, impersonate = "chrome120")
if response.status_code == 200:
data = response.json()
if 'data' in data:
+227
View File
@@ -0,0 +1,227 @@
from bs4 import BeautifulSoup
import httpx
tivu = {
"dazn-zona-a": "801",
}
"""
"rai-1": "3401",
"rai-2": "3402",
"rai-3": "3403",
"rete-4": "123",
"canale-5": "122",
"italia-1": "121",
"la7": "79",
"tv8": "7260",
"nove": "4323",
"rai-4": "3405",
"rai-movie": "3406",
"rai-premium": "8522",
"mediaset-extra": "129",
"cielo": "4120",
"rai-sport": "17714",
"rai-news": "17711",
"dmax": "15202",
"real-time": "15201",
"focus": "134",
"giallo": "4322",
"topcrime": "132",
"boing": "126",
"cartoonito": "133",
"k2": "15204",
"foodnetwork": "15203",
"hgtv": "4334",
"solocalcio": "4996" ,
"euronews": "2017",
"rai-4k": "3407",
"""
convert_bho_1 = {
"euronews": "PlutoEuronews.it",
"cartoonito": "cartoonito",
"sky-tg-24": "skytg24",
"frisbee": "frisbee",
"hgtv": "hgtv",
"k2": "k2",
"supertennis": "supertennis",
"solocalcio": "sportitaliasolocalcio",
"sportitalia": "sportitalia",
"sportitalia24": "RakutenSportItalia.it",
"rsi-la-2": "rsila2",
"baby-shark-tv": "RakutenBabySharkTv.it",
"adrenaline-movies": "RakutenFullMoon.it",
"adrenaline-movies": "RakutenBizzarroMovies.it",
"cinema-italiano": "RakutenCinemaItalianoRakutenTv.it",
"le-vite-degli-altri": "RakutenLeViteDegliAltri.it",
"dark-matter": "RakutenDarkMatterItNew.it",
"cine-western": "RakutenWesternEPeplum.it",
"serie-crime": "RakutenCrimeSeriesItRakutenTv.it",
"filmrise-sci-fi": "RakutenFuelTvNew.it",
"doctor-who": "RakutenBbcDoctorWho.it",
"bbc-drama": "RakutenBbcDrama.it",
"documentari": "RakutenDocumentaries.it",
"house-of-docs": "RakutenHouseOfDocs.it",
"the-asylum": "PlutoTheAsylum.it",
"western": "PlutoTvWestern.it",
"consulenze-illegali": "PlutoConsulenzeIllegaliItPlus.it"
}
convert_bho_2 = {
"rai-1": "Rai%201",
"rai-2": "Rai 2",
"rai-3": "Rai 3",
"rai-4": "Rai 4",
"rai-premium": "Rai Premium",
"rai-movie": "Rai Movie",
"rai-sport": "Rai Sport",
"rete-4": "Rete 4",
"canale-5": "Canale 5",
"italia-1": "Italia 1",
"topcrime": "Top Crime",
"mediaset-extra": "Mediaset Extra",
"focus": "Focus",
"boing": "Boing",
"history": "History",
"comedy-central": "Comedy Central",
"tv8": "TV 8",
"cielo": "Cielo",
"sky-cinema-action": "Sky Cinema Action",
"sky-arte": "Sky Arte FHD",
"sky-atlantic": "Sky Atlantic",
"sky-cinema-collection": "Sky Cinema Collection",
"sky-cinema-comedy": "Sky Cinema Comedy",
"sky-cinema-drama": "Sky Cinema Drama",
"sky-cinema-due": "Sky Cinema Due",
"sky-cinema-family": "Sky Cinema Family",
"sky-cinema-romance": "Sky Cinema Romance",
"sky-cinema-suspence": "Sky Cinema Suspence",
"sky-cinema-uno": "Sky Cinema Uno",
"sky-uno": "Sky Uno",
"sky-sport-24": "Sky Sport",
"sky-sport-uno": "Sky Sport Uno",
"sky-sport-f1": "Sky Sport F1",
"sky-sport-motogp": "Sky Sport MotoGP",
"sky-sport-arena": "Sky Sport Arena",
"sky-sport-nba": "Sky Sport NBA",
"eurosport-1": "Eurosport 1",
"eurosport-2": "Eurosport 2",
"dmax": "Dmax",
"foodnetwork": "Food Network",
"giallo": "Giallo",
"nove": "Nove",
"realtime": "Real Time",
}
convert_bho_3 = {
"la7": "La7",
"rai-news": "Rai News DTT",
"sky-crime": "Sky CrimeInvestigation",
"sky-documentaries": "Sky Documentaries HD",
"sky-investigation": "Sky Investigation HD",
"sky-nature": "Sky Nature HD",
"sky-serie": "Sky Serie HD",
"sky-sport-golf": "Sky Sport Golf",
"sky-sport-251": "Sky Sport 251 HD",
"sky-sport-252": "Sky Sport 252 HD",
"sky-sport-253": "Sky Sport 253 HD",
"sky-sport-254": "Sky Sport 254 HD",
"sky-sport-255": "Sky Sport 255 HD",
"sky-sport-256": "Sky Sport 256 HD",
"sky-sport-257": "Sky Sport 257 HD",
"sky-sport-258": "Sky Sport 258 HD",
"sky-sport-259": "Sky Sport 259 HD",
"sky-sport-260": "Sky Sport 260 HD",
"sky-sport-261": "Sky Sport 261 HD",
"sky-sport-max": "Sky Sport Max",
"sky-sport-calcio": "Sky Sport Calcio HD",
"sky-sport-tennis": "Sky Sport Tennis HD",
}
async def tivu_get(id,client):
try:
cookies = {
'ASP.NET_SessionId': 'p2fk5silp5mjgtx0j5chjrh3',
}
ik = tivu[id]
headers = {
'User-Agent': 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:127.0) Gecko/20100101 Firefox/127.0',
'Accept': '*/*',
'Accept-Language': 'en-US,en;q=0.5',
# 'Accept-Encoding': 'gzip, deflate, br, zstd',
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
'X-Requested-With': 'XMLHttpRequest',
'Origin': 'https://www.tivu.tv',
'DNT': '1',
'Sec-GPC': '1',
'Connection': 'keep-alive',
'Referer': 'https://www.tivu.tv/schedasat-rai1.html',
# 'Cookie': 'ASP.NET_SessionId=p2fk5silp5mjgtx0j5chjrh3',
'Sec-Fetch-Dest': 'empty',
'Sec-Fetch-Mode': 'cors',
'Sec-Fetch-Site': 'same-origin',
'Pragma': 'no-cache',
'Cache-Control': 'no-cache',
}
data = {
'ik': ik
}
response = await client.post('https://www.tivu.tv/getPrograms.ashx', cookies=cookies, headers=headers, data=data)
soup = BeautifulSoup(response.text,'lxml')
tr_element = soup.find('tr', class_='in_onda')
hour_range = tr_element.find_all('td')[0].text.strip()
program_name = tr_element.find_all('td')[1].text.strip()
description = hour_range + " " + program_name
return description
except Exception as e:
print(e)
description = f'Watch {id}'
return description
async def epg_guide(id,client):
import httpx
try:
if id in convert_bho_1:
new_id = convert_bho_1[id]
new_id = new_id.replace(" ","%20")
response = await client.get(f"https://lorempizza-boh.hf.space/{new_id}/now")
elif id in convert_bho_2:
new_id = convert_bho_2[id]
new_id = new_id.replace(" ","%20")
response = await client.get(f"https://mammamia-urlo-boh2.hf.space/{new_id}/now")
elif id in convert_bho_3:
new_id = convert_bho_3[id]
new_id = new_id.replace(" ","%20")
response = await client.get(f"https://mammamia-urlo-boh3.hf.space/{new_id}/now")
data = response.json()
description = data['description'].replace("- EPG by epg-guide.com","").replace("No description","")
title = data['title']
print("MammaMia: EPG FOUND")
return description,title
except Exception as e:
print(e)
description = f'Watch {id}'
title = ""
return description,title
#async def test_animeworld():
async with httpx.AsyncClient() as client:
test_id = "rai-news" # Replace with actual ID
try:
results = await epg_guide(test_id, client)
print(results)
except httpx.HTTPStatusError as e:
print(f"HTTP error occurred: {e}")
except Exception as e:
print(f"An error occurred: {e}")
#if __name__ == "__main__":
import httpx
import asyncio
asyncio.run(test_animeworld())
+77 -33
View File
@@ -1,19 +1,15 @@
from tmdbv3api import TMDb, Movie, TV
import requests
from bs4 import BeautifulSoup,SoupStrainer
import string
import re
from datetime import datetime
import dateparser
from convert import get_TMDb_id_from_IMDb_id
from info import get_info_tmdb, is_movie, get_info_imdb
from convert_date import convert_US_date
import logging
import config
from Src.Utilities.convert import get_TMDb_id_from_IMDb_id
from Src.Utilities.info import get_info_tmdb, is_movie, get_info_imdb
from Src.Utilities.convert_date import convert_US_date
import Src.Utilities.config as config
FT_DOMAIN = config.FT_DOMAIN
WOA = 0
#Some basic headers
headers = {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.10; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3',
@@ -26,33 +22,49 @@ month_mapping = {
'Sep': 'Settembre', 'Oct': 'Ottobre', 'Nov': 'Novembre', 'Dec': 'Dicembre'
}
async def search(query,date,client):
response = await client.get(query).json()
async def search(query,date,client,season,ismovie):
response = await client.get(query)
response = response.json()
#Get link tid of every item and then open the link to see if the date = date
for json in response:
link = json['link']
tid = json['id']
series_response = await client.get(link, headers=headers, follow_redirects=True)
series_response = await client.get(link, headers=headers, allow_redirects=True, timeout = 30)
series_soup = BeautifulSoup(series_response.text, 'lxml')
release_span = series_soup.find('span', class_='released')
if release_span:
if release_span.text != "Data di uscita: N/A":
date_string = release_span.text.split(': ')[-1] # Get the date part
for eng, ita in month_mapping.items():
date_string = re.sub(rf'\b{eng}\b', ita, date_string)
release_date = date_string[-4:]
if WOA:
for eng, ita in month_mapping.items():
date_string = re.sub(rf'\b{eng}\b', ita, date_string)
# Swap to YY-MM-DD formatting using dateparser
release_date = dateparser.parse(date_string, languages=['it']).strftime("%Y-%m-%d")
release_date = dateparser.parse(date_string, languages=['it']).strftime("%Y-%m-%d")
if release_date == date:
url = link
tid = tid
return url, tid
if ismovie == 0:
Seasons = series_soup.find_all('span', class_="season-name")
i = 0
for item in Seasons:
season_text = item.text.strip()
if season in season_text and "SUB" not in season_text:
actual_season = i
return url, tid, actual_season
else:
i = i + 1
continue
else:
actual_season = None
return url, tid, actual_season
else:
print("Date are not equals")
print("")
def get_episode_link(season,episode,tid,url):
def get_episode_link(actual_season,episode,tid,url):
#Get the link from where we have to obtain mixdrop link
tlink = f'{url}?show_video=true&post_id={tid}&season_id={season-1}&episode_id={episode-1}'
tlink = f'{url}?show_video=true&post_id={tid}&season_id={actual_season}&episode_id={episode-1}'
return tlink
@@ -63,12 +75,11 @@ def get_film(url):
async def get_real_link(tlink,client):
#Some basic code to get the mixdrop link
page = await client.get(tlink, headers=headers, follow_redirects=True)
soup = BeautifulSoup(page.content(), features="lxml",parse_only=SoupStrainer('iframe'))
page = await client.get(tlink, headers=headers, allow_redirects=True)
soup = BeautifulSoup(page.content, features="lxml",parse_only=SoupStrainer('iframe'))
iframe_src = soup.find('iframe')['src']
iframe_page = await client.get(iframe_src, headers=headers, follow_redirects=True)
iframe_soup = BeautifulSoup(iframe_page.content(), features="lxml")
iframe_page = await client.get(iframe_src, headers=headers, allow_redirects=True, timeout = 30)
iframe_soup = BeautifulSoup(iframe_page.content, features="lxml")
mega_button = iframe_soup.find('div', attrs={'class': 'megaButton', 'rel': 'nofollow'}, string='MIXDROP')
if mega_button:
@@ -76,7 +87,7 @@ async def get_real_link(tlink,client):
return real_link
async def get_true_link(real_link,client):
response = await client.get(real_link, headers=headers, follow_redirects=True)
response = await client.get(real_link, headers=headers, allow_redirects=True,timeout = 30)
[s1, s2] = re.search(r"\}\('(.+)',.+,'(.+)'\.split", response.text).group(1, 2)
schema = s1.split(";")[2][5:-1]
terms = s2.split("|")
@@ -95,7 +106,7 @@ async def filmpertutti(imdb,client):
imdb_id = general[1]
type = "Filmpertutti"
if ismovie == 0 :
season = int(general[2])
season = general[2]
episode = int(general[3])
if "tt" in imdb:
if ismovie == 0:
@@ -103,8 +114,8 @@ async def filmpertutti(imdb,client):
showname,date = await get_info_imdb(imdb_id,ismovie,type,client)
else:
#THIS IS needed cause the only way to get all releases dates is by giving a tmdb ID not a IMDB
tmdba = await get_TMDb_id_from_IMDb_id(imdb_id,client)
showname,date = get_info_tmdb(tmdba,ismovie,type)
showname,date = await get_info_imdb(imdb_id,ismovie,type, client)
season = None
elif "tmdb" in imdb:
#Get showname and date
@@ -114,17 +125,16 @@ async def filmpertutti(imdb,client):
#Build the query
query = f'https://filmpertutti.{FT_DOMAIN}/wp-json/wp/v2/posts?search={showname}&page=1&_fields=link,id'
try:
url,tid = await search(query,date,client)
url,tid,actual_season = await search(query,date,client,season,ismovie)
except:
print("No results found")
print("MammaMia: No results found for Filmpertutti")
return None
if ismovie == 0:
episode_link = get_episode_link(season,episode,tid,url)
episode_link = get_episode_link(actual_season,episode,tid,url)
#Let's get mixdrop link
real_link = await get_real_link(episode_link,client)
#let's get delivery link, streaming link
streaming_link = await get_true_link(real_link,client)
print(streaming_link)
return streaming_link
elif ismovie == 1:
film_link = get_film(url)
@@ -132,5 +142,39 @@ async def filmpertutti(imdb,client):
real_link = await get_real_link(film_link,client)
#let's get delivery link, streaming link
streaming_link = await get_true_link(real_link,client)
print(streaming_link)
return streaming_link
'''
async def test_animeworld():
from curl_cffi.requests import AsyncSession
async with AsyncSession() as client:
# Replace with actual id, for example 'anime_id:episode' format
test_id = "tt4655480:1:1" # This is an example ID format
results = await filmpertutti(test_id, client)
if __name__ == "__main__":
import asyncio
asyncio.run(test_animeworld())
'''
'''
series_response = await client.get(link, headers=headers, follow_redirects=True)
series_soup = BeautifulSoup(series_response.text, 'lxml')
release_span = series_soup.find('span', class_='released')
if release_span:
if release_span.text != "Data di uscita: N/A":
date_string = release_span.text.split(': ')[-1] # Get the date part
for eng, ita in month_mapping.items():
date_string = re.sub(rf'\b{eng}\b', ita, date_string)
# Swap to YY-MM-DD formatting using dateparser
release_date = dateparser.parse(date_string, languages=['it']).strftime("%Y-%m-%d")
'''
+13 -17
View File
@@ -1,12 +1,8 @@
from tmdbv3api import TMDb, Movie, TV
import requests
import logging
from bs4 import BeautifulSoup,SoupStrainer
from datetime import datetime
import dateparser
from convert import get_TMDb_id_from_IMDb_id
from info import get_info_tmdb, is_movie, get_info_imdb
import config
from Src.Utilities.convert import get_TMDb_id_from_IMDb_id
from Src.Utilities.info import get_info_tmdb, is_movie, get_info_imdb
import Src.Utilities.config as config
import re
import json
LC_DOMAIN = config.LC_DOMAIN
@@ -36,14 +32,14 @@ async def search(showname,date,season,episode,ismovie,client):
'_': '1724421723999',
}
response = await client.get(f'https://lordchannel.{LC_DOMAIN}/live_search/', params=params, cookies=cookies, headers=headers, follow_redirects=True)
response = await client.get(f'https://lordchannel.{LC_DOMAIN}/live_search/', params=params, cookies=cookies, headers=headers, allow_redirects=True, impersonate = "chrome120")
data = json.loads(response.text)
for entry in data['data']:
if entry is not None: # check if the a_tag exists
href = entry['url']
quality = entry['qualit\u00e0_video']
link = f'https://lordchannel.{LC_DOMAIN}{href}'
response = await client.get(link, follow_redirects=True)
response = await client.get(link, allow_redirects=True, impersonate = "chrome120")
soup2 = BeautifulSoup(response.text,'lxml')
li_tag = soup2.select_one("ul.card__meta li:nth-of-type(2)")
if li_tag is not None: # check if the li_tag exists
@@ -60,11 +56,11 @@ async def search(showname,date,season,episode,ismovie,client):
video_url = episode.find('a').get('href')
return video_url,quality
else:
print("Sadly date are not equals")
print("")
continue
async def get_m3u8(video_url,client):
response = await client.get(video_url, follow_redirects=True)
response = await client.get(video_url, allow_redirects=True, impersonate = "chrome120")
pattern = r'const\s+videoData\s*=\s*\[(.*?)\];'
match = re.search(pattern, response.text)
if match:
@@ -96,20 +92,20 @@ async def lordchannel(imdb,client):
video_url,quality = await search(showname,date,season,episode,ismovie,client)
url = await get_m3u8(video_url,client)
url = url.replace('"','')
print(url)
print("MammaMia: Found results for LordChannel")
return url,quality
except:
print("Lordchannel Failed")
print("MammaMia: Lordchannel Failed")
return None,None
async def test_animeworld():
#async def test_animeworld():
async with httpx.AsyncClient() as client:
results = await lordchannel("tt16288804:1:1",client)
# print(results)
results = await lordchannel("tt6468322:1:1",client)
print(results)
if __name__ == "__main__":
#if __name__ == "__main__":
import httpx
import asyncio
asyncio.run(test_animeworld())
+3 -4
View File
@@ -1,19 +1,18 @@
import requests
from bs4 import BeautifulSoup
import json
from dictionaries import okru
from Src.Utilities.dictionaries import okru
async def okru_get_url(id,client):
embed_link = okru[id]
print(embed_link)
response = await client.get(embed_link, follow_redirects=True)
response = await client.get(embed_link, allow_redirects=True, impersonate = "chrome120")
soup = BeautifulSoup(response.text, 'lxml')
div = soup.find('div', {'data-module': 'OKVideo'})
data_options = div.get('data-options')
data = json.loads(data_options)
metadata = json.loads(data['flashvars']['metadata'])
m3u8_link = metadata['hlsMasterPlaylistUrl']
print(m3u8_link)
print("MammaMia: Found results for Okru")
return m3u8_link
@@ -1,46 +1,49 @@
from tmdbv3api import TMDb, Movie, TV
import logging
from bs4 import BeautifulSoup,SoupStrainer
from datetime import datetime
import dateparser
from convert import get_TMDb_id_from_IMDb_id
from info import get_info_tmdb, is_movie, get_info_imdb
import config
from bs4 import BeautifulSoup
from Src.Utilities.convert import get_TMDb_id_from_IMDb_id
from Src.Utilities.info import get_info_tmdb, is_movie, get_info_imdb
import Src.Utilities.config as config
import json
import random
import re
from urllib.parse import urlparse, parse_qs
from fake_headers import Headers
from Src.Utilities.loadenv import load_env
env_vars = load_env()
#Get domain
SC_DOMAIN= config.SC_DOMAIN
SC_FAST_SEARCH = config.SC_FAST_SEARCH
headers = {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.10; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3',
'Accept-Language': 'en-US,en;q=0.5'
}
SC_DOMAIN = config.SC_DOMAIN
Public_Instance = config.Public_Instance
Alternative_Link = env_vars.get('ALTERNATIVE_LINK')
headers = Headers()
#GET VERSION OF STREAMING COMMUNITY:
async def get_version(client):
#Extract the version from the main page of the site
try:
random_headers = headers.generate()
random_headers['Referer'] = "https://streamingcommunity.buzz/"
random_headers['Origin'] = "https://streamingcommunity.buzz"
base_url = f'https://streamingcommunity.{SC_DOMAIN}/richiedi-un-titolo'
response = await client.get(base_url, headers=headers, follow_redirects=True)
response = await client.get(base_url, headers=random_headers, allow_redirects = True, impersonate="chrome120")
#Soup the response
soup = BeautifulSoup(response.text, "lxml")
# Extract version
version = json.loads(soup.find("div", {"id": "app"}).get("data-page"))['version']
return version
except:
print("Couldn't find the version")
except Exception as e:
print("Couldn't find the version",e)
version = "65e52dcf34d64173542cd2dc6b8bb75b"
return version
async def search(query,date,ismovie, client):
async def search(query,date,ismovie, client,SC_FAST_SEARCH):
random_headers = headers.generate()
random_headers['Referer'] = "https://streamingcommunity.buzz/"
random_headers['Origin'] = "https://streamingcommunity.buzz"
#Do a request to get the ID of serie/move and it's slug in the URL
response = await client.get(query, follow_redirects=True)
response = await client.get(query, headers = random_headers, allow_redirects=True,impersonate = "chrome120")
print(response)
response = response.json()
for item in response['data']:
@@ -54,17 +57,17 @@ async def search(query,date,ismovie, client):
if type == ismovie:
#Added a Check to see if the result is what it is supposed to be
if SC_FAST_SEARCH == "0":
if ismovie == 0:
response = await client.get ( f'https://streamingcommunity.{SC_DOMAIN}/titles/{tid}-{slug}', follow_redirects=True)
pattern = r'<div[^>]*class="features"[^>]*>.*?<span[^>]*>(.*?)<\/span>'
match = re.search(pattern, response.text)
print(match.group(1).split("-")[0])
first_air_year = match.group(1).split("-")[0]
date = int(date)
first_air_year = int(first_air_year)
if first_air_year == date:
return tid,slug
elif ismovie == 1:
random_headers = headers.generate()
random_headers['Referer'] = "https://streamingcommunity.buzz/"
random_headers['Origin'] = "https://streamingcommunity.buzz"
response = await client.get ( f'https://streamingcommunity.{SC_DOMAIN}/titles/{tid}-{slug}', headers = random_headers, allow_redirects=True,impersonate = "chrome120")
pattern = r'<div[^>]*class="features"[^>]*>.*?<span[^>]*>(.*?)<\/span>'
match = re.search(pattern, response.text)
print(match.group(1).split("-")[0])
first_air_year = match.group(1).split("-")[0]
date = int(date)
first_air_year = int(first_air_year)
if first_air_year == date:
return tid,slug
elif SC_FAST_SEARCH == "1":
return tid,slug
@@ -73,15 +76,14 @@ async def search(query,date,ismovie, client):
async def get_film(tid,version,client):
headers = {
'user-agent': "Mozilla/5.0 (Windows NT 10.10; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537",
'x-inertia': 'true',
#Version of streaming community
'x-inertia-version': version
}
random_headers = headers.generate()
random_headers['Referer'] = "https://streamingcommunity.buzz/"
random_headers['Origin'] = "https://streamingcommunity.buzz"
random_headers['x-inertia'] = "true"
random_headers['x-inertia-version'] = version
#Access the iframe
url = f'https://streamingcommunity.{SC_DOMAIN}/iframe/{tid}'
response = await client.get(url, headers=headers, follow_redirects=True)
response = await client.get(url, headers=random_headers, allow_redirects=True,impersonate = "chrome120")
iframe = BeautifulSoup(response.text, 'lxml')
#Get the link of iframe
iframe = iframe.find('iframe').get("src")
@@ -89,8 +91,13 @@ async def get_film(tid,version,client):
vixid = iframe.split("/embed/")[1].split("?")[0]
parsed_url = urlparse(iframe)
query_params = parse_qs(parsed_url.query)
random_headers = headers.generate()
random_headers['Referer'] = "https://streamingcommunity.buzz/"
random_headers['Origin'] = "https://streamingcommunity.buzz"
random_headers['x-inertia'] = "true"
random_headers['x-inertia-version'] = version
#Get real token and expires by looking at the page in the iframe, vixcloud/embed
resp = await client.get(iframe, headers = headers, follow_redirects=True)
resp = await client.get(iframe, headers = random_headers, allow_redirects=True,impersonate= "chrome120")
soup= BeautifulSoup(resp.text, "lxml")
script = soup.find("body").find("script").text
token = re.search(r"'token':\s*'(\w+)'", script).group(1)
@@ -108,15 +115,14 @@ async def get_film(tid,version,client):
return url,url720,quality,
async def get_season_episode_id(tid,slug,season,episode,version,client):
random_headers = headers.generate()
random_headers['Referer'] = "https://streamingcommunity.buzz/"
random_headers['Origin'] = "https://streamingcommunity.buzz"
random_headers['x-inertia'] = "true"
random_headers['x-inertia-version'] = version
#Set some basic headers for the request
headers = {
'user-agent': "Mozilla/5.0 (Windows NT 10.10; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3",
'x-inertia': 'true',
#Version of streaming community
'x-inertia-version': version
}
#Get episode ID
response = await client.get(f'https://streamingcommunity.{SC_DOMAIN}/titles/{tid}-{slug}/stagione-{season}', headers=headers, follow_redirects=True)
response = await client.get(f'https://streamingcommunity.{SC_DOMAIN}/titles/{tid}-{slug}/stagione-{season}', headers=random_headers, allow_redirects=True, impersonate = "chrome120")
# Print the json got
json_response = response.json().get('props', {}).get('loadedSeason', {}).get('episodes', [])
for dict_episode in json_response:
@@ -125,28 +131,30 @@ async def get_season_episode_id(tid,slug,season,episode,version,client):
async def get_episode_link(episode_id,tid,version,client):
#The parameters for the request
random_headers = headers.generate()
random_headers['Referer'] = "https://streamingcommunity.buzz/"
random_headers['Origin'] = "https://streamingcommunity.buzz"
params = {
'episode_id': episode_id,
'next_episode': '1'
}
#Let's try to get the link from iframe source
# Make a request to get iframe source
response = await client.get(f"https://streamingcommunity.{SC_DOMAIN}/iframe/{tid}", params=params, follow_redirects=True)
response = await client.get(f"https://streamingcommunity.{SC_DOMAIN}/iframe/{tid}", params=params, headers = random_headers, allow_redirects=True, impersonate = "chrome120")
# Parse response with BeautifulSoup to get iframe source
soup = BeautifulSoup(response.text, "lxml")
iframe = soup.find("iframe").get("src")
vixid = iframe.split("/embed/")[1].split("?")[0]
headers = {
'user-agent': "Mozilla/5.0 (Windows NT 10.10; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537",
'x-inertia': 'true',
#Version of streaming community
'x-inertia-version': version
}
random_headers = headers.generate()
random_headers['Referer'] = "https://streamingcommunity.buzz/"
random_headers['Origin'] = "https://streamingcommunity.buzz"
random_headers['x-inertia'] = "true"
random_headers['x-inertia-version'] = version
parsed_url = urlparse(iframe)
query_params = parse_qs(parsed_url.query)
#Get real token and expires by looking at the page in the iframe, vixcloud/embed
resp = await client.get(iframe, headers = headers, follow_redirects=True)
resp = await client.get(iframe, headers = random_headers, allow_redirects=True, impersonate = "chrome120")
soup= BeautifulSoup(resp.text, "lxml")
script = soup.find("body").find("script").text
token = re.search(r"'token':\s*'(\w+)'", script).group(1)
@@ -164,17 +172,26 @@ async def get_episode_link(episode_id,tid,version,client):
return url,url720,quality
async def streaming_community(imdb,client):
async def streaming_community(imdb,client,SC_FAST_SEARCH):
try:
if Public_Instance == "1":
Weird_Link = json.loads(Alternative_Link)
link_post = random.choice(Weird_Link)
response = await client.get(f"{link_post}fetch-data/{imdb}")
url_streaming_community = response.headers.get('x-url-streaming-community')
url_720_streaming_community = response.headers.get('x-url-720-streaming-community')
quality_sc = response.headers.get('x-quality-sc')
print(quality_sc,url_streaming_community)
return url_streaming_community,url_720_streaming_community,quality_sc
general = is_movie(imdb)
ismovie = general[0]
imdb_id = general[1]
type = "StreamingCommunity"
if ismovie == 0 :
season = int(general[2])
episode = int(general[3])
#Check if fast search is enabled or disabled
if SC_FAST_SEARCH == "1":
type = "StreamingCommunityFS"
if "tt" in imdb:
#Get showname
showname = await get_info_imdb(imdb_id,ismovie,type,client)
@@ -186,34 +203,55 @@ async def streaming_community(imdb,client):
tmdba = imdb_id.replace("tmdb:","")
showname = get_info_tmdb(tmdba,ismovie,type)
elif SC_FAST_SEARCH == "0":
type = "StreamingCommunity"
tmdba = await get_TMDb_id_from_IMDb_id(imdb_id,client)
showname,date = get_info_tmdb(tmdba,ismovie,type)
#HERE THE CASE IF IT IS A MOVIE
else:
if "tt" in imdb:
#Get showname
date = None
showname = await get_info_imdb(imdb_id,ismovie,type,client)
else:
if SC_FAST_SEARCH == "1":
type = "StreamingCommunity"
if "tt" in imdb:
#Get showname
date = None
tmdba = imdb_id.replace("tmdb:","")
showname = get_info_tmdb(tmdba,ismovie,type)
showname = await get_info_imdb(imdb_id,ismovie,type,client)
else:
date = None
tmdba = imdb_id.replace("tmdb:","")
showname = get_info_tmdb(tmdba,ismovie,type)
elif SC_FAST_SEARCH == "0":
if "tt" in imdb:
#Get showname
showname,date = await get_info_imdb(imdb_id,ismovie,type,client)
else:
tmdba = imdb_id.replace("tmdb:","")
showname,date = get_info_tmdb(tmdba,ismovie,type)
showname = showname.replace(" ", "+").replace("–", "+").replace("—","+")
query = f'https://streamingcommunity.{SC_DOMAIN}/api/search?q={showname}'
tid,slug = await search(query,date,ismovie,client)
version = await get_version(client)
tid,slug = await search(query,date,ismovie,client,SC_FAST_SEARCH)
if ismovie == 1:
#TID means temporaly ID
url,url720,quality = await get_film(tid,version,client)
print(url)
print("MammaMia found results for StreamingCommunity")
return url,url720,quality
if ismovie == 0:
#Uid = URL ID
episode_id = await get_season_episode_id(tid,slug,season,episode,version,client)
url,url720,quality = await get_episode_link(episode_id,tid,version,client)
print(url)
print("MammaMia found results for StreamingCommunity")
return url,url720,quality
except Exception as e:
print("StreamingCommunity failed")
print("MammaMia: StreamingCommunity failed",e)
return None,None,None
async def test_animeworld():
from curl_cffi.requests import AsyncSession
async with AsyncSession() as client:
# Replace with actual id, for example 'anime_id:episode' format
test_id = "tt16288804:1:1" # This is an example ID format
results = await streaming_community(test_id, client,"0")
if __name__ == "__main__":
import asyncio
asyncio.run(test_animeworld())
@@ -1,12 +1,7 @@
from tmdbv3api import TMDb, Movie, TV
import requests
import logging
from bs4 import BeautifulSoup,SoupStrainer
from datetime import datetime
import dateparser
from convert import get_TMDb_id_from_IMDb_id
from info import get_info_tmdb, is_movie, get_info_imdb
import config
from Src.Utilities.convert import get_TMDb_id_from_IMDb_id
from Src.Utilities.info import get_info_tmdb, is_movie, get_info_imdb
import Src.Utilities.config as config
import re
import json
SW_DOMAIN = config.SW_DOMAIN
@@ -43,7 +38,7 @@ async def search(showname,season,episode,date,ismovie,client):
page_date = soup.find(id = 'search-cat-year').text.strip()
if page_date == date:
href = soup.find('a')['href']
response = await client.get(href, follow_redirects=True)
response = await client.get(href, allow_redirects=True, impersonate = "chrome120")
soup = BeautifulSoup(response.text,'lxml',parse_only=SoupStrainer('iframe'))
iframe = soup.find('iframe')
hdplayer = iframe.get('data-lazy-src')
@@ -51,11 +46,11 @@ async def search(showname,season,episode,date,ismovie,client):
return hdplayer
elif ismovie == 0:
#Some series have the name in english so we first search with the categories option and then we use the obtained ID to get all the episodes
id_response = await client.get(f'https://streamingwatch.{SW_DOMAIN}/wp-json/wp/v2/categories?search={showname}&_fields=id', follow_redirects=True)
id_response = await client.get(f'https://streamingwatch.{SW_DOMAIN}/wp-json/wp/v2/categories?search={showname}&_fields=id', allow_redirects=True, impersonate = "chrome120")
data = json.loads(id_response.text)
category_id = data[0]['id']
query = f'https://streamingwatch.{SW_DOMAIN}/wp-json/wp/v2/posts?categories={category_id}&per_page=100'
response = await client.get(query, follow_redirects=True)
response = await client.get(query, allow_redirects=True, impersonate = "chrome120")
data_json = response.text
data = json.loads(data_json)
for entry in data:
@@ -68,10 +63,9 @@ async def search(showname,season,episode,date,ismovie,client):
hdplayer = content[start:end]
return hdplayer
async def hls_url(hdplayer,client):
response = await client.get(hdplayer, follow_redirects=True)
response = await client.get(hdplayer, allow_redirects=True, impersonate = "chrome120")
match = re.search(r'sources:\s*\[\s*\{\s*file\s*:\s*"([^"]*)"', response.text)
url = match.group(1)
print(url)
return url
async def streamingwatch(imdb,client):
try:
@@ -97,7 +91,8 @@ async def streamingwatch(imdb,client):
showname = showname.replace(" ", "+").replace("–", "+").replace("—","+")
hdplayer = await search(showname,season,episode,date,ismovie,client)
url = await hls_url(hdplayer,client)
print("MammaMia: StreamingWatch found results for StreamingCommunity")
return url
except:
print("StreamingWatch Failed")
print("MammaMia: StreamingWatch Failed")
return None
+54 -39
View File
@@ -1,26 +1,23 @@
import requests
from bs4 import BeautifulSoup,SoupStrainer
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
from Src.Utilities.info import is_movie,get_info_imdb,get_info_tmdb
import Src.Utilities.config as config
from Src.Utilities.loadenv import load_env
HF = config.HF
env_vars = load_env()
PROXY_CREDENTIALS = env_vars.get('PROXY_CREDENTIALS')
TF_DOMAIN = config.TF_DOMAIN
async def search(showname,ismovie,date,client):
url = f'https://www.tanti.{TF_DOMAIN}/search/{showname}'
response = await client.get(url, follow_redirects=True)
soup = BeautifulSoup(response.text, "lxml")
showname = showname.replace(" ","%20")
url = f'https://www.tanti.bond/ajax/posts?q={showname}'
response = await client.post(url, allow_redirects=True, impersonate = "chrome120")
response = response.json()['data']
if ismovie == 1:
all_link = soup.select('#movies .col .list-media')
for link in all_link:
url = link['href']
response = client.get(url, follow_redirects=True)
for link in response:
url = link['url']
response = client.get(url, allow_redirects=True, impersonate = "chrome120")
pattern = r'Data di rilascio\s*</div>\s*<div class="text">\s*(\d{4})\s*</div>'
found_date = re.search(pattern, response.text)
release_date = str(found_date.group(1))
@@ -30,11 +27,10 @@ async def search(showname,ismovie,date,client):
#I try to get doodstream link inside this function so I do not have to get again the response
return tid,url
elif ismovie == 0:
all_link = soup.select('#series .col .list-media')
for link in all_link:
base_url = link['href']
for link in response:
base_url = link['url']
url = f'{base_url}-1-season-1-episode'
response = await client.get(url, follow_redirects=True)
response = await client.get(url, allow_redirects=True, impersonate = "chrome120")
pattern = r'Data di rilascio\s*</div>\s*<div class="text">\s*(\d{4})\s*</div>'
found_date = re.search(pattern, response.text)
release_date = str(found_date.group(1))
@@ -47,8 +43,9 @@ async def search(showname,ismovie,date,client):
return url,embed_id
async def fast_search(showname,ismovie,client):
showname = showname.replace(" ","%20")
url = f'https://www.tanti.{TF_DOMAIN}/search/{showname}'
response = await client.get(url, follow_redirects=True)
response = await client.get(url, allow_redirects=True, impersonate = "chrome120")
soup = BeautifulSoup(response.text, "lxml")
if ismovie == 1:
first_link = soup.select_one('#movies .col .list-media')
@@ -59,7 +56,7 @@ async def fast_search(showname,ismovie,client):
first_link = soup.select_one('#series .col .list-media')
base_url = first_link['href']
url = f'{base_url}-1-season-1-episode'
response = await client.get(url, follow_redirects=True)
response = await client.get(url, allow_redirects=True, impersonate = "chrome120")
soup = BeautifulSoup(response.text, 'lxml')
a_tag = soup.find('a', class_='dropdown-toggle btn-service selected')
embed_id = a_tag['data-embed']
@@ -69,14 +66,14 @@ async def fast_search(showname,ismovie,client):
async def get_protect_link(id,url,client):
#Get the link where the Iframe is located, which contains the doodstream url kind of.
response = await client.get(f"https://p.hdplayer.casa/myadmin/play.php?id={id}", follow_redirects=True)
response = await client.get(f"https://p.hdplayer.casa/myadmin/play.php?id={id}", allow_redirects=True, impersonate = "chrome120")
soup = BeautifulSoup(response.text, "lxml", parse_only=SoupStrainer('iframe'))
protect_link = soup.iframe['src']
if "protect" in protect_link:
return protect_link
else:
#DO this in case the movie has a 3D version etc
response = await client.get(url, follow_redirects=True)
response = await client.get(url, allow_redirects=True, impersonate = "chrome120")
soup = BeautifulSoup(response.text, 'lxml')
a_tag = soup.find('a', class_='dropdown-toggle btn-service selected')
embed_id = a_tag['data-embed']
@@ -91,7 +88,7 @@ async def get_protect_link(id,url,client):
ajax_url = f"https://www.tanti.{TF_DOMAIN}/ajax/embed"
response = await client.post(ajax_url, headers=headers, data=data)
hdplayer = response.text[43:-27]
response = await client.get(hdplayer, follow_redirects=True)
response = await client.get(hdplayer, allow_redirects=True, impersonate = "chrome120")
soup = BeautifulSoup(response.text, 'lxml')
links_dict = {}
li_tags = soup.select('ul.nav.navbar-nav li.dropdown')
@@ -103,7 +100,7 @@ async def get_protect_link(id,url,client):
if title == "1" or "Tantifilm" in title:
continue # Get the text of the <a> tag
href = a_tag['href']
response = await client.get(href, follow_redirects=True)
response = await client.get(href, allow_redirects=True, impersonate = "chrome120")
soup = BeautifulSoup(response.text, "lxml", parse_only=SoupStrainer('iframe'))
protect_link = soup.iframe['src']
if "protect" in protect_link:
@@ -125,19 +122,19 @@ async def get_nuovo_indirizzo_and_protect_link(url,embed_id,season,episode,clien
ajax_url = f"https://www.tanti.{TF_DOMAIN}/ajax/embed"
response = await client.post(ajax_url, headers=headers, data=data)
nuovo_indirizzo = response.text[43:-27]
response = await client.get(nuovo_indirizzo, follow_redirects=True)
response = await client.get(nuovo_indirizzo, allow_redirects=True, impersonate = "chrome120")
soup = BeautifulSoup(response.text, 'lxml')
#Get season
season = season - 1
li_tags = soup.select('ul.nav.navbar-nav > li.dropdown')
if len(li_tags) != 1:
link = li_tags[season].find('a')['href']
response = await client.get(link, follow_redirects=True)
response = await client.get(link, allow_redirects=True, impersonate = "chrome120")
soup = BeautifulSoup(response.text, 'lxml')
option_tag = soup.select(f'select[name="ep_select"] > option:nth-of-type({episode})')[0]
link = option_tag['value']
#Let's find protect link now
response = await client.get(link, follow_redirects=True)
response = await client.get(link, allow_redirects=True, impersonate = "chrome120")
soup = BeautifulSoup(response.text, "lxml", parse_only=SoupStrainer('iframe'))
protect_link = soup.iframe['src']
return protect_link
@@ -147,14 +144,13 @@ async def get_nuovo_indirizzo_and_protect_link(url,embed_id,season,episode,clien
option_tag = soup.select('select.dynamic_select > option')[episode]
link = option_tag['value']
#Let's find protect link now
response = await client.get(link, follow_redirects=True)
response = await client.get(link, allow_redirects=True, impersonate = "chrome120")
soup = BeautifulSoup(response.text, "lxml", parse_only=SoupStrainer('iframe'))
protect_link = soup.iframe['src']
return protect_link
async def true_url(protect_link,client):
print(protect_link)
# Define headers
headers = {
"Range": "bytes=0-",
@@ -166,9 +162,9 @@ async def true_url(protect_link,client):
"http": proxy,
"https": proxy
}
response = await client.get(protect_link, proxies=proxies, follow_redirects=True)
response = await client.get(protect_link, proxies=proxies, allow_redirects=True, impersonate = "chrome120")
else:
response = await client.get(protect_link, follow_redirects=True)
response = await client.get(protect_link, allow_redirects=True, impersonate = "chrome120")
link = response.url
@@ -186,10 +182,9 @@ async def true_url(protect_link,client):
if match:
# Create real link (match[0] includes all matched elements)
url =f'https://d000d.com{match[1]}'
print("MD5: ", url)
rebobo = await client.get(url, headers=headers, follow_redirects=True)
rebobo = await client.get(url, headers=headers, allow_redirects=True, impersonate = "chrome120")
real_url = f'{rebobo.text}123456789{match[2]}{real_time}'
print(real_url)
print("MammaMia: Found results for Tantifilm")
return real_url
else:
print("No match found in the text.")
@@ -201,30 +196,33 @@ async def true_url(protect_link,client):
#Get temporaly ID
async def tantifilm(imdb,client):
async def tantifilm(imdb,client,TF_FAST_SEARCH):
urls = None
try:
general = is_movie(imdb)
ismovie = general[0]
imdb_id = general[1]
type = "Tuttifilm"
if ismovie == 0 :
season = int(general[2])
episode = int(general[3])
if "tt" in imdb:
if TF_FAST_SEARCH == "0":
type = "Tantifilm"
showname,date = await get_info_imdb(imdb_id,ismovie,type,client)
url,embed_id = await search(showname,ismovie,date,client)
elif TF_FAST_SEARCH == "1":
type = "TantifilmFS"
showname = await get_info_imdb(imdb_id,ismovie,type,client)
url,embed_id = await fast_search(showname,ismovie,client)
else:
#else just equals them
tmdba = imdb_id.replace("tmdb:","")
if TF_FAST_SEARCH == "0":
type = "Tantifilm"
showname,date = get_info_tmdb(tmdba,ismovie,type)
url,embed_id = await search(showname,ismovie,date,client)
elif TF_FAST_SEARCH == "1":
type = "TantifilmFS"
showname= get_info_tmdb(tmdba,ismovie,type)
url,embed_id = await fast_search(showname,ismovie,client)
protect_link = await get_nuovo_indirizzo_and_protect_link(url,embed_id,season,episode,client)
@@ -234,20 +232,21 @@ async def tantifilm(imdb,client):
if "tt" in imdb:
#Get showname
if TF_FAST_SEARCH == "0":
type = "Tantifilm"
showname,date = await get_info_imdb(imdb_id,ismovie,type,client)
tid,url = await search(showname,ismovie,date,client)
elif TF_FAST_SEARCH == "1":
type = "TantifilmFS"
showname = await get_info_imdb(imdb_id,ismovie,type,client)
date = None
tid,url = await fast_search(showname,ismovie,client)
else:
#else just equals themtantifilm("tt2096673")
if TF_FAST_SEARCH == "0":
type = "Tantifilm"
showname,date = get_info_tmdb(imdb,ismovie,type)
tid,url = await search(showname,ismovie,date,client)
elif TF_FAST_SEARCH == "1":
type = "TantifilmFS"
showname = get_info_tmdb(imdb,ismovie,type)
tid,url = await fast_search(showname,ismovie,client)
protect_link = await get_protect_link(tid,url,client)
@@ -265,3 +264,19 @@ async def tantifilm(imdb,client):
except Exception as e:
print("Tantifilm Error: ", e)
return None
async def test_animeworld():
from curl_cffi.requests import AsyncSession
async with AsyncSession() as client:
# Replace with actual id, for example 'anime_id:episode' format
test_id = "tt6468322:1:1" # This is an example ID format
results = await tantifilm(test_id, client,"0")
if __name__ == "__main__":
import asyncio
asyncio.run(test_animeworld())
+47
View File
@@ -0,0 +1,47 @@
import random
import Src.Utilities.config as config
from Src.Utilities.dictionaries import webru_vary,webru_dlhd
from Src.Utilities.loadenv import load_env
env_vars = load_env()
MEDIAFLOW_PASS = env_vars.get('MEDIAFLOW_PASS')
Referer = "https://ilovetoplay.xyz/"
Origin = "https://ilovetoplay.xyz"
headers = {
"User-Agent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:127.0) Gecko/20100101 Firefox/127.0",
"Accept": "*/*",
"Accept-Language": "en-US,en;q=0.5",
"Accept-Encoding": "gzip, deflate, br, zstd",
"Origin": Origin,
"DNT": "1",
"Sec-GPC": "1",
"Connection": "keep-alive",
"Referer": Referer,
"Sec-Fetch-Dest": "empty",
"Sec-Fetch-Mode": "cors",
"Sec-Fetch-Site": "cross-site",
"Pragma": "no-cache",
"Cache-Control": "no-cache",
}
medialink = config.MediaProxy
async def get_stream_link(id,site,client):
try:
if site == "dlhd":
m3u8_url = webru_dlhd[id]
elif site == "vary":
m3u8_url = webru_vary[id]
response = await client.get(m3u8_url, headers=headers, allow_redirects=False, impersonate = "chrome120")
if response.status_code == 301:
stream_url = response.headers.get("Location", "")
return stream_url,Referer,Origin
except Exception as e:
return None
async def webru(id,site,client):
try:
stream_url, Referer,Origin = await get_stream_link(id,site,client)
mediaproxy = config.MediaProxy
medialink = random.choice(mediaproxy)
new_stream_url = f'{medialink}proxy/hls?key_url=https%3A%2F%2Fkey.mizhls.ru%2F&api_password={MEDIAFLOW_PASS}&d={stream_url}&h_Referer={Referer}&h_Origin={Origin}&h_User-Agent=Mozilla%2F5.0%20(Windows%20NT%2010.0%3B%20Win64%3B%20x64)%20AppleWebKit%2F537.36%20(KHTML%2C%20like%20Gecko)%20Chrome%2F58.0.3029.110%20Safari%2F537.3'
return new_stream_url
except Exception as e:
print("WebRu failed",e)
return None
+4 -10
View File
@@ -10,22 +10,16 @@ with open('config.json') as f:
SITE = config["Siti"]
FT_DOMAIN = SITE["Filmpertutti"]['domain']
SC_DOMAIN = SITE["StreamingCommunity"]['domain']
TF_DOMAIN = SITE["Tuttifilm"]['domain']
TF_DOMAIN = SITE["Tantifilm"]['domain']
LC_DOMAIN = SITE["LordChannel"]['domain']
SW_DOMAIN = SITE["StreamingWatch"]['domain']
AW_DOMAIN = SITE['AnimeWorld']['domain']
FILMPERTUTTI = SITE["Filmpertutti"]['enabled']
STREAMINGCOMMUNITY = SITE["StreamingCommunity"]['enabled']
MYSTERIUS = SITE["Mysterius"]['enabled']
TUTTIFILM = SITE["Tuttifilm"]['enabled']
LORDCHANNEL = SITE["LordChannel"]['enabled']
STREAMINGWATCH = SITE["StreamingWatch"]['enabled']
ANIMEWORLD = SITE['AnimeWorld']['enabled']
SC_FAST_SEARCH = SITE["StreamingCommunity"]['fast_search']
TF_FAST_SEARCH = SITE["Tuttifilm"]['fast_search']
MYSTERIUS = SITE['Mysterius']['enabled']
#General
GENERAL = config['General']
dotenv = GENERAL["load_env"]
HOST = GENERAL["HOST"]
PORT = GENERAL["PORT"]
HF = GENERAL["HF"]
Public_Instance = GENERAL["Public_Instance"]
MediaProxy = GENERAL["MediaProxy"]
+1 -4
View File
@@ -1,7 +1,4 @@
import requests
from tmdbv3api import TMDb, Movie, TV
from loadenv import load_env
import config
from Src.Utilities.loadenv import load_env
env_vars = load_env()
TMDB_KEY = env_vars.get('TMDB_KEY')
+846
View File
@@ -0,0 +1,846 @@
okru = {
"rai-1": "https://ok.ru/videoembed/7703488765552?nochat=1",
"rai-2": "https://ok.ru/videoembed/7805618364016?nochat=1",
"canale-5": "https://ok.ru/videoembed/7789978328688?nochat=1",
"italia-1": "https://ok.ru/videoembed/7393558339184?nochat=1",
"rai-premium": "https://ok.ru/videoembed/7363152715376?nochat=1",
"rai-movie": "https://ok.ru/videoembed/7384012693104?nochat=1",
"tv8": "https://ok.ru/videoembed/7681651777136?nochat=1",
"rsi-la-2": "https://ok.ru/videoembed/7681648107120?nochat=1"
}
STREAM = {
"channels": [
{
"id": "la7",
"title": "LA7",
"name": "HD/FHD",
"genres": ["La7"],
"poster": "https://upload.wikimedia.org/wikipedia/commons/thumb/0/02/LA7_-_Logo_2011.svg/1280px-LA7_-_Logo_2011.svg.png",
"url": "https://d3749synfikwkv.cloudfront.net/v1/master/3722c60a815c199d9c0ef36c5b73da68a62b09d1/cc-74ylxpgd78bpb/Live.m3u8"
},
{
"id": "rai-1",
"title": "Rai 1",
"name": "Full HD",
"genres": ["Rai"],
"poster": "https://i.imgur.com/OPV9jJD.png",
"url": "http://173.208.52.200/rai1/index.m3u8"
},
{
"id": "rai-2",
"title": "Rai 2",
"name": "Full HD",
"genres": ["Rai"],
"poster": "https://i.imgur.com/uHtYy8w.png",
"url": "http://173.208.52.200/rai2/index.m3u8"
},
{
"id": "rai-3",
"title": "Rai 3",
"name": "Full HD",
"genres": ["Rai"],
"poster": "https://i.imgur.com/iXst6me.png",
"url": "http://173.208.52.200/rai3/index.m3u8"
},
{
"id": "rai-4",
"title": "Rai 4",
"name": "Full HD",
"genres": ["Rai"],
"poster": "https://i.imgur.com/KGg3hvr.png",
"url": "http://173.208.52.200/rai4/index.m3u8"
},
{
"id": "rai-premium",
"title": "Rai Premium",
"name": "Full HD",
"genres": ["Rai"],
"poster": "https://www.sorrisi.com/guidatv/bundles/tvscnewsite/css/images/loghi/rai-premium_c.png",
"url": "https://mediapolis.rai.it/relinker/relinkerServlet.htm?cont=746992"
},
{
"id": "rai-4k",
"title": "Rai 4K",
"name": "4K",
"genres": ["Rai"],
"poster": "https://upload.wikimedia.org/wikipedia/commons/thumb/a/ad/Rai_4K_-_Logo_2016.svg/1920px-Rai_4K_-_Logo_2016.svg.png",
"url": "https://raievent10-elem-live.akamaized.net/hls/live/619189/raievent10/raievent10/playlist.m3u8"
},
{
"id": "rai-news",
"title": "Rai News",
"name": "",
"genres": ["Rai"],
"poster": "https://is1-ssl.mzstatic.com/image/thumb/Purple221/v4/31/05/eb/3105eb24-a953-7bb9-876d-0fcfb0a19055/AppIcon-0-0-1x_U007epad-0-10-0-0-85-220.png/1200x630wa.png",
"url": "https://streamcdnb4-8e7439fdb1694c8da3a0fd63e4dda518.msvdn.net/rainews1/hls/playlist_mo.m3u8"
},
{
"id": "rai-movie",
"title": "Rai Movie",
"name": "",
"genres": ["Rai"],
"poster": "https://www.sorrisi.com/guidatv/bundles/tvscnewsite/css/images/loghi/rai-movie_c.png",
"url": "https://m3u.iranvids.com/rai-movie/output.m3u8"
},
{
"id": "rai-sport",
"title": "Rai Sport",
"name": "",
"genres": ["Rai"],
"poster": "https://www.sorrisi.com/guidatv/bundles/tvscnewsite/css/images/loghi/rai-sport_c.png",
"url": "https://m3u.iranvids.com/rai-sport01/output.m3u8"
},
{
"id": "rete-4",
"title": "Rete 4",
"name": "Full HD",
"genres": ["Mediaset"],
"poster": "https://upload.wikimedia.org/wikipedia/commons/thumb/5/5f/Rete_4_2018.svg/1024px-Rete_4_2018.svg.png",
"url": "http://173.208.52.200/rete4/index.m3u8"
},
{
"id": "euronews",
"title": "Euronews",
"name": "720p",
"genres": ["Euronews"],
"poster": "https://yt3.googleusercontent.com/t3slq37NYJRuP2UoEZDoPKyMClKyQULG8-j2DEfzL1XXcBvFpR6z6HD7rtc0wDn8Mqt0OtpU=s900-c-k-c0x00ffffff-no-rj",
"url": "https://rakuten-euronews-3-it.samsung.wurl.tv/manifest/playlist.m3u8"
},
{
"id": "canale-5",
"title": "Canale 5",
"name": "Full HD",
"genres": ["Mediaset"],
"poster": "https://www.sorrisi.com/guidatv/bundles/tvscnewsite/css/images/loghi/canale-5_c.png",
"url": "http://173.208.52.200/canale5/index.m3u8"
},
{
"id": "italia-1",
"title": "Italia 1",
"name": "Full HD",
"genres": ["Mediaset"],
"poster": "https://upload.wikimedia.org/wikipedia/en/thumb/e/e2/Italia_1.svg/1024px-Italia_1.svg.png",
"url": "http://173.208.52.200/italia1/index.m3u8"
},
{
"id": "topcrime",
"title": "Top Crime",
"name": "HD/FHD",
"genres": ["Mediaset"],
"poster": "https://www.sorrisi.com/guidatv/bundles/tvscnewsite/css/images/loghi/top-crime_c.png",
"url": "https://live02-seg.msf.cdn.mediaset.net/live/ch-lt/lt-clr.isml/index.m3u8"
},
{
"id": "mediaset-extra",
"title": "Mediaset Extra",
"name": "HD/FHD",
"genres": ["Mediaset"],
"poster": "https://www.sorrisi.com/guidatv/bundles/tvscnewsite/css/images/loghi/mediaset-extra_c.png",
"url": "https://live02-seg.msf.cdn.mediaset.net/live/ch-kq/kq-clr.isml/index.m3u8"
},
{
"id": "focus",
"title": "Focus",
"name": "HD/FHD",
"genres": ["Mediaset"],
"poster": "https://upload.wikimedia.org/wikipedia/commons/d/d0/Focus_channel.png",
"url": "https://live02-seg.msf.cdn.mediaset.net/live/ch-fu/fu-clr.isml/index.m3u8"
},
{
"id": "boing",
"title": "Boing",
"name": "HD/FHD",
"genres": ["Mediaset"],
"poster": "https://upload.wikimedia.org/wikipedia/commons/8/8c/Logo_Boing.png",
"url": "https://live02-seg.msf.cdn.mediaset.net/live/ch-kb/kb-clr.isml/index.m3u8"
},
{
"id": "cartoonito",
"title": "Cartoonito",
"name": "HD/FHD",
"genres": ["Mediaset"],
"poster": "https://upload.wikimedia.org/wikipedia/commons/thumb/a/a5/Cartoonito_-_Logo_2021.svg/1920px-Cartoonito_-_Logo_2021.svg.png",
"url": "https://live02-seg.msf.cdn.mediaset.net/live/ch-la/la-clr.isml/index.m3u8"
},
{
"id": "history",
"title": "History",
"name": "",
"genres": ["A+E"],
"poster": "https://www.sorrisi.com/guidatv/bundles/tvscnewsite/css/images/loghi/history_c.png"
},
{
"id": "comedy-central",
"title": "Comedy Central",
"name": "",
"genres": ["Paramount"],
"poster": "https://www.sorrisi.com/guidatv/bundles/tvscnewsite/css/images/loghi/comedy-central_c.png"
},
{
"id": "sky-tg-24",
"title": "Sky TG24",
"name": "",
"genres": ["Sky"],
"poster": "https://images-na.ssl-images-amazon.com/images/I/512j1jeZaHL.png",
"url": "https://hlslive-web-gcdn-skycdn-it.akamaized.net/TACT/12221/web/master.m3u8?hdnts=st=1701861650~exp=1765449000~acl=/*~hmac=84c9f3f71e57b13c3a67afa8b29a8591ea9ed84bf786524399545d94be1ec04d"
},
{
"id": "tv8",
"title": "TV8",
"name": "SD",
"genres": ["Sky"],
"poster": "https://upload.wikimedia.org/wikipedia/commons/9/9a/TV8_logo.png",
"url": "https://hlslive-web-gcdn-skycdn-it.akamaized.net/TACT/11223/tv8web/master.m3u8?hdnea=st=1701861650~exp=1765449000~acl=/*~hmac=84c9f3f71e57b13c3a67afa8b29a8591ea9ed84bf786524399545d94be1ec04d"
},
{
"id": "cielo",
"title": "Cielo",
"name": "SD",
"genres": ["Sky"],
"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"
},
{
"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": "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",
"title": "DMAX",
"name": "",
"genres": ["Warner Bros"],
"poster": "https://www.sorrisi.com/guidatv/bundles/tvscnewsite/css/images/loghi/d-max_c.png",
"url": "https://amg16146-wbdi-amg16146c8-samsung-it-1841.playouts.now.amagi.tv/playlist/amg16146-warnerbrosdiscoveryitalia-dmax-samsungit/playlist.m3u8"
},
{
"id": "foodnetwork",
"title": "Food Network",
"name": "",
"genres": ["Warner Bros"],
"poster":"https://upload.wikimedia.org/wikipedia/commons/thumb/0/06/Food_Network_logo.svg/1024px-Food_Network_logo.svg.png",
"url": "https://amg16146-wbdi-amg16146c3-samsung-it-1836.playouts.now.amagi.tv/playlist/amg16146-warnerbrosdiscoveryitalia-foodnetwork-samsungit/playlist.m3u8"
},
{
"id": "frisbee",
"title": "Frisbee",
"name": "",
"genres": ["Warner Bros"],
"poster": "https://upload.wikimedia.org/wikipedia/commons/thumb/9/9a/FRISBEE_LOGO_2015.png/1280px-FRISBEE_LOGO_2015.png",
"url": "https://amg16146-wbdi-amg16146c7-samsung-it-1840.playouts.now.amagi.tv/playlist/amg16146-warnerbrosdiscoveryitalia-frisbee-samsungit/playlist.m3u8"
},
{
"id": "giallo",
"title": "Giallo",
"name": "",
"genres": ["Warner Bros"],
"poster": "https://www.sorrisi.com/guidatv/bundles/tvscnewsite/css/images/loghi/giallo_c.png",
"url": "https://amg16146-wbdi-amg16146c5-samsung-it-1838.playouts.now.amagi.tv/playlist/amg16146-warnerbrosdiscoveryitalia-giallo-samsungit/playlist.m3u8"
},
{
"id": "hgtv",
"title": "HGTV",
"name": "",
"genres": ["Warner Bros"],
"poster": "https://upload.wikimedia.org/wikipedia/commons/thumb/a/a8/HGTV_2010.svg/1920px-HGTV_2010.svg.png",
"url": "https://amg16146-wbdi-amg16146c9-samsung-it-1842.playouts.now.amagi.tv/playlist/amg16146-warnerbrosdiscoveryitalia-hgtv-samsungit/playlist.m3u8"
},
{
"id": "k2",
"title": "K2",
"name": "",
"genres": ["Warner Bros"],
"poster": "https://upload.wikimedia.org/wikipedia/it/thumb/7/70/K2_logo_%282013%29.svg/800px-K2_logo_%282013%29.svg.png",
"url": "https://amg16146-wbdi-amg16146c6-samsung-it-1839.playouts.now.amagi.tv/playlist/amg16146-warnerbrosdiscoveryitalia-k2-samsungit/playlist.m3u8"
},
{
"id": "nove",
"title": "Nove",
"name": "",
"genres": ["Warner Bros"],
"poster": "https://www.sorrisi.com/guidatv/bundles/tvscnewsite/css/images/loghi/nove_c.png",
"url": "https://amg16146-wbdi-amg16146c1-samsung-it-1831.playouts.now.amagi.tv/playlist/amg16146-warnerbrosdiscoveryitalia-nove-samsungit/playlist.m3u8"
},
{
"id": "realtime",
"title": "Real Time",
"name": "",
"genres": ["Warner Bros"],
"poster": "https://www.sorrisi.com/guidatv/bundles/tvscnewsite/css/images/loghi/real-time_c.png",
"url": "https://amg16146-wbdi-amg16146c2-samsung-it-1835.playouts.now.amagi.tv/playlist/amg16146-warnerbrosdiscoveryitalia-realtime-samsungit/playlist.m3u8"
},
{
"id": "supertennis",
"title": "Super Tennis",
"name": "",
"genres": ["FIT"],
"poster": "https://upload.wikimedia.org/wikipedia/commons/0/02/SUPERTENNIS_HD.png",
"url": "https://live-embed.supertennix.hiway.media/restreamer/supertennix_client/gpu-a-c0-16/restreamer/rtmp/hls/h24_supertennix/manifest.m3u8"
},
{
"id": "solocalcio",
"title": "Solo Calcio",
"name": "",
"genres": ["Sportitalia"],
"poster": "https://upload.wikimedia.org/wikipedia/commons/thumb/7/77/SI_Live_24_logo_%282019%29.svg/1280px-SI_Live_24_logo_%282019%29.svg.png",
"url": "https://di-kzbhv8pw.vo.lswcdn.net/sportitalia/sisolocalcio/playlist.m3u8"
},
{
"id": "sportitalia",
"title": ["Sportitalia"],
"name": "",
"genres": ["Sportitalia"],
"poster": "https://upload.wikimedia.org/wikipedia/en/5/55/Sportitalia.jpg",
"url": "https://di-kzbhv8pw.vo.lswcdn.net/sportitalia/sihd/playlist.m3u8"
},
{
"id": "sportitalia24",
"title": "Sportitalia 24",
"name": "",
"genres": ["Sportitalia"],
"poster": "https://upload.wikimedia.org/wikipedia/commons/thumb/7/77/SI_Live_24_logo_%282019%29.svg/1280px-SI_Live_24_logo_%282019%29.svg.png",
"url": "https://di-kzbhv8pw.vo.lswcdn.net/sportitalia/sihd/playlist.m3u8"
},
{
"id": "rsi-la-2",
"title": "RSI LA 2",
"name": "",
"genres": ["RSI"],
"poster": "https://livehere.one/img/rsi.png"
},
{
"id": "baby-shark-tv",
"title": "Baby Shark TV",
"name": "",
"genres": ["Rakuten"],
"poster": "https://flxt.tmsimg.com/assets/p19459897_b_v13_aa.jpg",
"url": "https://c0c65b821b3542c3a4dca92702f59944.mediatailor.us-east-1.amazonaws.com/v1/master/04fd913bb278d8775298c26fdca9d9841f37601f/RakutenTV-eu_BabySharkTV/playlist.m3u8?ads.content_classification=6&ads.device_lmt=1&ads.device_make=&ads.device_model=&ads.device_type=web&ads.device_year=&ads.env=prod&ads.gdpr_consent=&ads.market=it&ads.player_height=&ads.player_width=&ads.pod_type=playerpage_midroll&ads.ppid=&ads.rtv_content_id=3623&ads.rtv_content_language=eng&ads.rtvid=271861&ads.streaming_id=17ded124-30eb-47bc-ab57-ddfce3a16599&ads.user_type=visitor&ads.wurl_channel=696"
},
{
"id": "adrenaline-movies",
"title": "Rakuten Adrenaline Movies",
"name": "",
"genres": ["Rakuten"],
"poster": "https://tvpnlogopeu.samsungcloud.tv/platform/image/sourcelogo/vc/00/02/34/ITBC11000050E_20231213T033148SQUARE.png_20231213033148.png",
"url": "https://minerva-fullmoon-1-eu.plex.wurl.tv/4300.m3u8"
},
{
"id": "bizzarro-movies",
"title": "Bizzarro Movies",
"name": "",
"genres": ["Rakuten"],
"poster": "https://tvpnlogopeu.samsungcloud.tv/platform/image/sourcelogo/vc/00/02/34/ITBA3300024IU_20240214T034959SQUARE.png_20240214034959.png",
"url": "https://minerva-bizzarromovies-1-eu.plex.wurl.tv/4300.m3u8"
},
{
"id": "cinema-italiano",
"title": "Cinema Italiano",
"name": "",
"genres": ["Rakuten"],
"poster": "https://tvpnlogopeu.samsungcloud.tv/platform/image/sourcelogo/vc/00/02/34/ITBA33000238E_20240313T074122SQUARE.png",
"url": "https://minerva-cinemasegreto-1-eu.plex.wurl.tv/4300.m3u8"
},
{
"id": "le-vite-degli-altri",
"title": "Le Vite Degli Altri",
"name": "",
"genres": ["Rakuten"],
"poster": "https://tvpnlogopeu.samsungcloud.tv/platform/image/sourcelogo/vc/00/02/34/ITBD3200002DU_20230913T031625SQUARE.png_20230913031625.png",
"url": "https://amg02512-nexodigital-amg02512c2-wedotv-eu-869.playouts.now.amagi.tv/playlist/amg02512-nexodigital-levitedeglialtri-wedotveu/playlist.m3u8"
},
{
"id": "dark-matter",
"title": "Dark Matter",
"name": "",
"genres": ["Rakuten"],
"poster": "https://tvpnlogopeu.samsungcloud.tv/platform/image/sourcelogo/vc/00/02/34/ITBC400001LX_20220404T005859SQUARE.png_20220404005901.png",
"url": "https://d39g1vxj2ef6in.cloudfront.net/v1/master/3fec3e5cac39a52b2132f9c66c83dae043dc17d4/prod-rakuten-stitched/master.m3u8?ads.xumo_channelId=88883020&ads.xumo_contentId=3480"
},
{
"id": "cine-western",
"title": "Cine Western",
"name": "",
"genres": ["Rakuten"],
"poster": "https://tvpnlogopeu.samsungcloud.tv/platform/image/sourcelogo/vc/00/02/34/ITBB20000072M_20240214T035001SQUARE.png_20240214035002.png",
"url": "https://minerva-wp-1-eu.plex.wurl.tv/4300.m3u8"
},
{
"id": "serie-crime",
"title": "Serie Crime",
"name": "",
"genres": ["Rakuten"],
"poster": "https://images-2.rakuten.tv/storage/global-live-channel/translation/artwork-negative/0e0a6638-7c4c-4065-82d7-a34d818388ee-width500.png",
"url": "https://rakuten-seriecrime-6-it.xiaomi.wurl.tv/4300.m3u8"
},
{
"id": "filmrise-sci-fi",
"title": "Filmrise Sci-Fi",
"name": "",
"genres": ["Rakuten"],
"poster": "https://images-3.rakuten.tv/storage/global-live-channel/translation/artwork_negative/ba0fa0a9-7e17-497e-abcc-9405dbb3a7f5-filmrise-sci-fi-1643623368-quality100.png",
"url": "https://d39g1vxj2ef6in.cloudfront.net/v1/master/3fec3e5cac39a52b2132f9c66c83dae043dc17d4/prod-rakuten-stitched/master.m3u8?ads.xumo_channelId=9991764"
},
{
"id": "doctor-who",
"title": "Doctor Who",
"name": "",
"genres": ["Rakuten"],
"poster": "https://images.pluto.tv/channels/62e7f8db27ce19000732d1aa/colorLogoPNG.png",
"url": "https://bbceu-doctorwho-1-it.rakuten.wurl.tv/3000.m3u8"
},
{
"id": "bbc-drama",
"title": "BBC Drama",
"name": "",
"genres": ["Rakuten"],
"poster": "https://images.pluto.tv/channels/62e7fa5ab5062e0007dcf97d/colorLogoPNG.png",
"url": "https://bbceu-bbcdrama-2-it.rakuten.wurl.tv/3000.m3u8"
},
{
"id": "documentari",
"title": "Documentari (Grandi Documentari)",
"name": "",
"genres": ["Rakuten"],
"poster": "https://tvpnlogopeu.samsungcloud.tv/platform/image/sourcelogo/vc/00/02/34/ITBC35000016T_20230208T013151SQUARE.png_20230208013152.png",
"url": "https://videosolutions-wedobigstories-rakuten.amagi.tv/playlist1080p.m3u8"
},
{
"id": "house-of-docs",
"title": "House of Docs",
"name": "",
"genres": ["Rakuten"],
"poster": "https://tvpnlogopeu.samsungcloud.tv/platform/image/sourcelogo/vc/00/02/34/ITBD1100001B7_20230412T042554SQUARE.png_20230412042554.png",
"url": "https://amg02512-nexodigital-amg02512c1-wedotv-eu-871.playouts.now.amagi.tv/playlist/amg02512-nexodigital-houseofdocs-wedotveu/playlist.m3u8"
},
{
"id": "pluto-matrimoni",
"title": "Pluto TV Matrimoni",
"name": "",
"genres": ["Pluto"],
"poster": "https://images.pluto.tv/channels/661f8f2506839f0008b864e9/colorLogoPNG.png",
"url": "http://stitcher.pluto.tv/v1/stitch/embed/hls/channel/661f8f2506839f0008b864e9/master.m3u8?deviceId=0&deviceModel=samsung&deviceVersion=0&appVersion=0&deviceType=samsung&deviceMake=samsung&deviceDNT=true"
},
{
"id": "the-asylum",
"title": "The Asylum",
"name": "",
"genres": ["Pluto"],
"poster": "https://images.pluto.tv/channels/62e8d5369e48940007fc1dc1/colorLogoPNG.png",
"url": "http://stitcher.pluto.tv/v1/stitch/embed/hls/channel/62e8d5369e48940007fc1dc1/master.m3u8?deviceType=samsung-tvplus&deviceMake=samsung&deviceModel=samsung&deviceVersion=unknown&appVersion=unknown&deviceLat=0&deviceLon=0&deviceDNT=%7BTARGETOPT%7D&deviceId=%7BPSID%7D&advertisingId=%7BPSID%7D&us_privacy=1YNY&samsung_app_domain=%7BAPP_DOMAIN%7D&samsung_app_name=%7BAPP_NAME%7D&profileLimit=&profileFloor=&embedPartner=samsung-tvplus"
},
{
"id": "western",
"title": "Western",
"name": "",
"genres": ["Pluto"],
"poster": "https://images.pluto.tv/channels/62e7fb67478a5b0007e6c50c/colorLogoPNG.png",
"url": "http://stitcher.pluto.tv/v1/stitch/embed/hls/channel/62e7fb67478a5b0007e6c50c/master.m3u8?deviceType=samsung-tvplus&deviceMake=samsung&deviceModel=samsung&deviceVersion=unknown&appVersion=unknown&deviceLat=0&deviceLon=0&deviceDNT=%7BTARGETOPT%7D&deviceId=%7BPSID%7D&advertisingId=%7BPSID%7D&us_privacy=1YNY&samsung_app_domain=%7BAPP_DOMAIN%7D&samsung_app_name=%7BAPP_NAME%7D&profileLimit=&profileFloor=&embedPartner=samsung-tvplus"
},
{
"id": "consulenze-illegali",
"title": "Consulenze Illegali",
"name": "",
"genres": ["Pluto"],
"poster": "https://images.pluto.tv/channels/60b9dc99521a1400079bdfba/colorLogoPNG.png",
"url": "http://stitcher.pluto.tv/v1/stitch/embed/hls/channel/60b9dc99521a1400079bdfba/master.m3u8?deviceType=samsung-tvplus&deviceMake=samsung&deviceModel=samsung&deviceVersion=unknown&appVersion=unknown&deviceLat=0&deviceLon=0&deviceDNT=%7BTARGETOPT%7D&deviceId=%7BPSID%7D&advertisingId=%7BPSID%7D&us_privacy=1YNY&samsung_app_domain=%7BAPP_DOMAIN%7D&samsung_app_name=%7BAPP_NAME%7D&profileLimit=&profileFloor=&embedPartner=samsung-tvplus"
}
]
}
webru_vary = {
"sky-cinema-action": "https://webuit.mizhls.ru/lb/calcioXac/index.m3u8",
"comedy-central": "https://webuit.mizhls.ru/lb/calcioXcomedycentral/index.m3u8",
"history": "https://webuit.mizhls.ru/lb/calcioXhistory/index.m3u8",
"sky-arte": "https://webuit.mizhls.ru/lb/calcioXskyarte/index.m3u8",
"sky-atlantic": "https://webuit.mizhls.ru/lb/calcioXskyatlantic/index.m3u8",
"sky-cinema-collection": "https://webuit.mizhls.ru/lb/calcioXskycinemacollection/index.m3u8",
"sky-cinema-comedy": "https://webuit.mizhls.ru/lb/calcioXskycinemacomedy/index.m3u8",
"sky-cinema-drama": "https://webuit.mizhls.ru/lb/calcioXskycinemadrama/index.m3u8",
"sky-cinema-due": "https://webuit.mizhls.ru/lb/calcioXskycinemadue/index.m3u8",
"sky-cinema-family": "https://webuit.mizhls.ru/lb/calcioXskycinemafamily/index.m3u8",
"sky-cinema-romance": "https://webuit.mizhls.ru/lb/calcioXskycinemaromance/index.m3u8",
"sky-cinema-suspence": "https://webuit.mizhls.ru/lb/calcioXskycinemasuspence/index.m3u8",
"sky-cinema-uno": "https://webuit.mizhls.ru/lb/calcioXskycinemauno/index.m3u8",
"sky-crime": "https://webuit.mizhls.ru/lb/calcioXskycrime/index.m3u8",
"sky-documentaries": "https://webuit.mizhls.ru/lb/calcioXskydocumentaries/index.m3u8",
"sky-investigation": "https://webuit.mizhls.ru/lb/calcioXskyinvestigation/index.m3u8",
"sky-nature": "https://webuit.mizhls.ru/lb/calcioXskynature/index.m3u8",
"sky-serie": "https://webuit.mizhls.ru/lb/calcioXskyserie/index.m3u8",
"sky-uno": "https://webuit.mizhls.ru/lb/calcioXskyuno/index.m3u8",
"sky-sport-24": "https://webuit.mizhls.ru/lb/calcioXskysport24/index.m3u8",
"sky-sport-golf": "https://webuit.mizhls.ru/lb/calcioXskysportgolf/index.m3u8",
"sky-sport-251": "https://webuit.mizhls.ru/lb/calcioXskysport251/index.m3u8",
"sky-sport-253": "https://webuit.mizhls.ru/lb/calcioXskysport253/index.m3u8",
"sky-sport-max": "https://webuit.mizhls.ru/lb/calcioXskysportmax/index.m3u8",
"sky-sport-255": "https://webuit.mizhls.ru/lb/calcioXskysport255/index.m3u8",
"sky-sport-259": "https://webuit.mizhls.ru/lb/calcioXsky259/index.m3u8",
"sky-sport-252": "https://webuit.mizhls.ru/lb/calcioXskysport252/index.m3u8",
"sky-sport-254": "https://webuit.mizhls.ru/lb/calcioXskysport254/index.m3u8",
"sky-sport-256": "https://webuit.mizhls.ru/lb/calcioXskysport256/index.m3u8",
"sky-sport-257": "https://webuit.mizhls.ru/lb/calcioXskysport257/index.m3u8",
"sky-sport-258": "https://webuit.mizhls.ru/lb/calcioXsky258/index.m3u8",
"sky-sport-259": "https://webuit.mizhls.ru/lb/calcioXsky259/index.m3u8",
"sky-sport-260": "https://webuit.mizhls.ru/lb/calcioXsky260/index.m3u8",
"sky-sport-261": "https://webuit.mizhls.ru/lb/calcioXsky261/index.m3u8",
"eurosport-1": "https://webuit.mizhls.ru/lb/calcioXeurosport1/index.m3u8",
"eurosport-2": "https://webuit.mizhls.ru/lb/calcioXeurosport2/index.m3u8",
"sky-sport-uno": "https://webuit.mizhls.ru/lb/calcioXskysportuno/index.m3u8",
"sky-sport-f1": "https://webuit.mizhls.ru/lb/calcioXskysportf1/index.m3u8",
"sky-sport-motogp": "https://webuit.mizhls.ru/lb/calcioXskysportmotogp/index.m3u8",
"sky-sport-calcio": "https://webuit.mizhls.ru/lb/calcioXskysportcalcio/index.m3u8",
"sky-sport-arena": "https://webuit.mizhls.ru/lb/calcioXskysportarena/index.m3u8",
"sky-sport-tennis": "https://webuit.mizhls.ru/lb/calcioXskysporttennis/index.m3u8",
"sky-sport-nba": "https://webuit.mizhls.ru/lb/calcioXskysportnba/index.m3u8",
"dazn-zona-a": "https://webuit.mizhls.ru/lb/calcioXzona/index.m3u8"
}
webru_dlhd = {
"sky-sport-tennis": "https://webhdrunns.mizhls.ru/lb/premium576/index.m3u8",
"sky-sport-uno": "https://webhdrunns.mizhls.ru/lb/premium461/index.m3u8",
"sky-cinema-collection": "https://webhdrunns.mizhls.ru/lb/premium859/index.m3u8",
"sky-cinema-romance": "https://webhdrunns.mizhls.ru/lb/premium864/index.m3u8",
"sky-sport-24": "https://webhdrunns.mizhls.ru/lb/premium869/index.m3u8",
"sky-sport-254": "https://webhdrunns.mizhls.ru/lb/premium874/index.m3u8",
"sky-sport-f1": "https://webhdrunns.mizhls.ru/lb/premium577/index.m3u8",
"sky-sport-arena": "https://webhdrunns.mizhls.ru/lb/premium462/index.m3u8",
"sky-cinema-uno": "https://webhdrunns.mizhls.ru/lb/premium860/index.m3u8",
"sky-cinema-family": "https://webhdrunns.mizhls.ru/lb/premium865/index.m3u8",
"sky-sport-calcio": "https://webhdrunns.mizhls.ru/lb/premium870/index.m3u8",
"sky-sport-255": "https://webhdrunns.mizhls.ru/lb/premium875/index.m3u8",
"sky-cinema-action": "https://webhdrunns.mizhls.ru/lb/premium861/index.m3u8",
"sky-cinema-due": "https://webhdrunns.mizhls.ru/lb/premium866/index.m3u8",
"sky-sport-251": "https://webhdrunns.mizhls.ru/lb/premium871/index.m3u8",
"sky-sport-256": "https://webhdrunns.mizhls.ru/lb/premium876/index.m3u8",
"sky-sport-golf": "https://webhdrunns.mizhls.ru/lb/premium574/index.m3u8",
"sky-uno": "https://webhdrunns.mizhls.ru/lb/premium881/index.m3u8",
"sky-cinema-comedy": "https://webhdrunns.mizhls.ru/lb/premium862/index.m3u8",
"sky-cinema-drama": "https://webhdrunns.mizhls.ru/lb/premium867/index.m3u8",
"sky-sport-252": "https://webhdrunns.mizhls.ru/lb/premium872/index.m3u8",
"sky-sport-257": "https://webhdrunns.mizhls.ru/lb/premium877/index.m3u8",
"sky-sport-motogp": "https://webhdrunns.mizhls.ru/lb/premium575/index.m3u8",
"sky-sport-football": "https://webhdrunns.mizhls.ru/lb/premium460/index.m3u8",
"sky-cinema-uno-24": "https://webhdrunns.mizhls.ru/lb/premium863/index.m3u8",
"sky-cinema-suspence": "https://webhdrunns.mizhls.ru/lb/premium868/index.m3u8",
"sky-sport-253": "https://webhdrunns.mizhls.ru/lb/premium873/index.m3u8",
"sky-serie": "https://webhdrunns.mizhls.ru/lb/premium880/index.m3u8"
}
extra_sources = {
"rai-1": ["https://m3u.iranvids.com/rai01/output.m3u8"],
"rai-2": ["https://m3u.iranvids.com/rai02/output.m3u8"],
"rai-3": ["https://dash2.antik.sk/live/test_rai_tre_tizen/playlist.m3u8","https://wzstreaming.rai.it/TVlive/liveStream/playlist.m3u8","https://list.iptvcat.com/my_list/s/1f22856f68f2fba4a993c47f47c78a64.m3u8","https://list.iptvcat.com/my_list/s/a372048a4fb440e752aec141aa02885f.m3u8","https://list.iptvcat.com/my_list/s/c7efe17aa0dc8096561967bfb828d4f3.m3u8","https://list.iptvcat.com/my_list/s/2d1f14bbb3370d263d8d3f0d9f5128e0.m3u8"],
"rete-4":["http://tvit.leicaflorianrobert.dev/mediaset/rete-4/stream.m3u8","https://live02-seg.msf.cdn.mediaset.net/live/ch-r4/r4-clr.isml/index.m3u8"],
"canale-5":["https://live02-seg.msf.cdn.mediaset.net/live/ch-c5/c5-clr.isml/index.m3u8","http://tvit.leicaflorianrobert.dev/mediaset/canale-5/stream.m3u8"],
"italia-1":["https://tvit.leicaflorianrobert.dev/mediaset/italia-1/stream.m3u8","https://live02-seg.msf.cdn.mediaset.net/live/ch-i1/i1-clr.isml/index.m3u8"],
"rai-4k": ["https://list.iptvcat.com/my_list/s/fbf04fbd9694eee71b5af9f12e49538d.m3u8"],
"rai-news":["https://8e7439fdb1694c8da3a0fd63e4dda518.msvdn.net/rainews1/hls/playlist_mo.m3u8"],
"topcrime": ["https://tvit.leicaflorianrobert.dev/mediaset/top-crime/stream.m3u8"],
"mediaset-extra": ["https://tvit.leicaflorianrobert.dev/mediaset/mediaset-extra/stream.m3u8"],
"focus": ["https://tvit.leicaflorianrobert.dev/mediaset/focus/stream.m3u8"],
"boing": ["https://tvit.leicaflorianrobert.dev/mediaset/boing/stream.m3u8"],
"cartoonito": ["https://tvit.leicaflorianrobert.dev/mediaset/cartoonito/stream.m3u8"],
"tv8": ["https://tvit.leicaflorianrobert.dev/sky/tv8/stream.m3u8"],
"cielo": ["https://tvit.leicaflorianrobert.dev/sky/cielo/stream.m3u8"],
"dmax": ["https://tvit.leicaflorianrobert.dev/discovery/dmax/stream.m3u8"],
"nove": ["https://tvit.leicaflorianrobert.dev/discovery/nove/stream.m3u8"]
}
provider_map = {
'SC': 'STREAMINGCOMMUNITY',
'SC_FS': 'SC_FAST_SEARCH',
'LC': 'LORDCHANNEL',
'SW': 'STREAMINGWATCH',
'TF_FS': 'TF_FAST_SEARCH',
'TF': 'TANTIFILM', # Assuming 'TF' should also be handled
'FT': 'FILMPERTUTTI',
'AW': 'ANIMEWORLD'
}
+43 -40
View File
@@ -1,11 +1,8 @@
from loadenv import load_env
from Src.Utilities.loadenv import load_env
from tmdbv3api import TMDb, Movie, TV
from convert_date import convert_US_date, convert_IT_date
import requests
import config
from Src.Utilities.convert_date import convert_US_date, convert_IT_date
import Src.Utilities.config as config
import json
SC_FAST_SEARCH = config.SC_FAST_SEARCH
TF_FAST_SEARCH = config.TF_FAST_SEARCH
env_vars = load_env()
TMDB_KEY = env_vars.get('TMDB_KEY')
@@ -20,25 +17,23 @@ def get_info_tmdb(tmbda,ismovie,type):
showname = show.name
if type == "Filmpertutti":
date= show.first_air_date
date = date.split("-")[0]
print("Real date",date)
return showname,date
elif type == "StreamingCommunity":
if SC_FAST_SEARCH == "0":
n_season = show.number_of_seasons
full_date = show.first_air_date
date = full_date.split("-")[0]
print(date)
return showname,date
else:
return showname
elif type == "Tuttifilm":
if TF_FAST_SEARCH == "0":
date = show.first_air_date
date = date.split("-")[0]
print("Real date",date)
return showname,date
else:
full_date = show.first_air_date
date = full_date.split("-")[0]
print(date)
return showname,date
elif type == "StreamingCommunityFS":
return showname
elif type == "Tantifilm":
date = show.first_air_date
date = date.split("-")[0]
print("Real date",date)
return showname,date
elif type == "TantifilmFS":
return showname
elif type == "Cool":
return showname
elif type == "LordChannel":
@@ -59,18 +54,21 @@ def get_info_tmdb(tmbda,ismovie,type):
#Get all release dates
if type == "Filmpertutti":
date = show.release_dates
date = date.split("-")[0]
#GET US RELEASE DATE because filmpertutti somewhy uses US release date
date = convert_US_date(date)
return showname,date
elif type == "StreamingCommunity":
date = show.release_dates
date = date.split("-")[0]
return showname
elif type == "Tuttifilm":
if TF_FAST_SEARCH == "0":
date = show.release_date
date = date.split("-")[0]
print("Real date",date)
return showname,date
else:
elif type == "StreamingCommunityFS":
return showname
elif type == "Tantifilm":
date = show.release_date
date = date.split("-")[0]
print("Real date",date)
return showname,date
elif type == "TantifilmFS":
return showname
elif type == "Cool":
return showname
@@ -86,23 +84,24 @@ def get_info_tmdb(tmbda,ismovie,type):
return showname,date
async def get_info_imdb(imdb_id, ismovie, type,client):
resp = await client.get(f'https://api.themoviedb.org/3/find/{imdb_id}?api_key={TMDB_KEY}&language=it&external_source=imdb_id')
data = resp.json()
if ismovie == 0:
showname = data['tv_results'][0]['name']
if type == "Filmpertutti":
date= data['tv_results'][0]['first_air_date']
date = date.split("-")[0]
print("Real date",date)
return showname, date
elif type == "StreamingCommunity":
return showname
elif type == "Tuttifilm":
if TF_FAST_SEARCH == "0":
date = data['tv_results'][0]['first_air_date']
date = date.split("-")[0]
return showname,date
elif TF_FAST_SEARCH == "1":
date = data['tv_results'][0]['first_air_date']
date = date.split("-")[0]
return showname,date
elif type == "Tantifilm":
date = data['tv_results'][0]['first_air_date']
date = date.split("-")[0]
return showname,date
elif type == "TantifilmFS":
return showname
elif type == "Cool":
return showname
@@ -110,10 +109,14 @@ async def get_info_imdb(imdb_id, ismovie, type,client):
elif ismovie == 1:
showname= data['movie_results'][0]['title']
if type == "Filmpertutti":
return
date = data['movie_results'][0]['release_date']
date = date.split("-")[0]
return showname,date
elif type == "StreamingCommunity":
return showname
elif type == "Tuttifilm":
date = data['movie_results'][0]['release_date']
date = date.split("-")[0]
return showname,date
elif type == "Tantifilm":
date = data['movie_results'][0]['release_date']
date = date.split("-")[0]
return showname,date
+6 -6
View File
@@ -1,10 +1,9 @@
import os
import config
import config
import Src.Utilities.config as config
MYSTERIUS = config.MYSTERIUS
dotenv = config.dotenv
TUTTIFILM = config.TUTTIFILM
HF = config.HF
Public_Instance = config.Public_Instance
#You need to keep dotenv disabled on remote servers
if dotenv == "1":
from dotenv import load_dotenv
@@ -16,7 +15,8 @@ def load_env():
env_vars['TMDB_KEY'] = os.getenv('TMDB_KEY')
if MYSTERIUS == "1":
env_vars['MYSTERIUS_KEY'] = os.getenv('MYSTERIUS_KEY')
if TUTTIFILM == "1":
if HF == "1":
env_vars['PROXY_CREDENTIALS'] = os.getenv('PROXY')
env_vars['PROXY_CREDENTIALS'] = os.getenv('PROXY')
env_vars['MEDIAFLOW_PASS'] = os.getenv('MEDIAFLOW_PASS')
if Public_Instance == "1":
env_vars['ALTERNATIVE_LINK'] = os.getenv('ALTERNATIVE_LINK')
return env_vars
+7 -13
View File
@@ -1,40 +1,34 @@
{
"Siti": {
"StreamingCommunity": {
"enabled": "1",
"domain": "buzz",
"fast_search": "0"
"domain": "buzz"
},
"Filmpertutti": {
"enabled": "0",
"domain": "diy"
},
"Tuttifilm":{
"enabled": "0",
"domain": "bond",
"fast_search": "0"
"Tantifilm":{
"domain": "bond"
},
"Mysterius":{
"enabled": "0"
},
"LordChannel":{
"enabled":"1",
"domain":"com"
},
"StreamingWatch":{
"enabled":"1",
"domain":"org"
},
"AnimeWorld":{
"enabled":"1",
"domain":"so"
}
},
"General":{
"load_env": "0",
"load_env": "1",
"HOST": "0.0.0.0",
"PORT": "8080",
"HF": "1"
"HF": "0",
"Public_Instance": "0",
"MediaProxy": ["https://flowguy-mediamamma1.hf.space/","https://flowguy-mediamamma2.hf.space/","https://flowguy-mediamamma3.hf.space/","https://flowguy-mediamamma4.hf.space/","https://flowguy-mediamamma5.hf.space/","https://flowguy-mediamamma6.hf.space/","https://flowguy-mediamamma7.hf.space/","https://flowguy-mediamamma8.hf.space/","https://flowguy-mediamamma9.hf.space/","https://flowguy-mediamamma10.hf.space/"]
}
}
-30
View File
@@ -1,30 +0,0 @@
okru = {
"rai1": "https://ok.ru/videoembed/7703488765552?nochat=1",
"rai2": "https://ok.ru/videoembed/7805618364016?nochat=1"
}
STREAM = {
"channels": [
{
"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",
"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",
"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"
}
]
}
+1 -1
View File
@@ -1,3 +1,3 @@
TMDB_KEY= "INSERT YOUR API KEY HERE"
MEDIAFLOW_PASS = "INSERT YOUR MEDIAFLOW PASS HERE"
+3 -1
View File
@@ -6,4 +6,6 @@ fastapi
uvicorn
tzdata
lxml
httpx
slowapi
curl_cffi
fake-headers
+135 -61
View File
@@ -1,26 +1,24 @@
from fastapi import FastAPI, HTTPException
from fastapi.responses import JSONResponse
from filmpertutti import filmpertutti
from streamingcommunity import streaming_community
from tantifilm import tantifilm
from lordchannel import lordchannel
from streamingwatch import streamingwatch
import json
import config
from fastapi import FastAPI, HTTPException,Request
from fastapi.responses import JSONResponse,RedirectResponse,HTMLResponse
from Src.API.filmpertutti import filmpertutti
from Src.API.streamingcommunity import streaming_community
from Src.API.tantifilm import tantifilm
from Src.API.lordchannel import lordchannel
from Src.API.streamingwatch import streamingwatch
import Src.Utilities.config as config
import logging
from okru import okru_get_url
from animeworld import animeworld
from dictionaries import okru,STREAM
import httpx
from Src.API.okru import okru_get_url
from Src.API.animeworld import animeworld
from Src.Utilities.dictionaries import okru,STREAM,extra_sources,webru_vary,webru_dlhd,provider_map
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
from curl_cffi.requests import AsyncSession
from slowapi import Limiter
from slowapi.util import get_remote_address
from slowapi.middleware import SlowAPIMiddleware
from static.static import HTML
# Configure logging
FILMPERTUTTI = config.FILMPERTUTTI
STREAMINGCOMMUNITY = config.STREAMINGCOMMUNITY
MYSTERIUS = config.MYSTERIUS
TUTTIFILM = config.TUTTIFILM
TF_DOMAIN = config.TF_DOMAIN
LORDCHANNEL = config.LORDCHANNEL
STREAMINGWATCH= config.STREAMINGWATCH
ANIMEWORLD = config.ANIMEWORLD
HOST = config.HOST
PORT = int(config.PORT)
HF = config.HF
@@ -30,64 +28,110 @@ if HF == "1":
else:
HF = ""
if MYSTERIUS == "1":
from cool import cool
from Src.API.cool import cool
app = FastAPI()
limiter = Limiter(key_func=get_remote_address)
app.state.limiter = limiter
app.add_middleware(SlowAPIMiddleware)
MANIFEST = {
"id": "org.stremio.mammamia",
"version": "1.0.5",
"version": "1.1.0",
"catalogs": [
{"type": "tv", "id": "tv_channels", "name": "TV Channels"}
{
"type": "tv",
"id": "tv_channels",
"name": "TV Channels",
"behaviorHints": {
"configurable": True,
"configurationRequired": True
},
"extra": [
{
"name": "genre",
"isRequired": False,
"options": ["Rai", "Mediaset", "Sky", "Euronews", "La7", "Warner Bros", "FIT", "Sportitalia","RSI","DAZN", "Rakuten", "Pluto", "A+E", "Paramount", "Chill"]
}
]
}
],
"resources": ["stream", "catalog","meta"],
"resources": ["stream", "catalog", "meta"],
"types": ["movie", "series", "tv"],
"name": "Mamma Mia",
"description": "Addon providing HTTPS Streams for Italian Movies,Series and Live TV! Note that you need to have Kitsu Addon installed in order to watch Anime",
"description": "Addon providing HTTPS Streams for Italian Movies, Series, and Live TV! Note that you need to have Kitsu Addon installed in order to watch Anime",
"logo": "https://creazilla-store.fra1.digitaloceanspaces.com/emojis/49647/pizza-emoji-clipart-md.png"
}
def respond_with(data):
resp = JSONResponse(data)
resp.headers['Access-Control-Allow-Origin'] = '*'
resp.headers['Access-Control-Allow-Headers'] = '*'
return resp
@app.get('/manifest.json')
@app.get('/config')
def config():
return RedirectResponse(url="/")
@app.get('/{config}/manifest.json')
def addon_manifest():
return respond_with(MANIFEST)
@app.get('/')
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"
@app.get('/catalog/{type}/{id}.json')
def addon_catalog(type, id):
print("STA ANDANDO TUTTO MALE")
@app.get('/', response_class=HTMLResponse)
def root(request: Request):
instance_url = f"{request.url.scheme}://{request.url.netloc}"
html_content = HTML.replace("{instance_url}", instance_url)
return html_content
async def addon_catalog(type: str, id: str, genre: str = None):
print(f"Received genre parameter: {genre}")
if type != "tv":
raise HTTPException(status_code=404)
catalogs = {"metas": []}
for channel in STREAM["channels"]:
if genre and genre not in channel.get("genres", []):
continue # Skip channels that don't match the selected genre
description = f'Watch {channel["title"]}'
catalogs["metas"].append({
"id": channel["id"],
"type": "tv",
"name": channel["title"],
"poster": channel["poster"], # Add poster URL if available
"description": f"Watch {channel['title']}"
"description": description,
"genres": channel.get("genres", [])
})
return catalogs
@app.get('/{config}/catalog/{type}/{id}.json')
@limiter.limit("5/second")
async def first_catalog(request: Request,type: str, id: str, genre: str = None):
catalogs = await addon_catalog(type, id,genre)
return respond_with(catalogs)
@app.get('/meta/tv/{id}.json')
def addon_meta(id: str):
@app.get('/{config}/catalog/{type}/{id}/genre={genre}.json')
async def first_catalog(type: str, id: str, genre: str = None):
catalogs = await addon_catalog(type, id,genre)
return respond_with(catalogs)
@app.get('/{config}/meta/tv/{id}.json')
@limiter.limit("20/second")
async def addon_meta(request: Request,id: str):
# Find the channel by ID
channel = next((ch for ch in STREAM['channels'] if ch['id'] == id), None)
if not channel:
raise HTTPException(status_code=404, detail="Channel not found")
async with AsyncSession() as client:
if channel["id"] in convert_bho_1 or channel["id"] in convert_bho_2 or channel["id"] in convert_bho_3:
description,title = await epg_guide(channel["id"],client)
elif channel["id"] in tivu:
description = await tivu_get(channel["id"],client)
print(description)
title = ""
else:
description = f'Watch {channel["title"]}'
title = ""
meta = {
'meta': {
'id': channel['id'],
@@ -95,45 +139,68 @@ def addon_meta(id: str):
'name': channel['name'],
'poster': channel['poster'],
'posterShape': 'landscape',
'description': channel['title'],
'description': title + "\n" + description,
# Additional fields can be added here
'background': channel['poster'], # Example of using the same poster as background
'logo': channel['poster'], # Example of using the same poster as logo
'url': channel['url'], # Using the stream URL as a website link
'logo': channel['poster'],
'genres': channel.get('genres', []), # Example of using the same poster as logo
}
}
if 'url' in channel:
meta['meta']['url'] = channel['url'] # Using the stream URL as a website link
return respond_with(meta)
@app.get('/stream/{type}/{id}.json')
async def addon_stream(type, id):
@app.get('/{config}/stream/{type}/{id}.json')
@limiter.limit("5/second")
async def addon_stream(request: Request,config, type, id,):
if type not in MANIFEST['types']:
raise HTTPException(status_code=404)
streams = {'streams': []}
async with httpx.AsyncClient() as client:
config_providers = config.split('|')
provider_maps = {name: "0" for name in provider_map.values()}
for provider in config_providers:
if provider in provider_map:
provider_name = provider_map[provider]
provider_maps[provider_name] = "1"
async with AsyncSession() as client:
if type == "tv":
for channel in STREAM["channels"]:
if channel["id"] == id:
streams['streams'].append({
'title': channel['name'],
'url': channel['url']
})
i = 0
if 'url' in channel:
i = i+1
streams['streams'].append({
'title': f"Server {i} " + f" "+ channel['name'] + " " + channel['title'] ,
'url': channel['url']
})
if id in okru:
i = i+1
channel_url = await okru_get_url(id,client)
streams['streams'].append({
'title': channel['name'] + "OKRU",
'title': f"Server {i} " + channel['title'] + " OKRU",
'url': channel_url
})
if id in extra_sources:
list_sources = extra_sources[id]
for item in list_sources:
i = i+1
streams['streams'].append({'title':f"Server {i} " + channel['title'],'url': item})
if id in webru_vary:
i = i+1
webru_url = await webru(id,"vary",client)
streams['streams'].append({'title': f"Server {i} " + channel['title'],'url': webru_url})
if not streams['streams']:
raise HTTPException(status_code=404)
return respond_with(streams)
else:
logging.debug(f"Handling movie or series: {id}")
if "kitsu" in id:
if ANIMEWORLD == "1":
if provider_maps['ANIMEWORLD'] == "1":
animeworld_urls = await animeworld(id,client)
print(animeworld_urls)
if animeworld_urls:
print(f"AnimeWorld Found Results for {id}")
i = 0
for url in animeworld_urls:
if url:
@@ -147,33 +214,40 @@ async def addon_stream(type, id):
if MYSTERIUS == "1":
results = await cool(id,client)
if results:
print(f"Mysterius Found Results for {id}")
for resolution, link in results.items():
streams['streams'].append({'title': f'{HF}Mysterious {resolution}', 'url': link})
if STREAMINGCOMMUNITY == "1":
url_streaming_community,url_720_streaming_community,quality_sc = await streaming_community(id,client)
if provider_maps['STREAMINGCOMMUNITY'] == "1":
SC_FAST_SEARCH = provider_maps['SC_FAST_SEARCH']
url_streaming_community,url_720_streaming_community,quality_sc = await streaming_community(id,client,SC_FAST_SEARCH)
if url_streaming_community is not None:
print(f"StreamingCommunity Found Results for {id}")
if quality_sc == "1080":
streams['streams'].append({'title': f'{HF}StreamingCommunity 1080p Max', 'url': url_streaming_community})
streams['streams'].append({'title': f'{HF}StreamingCommunity 720p Max', 'url': url_720_streaming_community})
else:
streams['streams'].append({'title': f'{HF}StreamingCommunity 720p Max', 'url': url_streaming_community})
if LORDCHANNEL == "1":
if provider_maps['LORDCHANNEL'] == "1":
url_lordchannel,quality_lordchannel = await lordchannel(id,client)
if quality_lordchannel == "FULL HD" and url_lordchannel != None:
print(f"LordChannel Found Results for {id}")
streams['streams'].append({'title': f'{HF}LordChannel 1080p', 'url': url_lordchannel})
elif url_lordchannel != None:
print(f"LordChannel Found Results for {id}")
streams['streams'].append({'title': f'{HF}LordChannel 720p', 'url': url_lordchannel})
if FILMPERTUTTI == "1":
if provider_maps['FILMPERTUTTI'] == "1":
url_filmpertutti = await filmpertutti(id,client)
if url_filmpertutti is not None:
streams['streams'].append({'title': 'Filmpertutti', 'url': url_filmpertutti})
if TUTTIFILM == "1":
url_tuttifilm = await tantifilm(id,client)
if url_tuttifilm:
if not isinstance(url_tuttifilm, str):
for title, url in url_tuttifilm.items():
if provider_maps['TANTIFILM'] == "1":
TF_FAST_SEARCH = provider_maps['TF_FAST_SEARCH']
url_tantifilm = await tantifilm(id,client,TF_FAST_SEARCH)
if url_tantifilm:
print(f"TantiFilm Found Results for {id}")
if not isinstance(url_tantifilm, str):
for title, url in url_tantifilm.items():
streams['streams'].append({'title': f'{HF}Tantifilm {title}', 'url': url, 'behaviorHints': {'proxyHeaders': {"request": {"Referer": "https://d000d.com/"}}, 'notWebReady': True}})
if STREAMINGWATCH == "1":
if provider_maps['STREAMINGWATCH'] == "1":
url_streamingwatch = await streamingwatch(id,client)
if url_streamingwatch:
streams['streams'].append({'title': f'{HF}StreamingWatch 720p', 'url': url_streamingwatch})
+271
View File
@@ -0,0 +1,271 @@
# static.py
HTML = """
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Mamma Mia</title>
<link rel="icon" href="https://creazilla-store.fra1.digitaloceanspaces.com/emojis/49647/pizza-emoji-clipart-md.png" type="image/x-icon">
<title>Fast Search Example</title>
<style>
* {
box-sizing: border-box;
}
body, html {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
font-size: 2.2vh;
font-family: 'Open Sans', Arial, sans-serif;
color: white;
background: url('https://i.postimg.cc/m2ZqvpZj/italian-seamless-free-vector-pattern3.png') center center repeat;
background-size: cover;
display: flex;
align-items: flex-start;
justify-content: center;
overflow-y: auto;
}
#addon {
background: rgba(0, 0, 0, 0.8);
padding: 0.5vh;
border-radius: 10px;
width: 65vh;
max-width: 100%;
text-align: center;
margin-top: 10vh;
}
.logo {
width: 12vh;
margin: 0 auto;
margin-bottom: 3vh;
margin-top: -3vh;
}
.logo img {
width: 100%;
height: auto;
}
h1, h2, h3 {
margin: 0;
text-shadow: 0 0 1vh rgba(0, 0, 0, 0.15);
}
h1 {
font-size: 4.5vh;
font-weight: 700;
}
h2 {
font-size: 2vh;
font-weight: normal;
font-style: italic;
opacity: 0.8;
margin-bottom: 20px;
}
h3 {
font-size: 2.2vh;
margin-bottom: 10px;
}
.provider-group {
display: flex;
align-items: center; /* Vertically align items */
justify-content: space-between; /* Spread items across the available space */
margin-bottom: 2vh;
background: rgba(255, 255, 255, 0.1);
padding: 1.5vh;
border-radius: 5px;
overflow: hidden;
width: 100%;
}
.provider-group label {
display: flex;
align-items: center; /* Align items within label vertically centered */
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
flex-grow: 1; /* Let the label take as much space as possible */
font-size: 2.2vh;
}
.fast-search {
display: flex;
align-items: center; /* Align the Fast Search checkbox vertically centered */
margin-left: 10px; /* Space between provider and Fast Search */
}
.fast-search input[type="checkbox"] {
margin-right: 0.5vh; /* Space between the checkbox and label */
width: 3vh;
height: 3vh;
}
.provider-group input[type="checkbox"] {
margin-right: 1.5vh;
width: 4vh;
height: 4vh;
}
.parent-container {
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
}
.contact {
position: absolute;
left: 0;
bottom: 4vh;
width: 100%;
text-align: center;
}
.contact a {
font-size: 1.4vh;
font-style: italic;
}
button {
border: 0;
outline: 0;
color: white;
background: #8A5AAB;
padding: 1.2vh 3.5vh;
text-align: center;
font-family: 'Open Sans', Arial, sans-serif;
font-size: 2.2vh;
font-weight: 600;
cursor: pointer;
display: block;
box-shadow: 0 0.5vh 1vh rgba(0, 0, 0, 0.2);
transition: box-shadow 0.1s ease-in-out;
width: 80%;
max-width: 35vh;
margin: 1vh auto;
}
button:hover {
box-shadow: none;
}
button:active {
box-shadow: 0 0 0 0.5vh white inset;
}
#manifestBox {
margin-top: 2vh;
padding: 2vh;
background: rgba(255, 255, 255, 0.2);
border-radius: 5px;
display: none;
text-align: left;
white-space: pre-wrap;
}
#generateManifestButton {
background: #4CAF50;
}
#installButton {
background: #FF5722;
}
#installButton a {
color: white;
text-decoration: none;
}
#additionalText {
margin-top: 2vh;
font-size: 1.8vh;
text-align: left;
}
/* Responsive adjustments for smaller screens */
@media (max-width: 600px) {
.provider-group label {
font-size: 2vh;
white-space: nowrap;
}
}
</style>
</head>
<body>
<div id="addon">
<div class="logo">
<img src="https://creazilla-store.fra1.digitaloceanspaces.com/emojis/49647/pizza-emoji-clipart-md.png" alt="Logo">
</div>
<h1 class="name">Mamma Mia</h1>
<h2 class="version">v1.1.0</h2>
<div id="additionalText">
<h2>This addon provides Movie, Series, Anime, and Live TV HTTPS Streams.<br> https://github.com/UrloMythus/MammaMia/</h2>
</div>
<p class="description">Configure your providers: Note that if you enable Fast Search results will be less accurate but faster. <br> Filmpertutti and Tantifilm won't work if you are not using a local (on your PC) instance.</p>
<h3 class="gives">Select Providers:</h3>
<form class="pure-form" id="provider-form">
<div class="provider-group">
<label for="streamingcommunity" class="provider-label">
<input type="checkbox" id="streamingcommunity"> StreamingCommunity
</label>
<span class="fast-search">
<label for="fast_search_sc">
<input type="checkbox" id="fast_search_sc"> Fast Search
</label>
</span>
</div>
<div class="provider-group">
<label for="lordchannel" class="provider-label">
<input type="checkbox" id="lordchannel"> LordChannel
</label>
</div>
<div class="provider-group">
<label for="streamingwatch" class="provider-label">
<input type="checkbox" id="streamingwatch"> StreamingWatch
</label>
</div>
<div class="provider-group">
<label for="tantifilm" class="provider-label">
<input type="checkbox" id="tantifilm"> Tantifilm
</label>
<span class="fast-search">
<label for="fast_search_tf">
<input type="checkbox" id="fast_search_tf"> Fast Search
</label>
</span>
</div>
<div class="provider-group">
<label for="filmpertutti" class="provider-label">
<input type="checkbox" id="filmpertutti"> Filmpertutti
</label>
</div>
<div class="provider-group">
<label for="animeworld" class="provider-label">
<input type="checkbox" id="animeworld"> Animeworld
</label>
</div>
</form>
<button id="generateManifestButton">Generate Link</button>
<button id="installButton">INSTALL</button>
<div id="manifestBox"></div>
</div>
<script>
function generateManifest() {
let manifest = "|";
const providers = {
"streamingcommunity": "SC",
"fast_search_sc": "SC_FS",
"lordchannel": "LC",
"streamingwatch": "SW",
"tantifilm": "TF",
"fast_search_tf": "TF_FS",
"filmpertutti": "FT",
"animeworld": "AW"
};
for (const id in providers) {
if (document.getElementById(id).checked) {
manifest += providers[id] + "|";
}
}
const instanceUrl = "{instance_url}"; // Keep http in the URL
manifest += "|";
document.getElementById("manifestBox").innerText = manifest.replace(/\|+$/, "");
document.getElementById("manifestBox").style.display = "block";
}
document.getElementById("generateManifestButton").addEventListener("click", generateManifest);
document.getElementById("installButton").addEventListener("click", function() {
const manifestText = document.getElementById("manifestBox").innerText;
const anchor = document.createElement('a');
anchor.href = "http://127.0.0.1:8050/" + manifestText; // Correct URL format
anchor.target = "_blank";
anchor.click();
});
</script>
</body>
</html>
"""