Compare commits
@@ -1,2 +1,3 @@
|
||||
.env
|
||||
__pycache__/
|
||||
.vercel
|
||||
|
||||
+10
-8
@@ -1,15 +1,17 @@
|
||||
# Use an official Python runtime as a parent image
|
||||
FROM python:3.10-slim-buster
|
||||
# Set the working directory in the container to /app
|
||||
FROM python:3.11-slim-bullseye
|
||||
WORKDIR /app
|
||||
|
||||
# Copy the current directory contents into the container at /app
|
||||
# (including run.py, filmpertutti.py, and requirements.txt)
|
||||
ADD . /app
|
||||
# Install any needed packages specified in requirements.txt
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y tesseract-ocr libtesseract-dev && \
|
||||
apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
#EXPOSE the port, for now default is 8080 cause it's the only one really allowed by HuggingFace
|
||||
RUN pip install --no-cache-dir pytesseract
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
# Run run.py when the container launches
|
||||
CMD ["python", "run.py"]
|
||||
ENTRYPOINT ["python", "run.py"]
|
||||
@@ -1,5 +1,5 @@
|
||||
Use an official Python runtime as a parent image
|
||||
FROM python:3.10-slim-buster
|
||||
##Use an official Python runtime as a parent image
|
||||
FROM python:3.11-slim-bullseye
|
||||
|
||||
# Set the working directory in the container to /app
|
||||
WORKDIR /app
|
||||
@@ -20,4 +20,4 @@ RUN pip install --no-cache-dir -r requirements.txt
|
||||
EXPOSE 8080
|
||||
|
||||
# Run run.py when the container launches
|
||||
CMD ["python", "run.py"]
|
||||
ENTRYPOINT ["python", "run.py"]
|
||||
@@ -1,5 +1,5 @@
|
||||
Use an official Python runtime as a parent image
|
||||
FROM python:3.10-slim-buster
|
||||
#Use an official Python runtime as a parent image
|
||||
FROM python:3.11-slim-bullseye
|
||||
|
||||
# Set the working directory in the container to /app
|
||||
WORKDIR /app
|
||||
@@ -18,4 +18,4 @@ RUN pip install --no-cache-dir -r requirements.txt
|
||||
EXPOSE 8080
|
||||
|
||||
# Run run.py when the container launches
|
||||
CMD ["python", "run.py"]
|
||||
ENTRYPOINT ["python", "run.py"]
|
||||
@@ -0,0 +1,18 @@
|
||||
FROM python:3.11-slim-bullseye
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y git tesseract-ocr libtesseract-dev && \
|
||||
apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN git clone https://github.com/UrloMythus/MammaMia.git .
|
||||
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
RUN pip install --no-cache-dir pytesseract
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
ENTRYPOINT ["python", "run.py"]
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
|
||||
|
||||
A Stremio Addon for high quality HTTPS Streams in Italian
|
||||
A Stremio Addon for HTTPS Streams in Italian
|
||||
|
||||
Movies, Series, Anime and Live TV are supported.
|
||||
|
||||
@@ -25,23 +25,6 @@ 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.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Hosting your own instance is suggested, but you can use the public instance [linked](https://mammamia-urlo-mammamia.hf.space/) in the About Page of the repo.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Installation
|
||||
|
||||
@@ -69,13 +52,28 @@ Hosting your own instance is suggested, but you can use the public instance [lin
|
||||
|
||||
``pip install -r requirements.txt ``
|
||||
|
||||
2. Create a .env file and fill it (look at example.env)
|
||||
2. If you want to use Eurostreaming install those packages:
|
||||
|
||||
- Linux (Debian/Ubuntu):
|
||||
``sudo apt install tesseract-ocr libtesseract-dev ``
|
||||
|
||||
- Windows: Install the following library from this [link](https://github.com/UB-Mannheim/tesseract/wiki)
|
||||
|
||||
- MacOS: ```brew install tesseract```
|
||||
|
||||
|
||||
Then install the following Python package:
|
||||
|
||||
``pip install pytesseract ``
|
||||
|
||||
3. Create a .env file and fill it (look at example.env)
|
||||
|
||||
4. Modify the config.json as you wish
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
3. Then to start the Fast API app server just execute:
|
||||
4. Then to start the Fast API app server just execute:
|
||||
|
||||
|
||||
|
||||
@@ -97,7 +95,7 @@ Hosting your own instance is suggested, but you can use the public instance [lin
|
||||
|
||||
|
||||
|
||||
To host this project with Hugging Face, go to the [linked](https://huggingface.co/spaces/MammaMia-Urlo/CloneThisSpace/) page and follow these steps:
|
||||
To host this project with Hugging Face you will need a Github Account, a Hugging Face account and a [TMDB KEY](https://www.educative.io/courses/movie-database-api-python/set-up-the-credentials).
|
||||
|
||||
|
||||
|
||||
@@ -107,75 +105,56 @@ To host this project with Hugging Face, go to the [linked](https://huggingface.c
|
||||
|
||||
|
||||
|
||||
1. Create an Hugging Face Account [here](https://huggingface.co/join)
|
||||
1. Fork this project and give it a random name.
|
||||
|
||||
[!WARNING] The name must not be related to Mamma Mia or mediaflowproxy. Just use a random name
|
||||
|
||||
2. Go on the Github of the [Repo](https://github.com/UrloMythus/MammaMia/), click on Fork -> Create New Fork -> Create One.
|
||||
|
||||
3. Click on static directory and then click on static.py. Remove the whole content and put:
|
||||
```
|
||||
HTML = """
|
||||
Whatever you want
|
||||
"""
|
||||
```
|
||||
4. Change ```Whatever you want``` with a random phrase (the longer it is, the better it is). If you are too lazy go to this [link](https://www.thewordfinder.com/random-sentence-generator/) and generate it.
|
||||
|
||||
5. Click Commit Changes
|
||||
[!WARNING] Since the main page doesn't exist anymore, you will need to configure MammaMia from /configure endpoint
|
||||
|
||||
|
||||
6. Go to [linked](https://huggingface.co/login?next=%2Fnew-space) page and create a new Public Docker Space.
|
||||
[!WARNING] The Space must be Public or else you won't be able to access it
|
||||
|
||||
|
||||
7. Go to Settings and in ```Variables and secrets``` section click New Secret. As ```Name``` put TMDB_KEY and as ```Value`` put your TMDB Key
|
||||
|
||||
8. Go to Files and click Contribute -> Create a new file
|
||||
|
||||
9. In ```Name your file``` field put ```Dockerfile``` . Inside the text box put the content of the Dockerfile called ```Dockerfile-auto-update-no-config``` which you will find inside the /Dockerfiles directory of your Github Fork.
|
||||
|
||||
10. Where there is "YourUsername" put your Github username and where there is "YourRepoName" insert the name of the fork.
|
||||
[!WARNING] Don't remove the final . or it won't work
|
||||
|
||||
11. When you are done click Commit Changes to main
|
||||
|
||||
12. Go to the README.md in the Files section of your HuggingFace's space and click on it. After that click on edit. After ```pinned: false``` insert this ```app_port: 8080```
|
||||
|
||||
13. When you are done click Commit Changes to main
|
||||
|
||||
14. You are done!
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
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
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
3. Click Duplicate this Space
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
4. Insert TMDB Key and set visibility to Public
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
5. Clone the Project
|
||||
|
||||
|
||||
6. Go into settings and click on Factory Rebuild.
|
||||
|
||||
|
||||
|
||||
|
||||
7. You are done!
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
8. To install it on Stremio altought, you will need the Direct URL. It can be found on three dots --> Embed This Space --> Direct URL
|
||||
15. To install it on Stremio 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.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
9. 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.
|
||||
|
||||
|
||||
10. How can I use Live TV? For now it won't work on public instances. Wait until next update.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
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)
|
||||
|
||||
16. How to handle updates: First of all you will need to go to your GitHub Repo and click Sync Changes (without discarding commits). Then go into your HuggingFace Space ---> Settings ---> Factory Reset
|
||||
|
||||
|
||||
|
||||
@@ -222,7 +201,7 @@ To install this project on [Render](https://render.com/) follow these steps:
|
||||
|
||||
|
||||
|
||||
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.
|
||||
4. Aside from usual enviroment variables you will need to put PORT = 8080.
|
||||
|
||||
|
||||
|
||||
@@ -244,7 +223,13 @@ To install this project on [Render](https://render.com/) follow these steps:
|
||||
|
||||
|
||||
|
||||
Remember, load_env and Public Instance needs to be disabled in the config.json
|
||||
Remember, load_env needs to be disabled in the config.json
|
||||
|
||||
|
||||
|
||||
|
||||
# Vercel
|
||||
[](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2FUrloMythus%2FMammaMia&env=PORT,TMDB_KEY&envDescription=PORT%20(8080)%20and%20API%20KEY%20of%20TMDB&envLink=https%3A%2F%2Fgithub.com%2FUrloMythus%2FMammaMia%2Fblob%2Fmain%2Fexample.env)
|
||||
|
||||
|
||||
|
||||
@@ -256,21 +241,6 @@ Remember, load_env and Public Instance needs to be disabled in the config.json
|
||||
|
||||
|
||||
|
||||
# How to add to Stremio
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
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.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Enviroment Variables
|
||||
|
||||
@@ -285,14 +255,12 @@ Open your instance URL and configure MammaMia. Once you are done you can click o
|
||||
| Enviroment Variable | Value |
|
||||
|-------------------------|---|
|
||||
|TMDB_KEY|INSERT YOUR API KEY HERE|
|
||||
|FORWARDPROXY| "YOURFORWARDPROXY/" |
|
||||
|PROXY | ["PROXY1","PROXY2"]|
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Here is [linked](https://www.themoviedb.org/settings/api) a tutorial about how to get a TMDB KEY
|
||||
Tutorial to get the TMDB Key: [Tutorial](https://www.themoviedb.org/settings/api)
|
||||
|
||||
|
||||
|
||||
@@ -306,7 +274,9 @@ Here is [linked](https://www.themoviedb.org/settings/api) a tutorial about how t
|
||||
|
||||
|
||||
|
||||
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:
|
||||
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. "1" means True, "0" means False
|
||||
|
||||
Down here all explained:
|
||||
|
||||
|
||||
|
||||
@@ -315,17 +285,15 @@ In the repo there is a config.json that you can modify to change some aspects of
|
||||
| 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. |
|
||||
|enabled | If the site is enabled or not. This will override user-preference in the configuration|
|
||||
|**_ForwardProxy| Whether or not to use the ForwardProxy for the specific site.|
|
||||
|**_Proxy| Whether or not to use the Proxies for the specific site.|
|
||||
|load_env|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.
|
||||
|PORT| The port for the Fast API APP. Default: 8080
|
||||
|level| The level for the logging module. Default: info
|
||||
|Icon| The Icon for the Add-On.|
|
||||
|Global_Proxy| Whatever to enable a Global Proxy which will be valid for every request in the add-on.
|
||||
|
||||
|
||||
|
||||
@@ -333,7 +301,6 @@ Check those links to get the new Domain for the providers.
|
||||
|
||||
|
||||
|
||||
[FILMPERTUTTI](https://filmpertuttiiii.nuovo.live/)
|
||||
|
||||
|
||||
|
||||
@@ -341,7 +308,6 @@ Check those links to get the new Domain for the providers.
|
||||
|
||||
|
||||
|
||||
[TANTIFILM](https://tantinuovo.com/tantifilm-nuovo-indirizzo/)
|
||||
|
||||
|
||||
|
||||
@@ -349,20 +315,34 @@ Check those links to get the new Domain for the providers.
|
||||
|
||||
|
||||
|
||||
[LORDCHANNEL](https://t.me/+5MQwrb3eqb81NGI0)
|
||||
|
||||
|
||||
|
||||
[ANIMEWORLD](https://t.me/AnimeWorldITA2)
|
||||
|
||||
[CB01](https://cb01.uno/)
|
||||
|
||||
[GUARDAFLIX](https://guardoserie.it/)
|
||||
|
||||
[GUARDOSERIE](https://guardoserie.it/)
|
||||
|
||||
[EUROSTREAMING](https://eurostreaming-nuovo-indirizzo.online/)
|
||||
|
||||
|
||||
|
||||
## Mediaflow Proxy
|
||||
|
||||
This project uses Mediaflow-Proxy to bypass some protections. You can find instructions about how to install it [here](https://github.com/mhdzumair/mediaflow-proxy/).
|
||||
|
||||
## 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)
|
||||
- This project uses [MediaFlowProxy](https://github.com/mhdzumair/mediaflow-proxy/) in order to be able to play some Live TV channels and to proxy some streams. 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.
|
||||
The Live TV sources are taken from online sites, avaiable on the web and indixed by Google.
|
||||
|
||||
We hereby issue this notice to inform you that this Add-On just function like an ordinary browser (like your browser) that fetch video files from internet, and do not violate the provisions of the Digital Millennium Copyright Act (DMCA). The Content these extensions may access is not hosted or made avaiable by us or the Stremio application but the websites they are browsing in their autonomous mode. It is sole responsibility of the user and his/her countries' or states' law. If you think they are violating any intellectual property then please contact the actual file hosts not the owners of this repository or the Stremio app.
|
||||
|
||||
Thank You.
|
||||
|
||||
|
||||
|
||||
+151
-66
@@ -1,10 +1,43 @@
|
||||
|
||||
from bs4 import BeautifulSoup
|
||||
import datetime
|
||||
import logging
|
||||
import json
|
||||
from Src.Utilities.info import get_info_kitsu
|
||||
import Src.Utilities.config as config
|
||||
import re
|
||||
from fake_headers import Headers
|
||||
import Src.Utilities.config as config
|
||||
from Src.Utilities.config import setup_logging
|
||||
level = config.LEVEL
|
||||
logger = setup_logging(level)
|
||||
Icon = config.Icon
|
||||
Name = config.Name
|
||||
|
||||
random_headers = Headers()
|
||||
proxies = {}
|
||||
from Src.Utilities.loadenv import load_env
|
||||
env_vars = load_env()
|
||||
AW_PROXY = config.AW_PROXY
|
||||
AW_ForwardProxy = config.AW_ForwardProxy
|
||||
if AW_PROXY == "1":
|
||||
import random
|
||||
PROXY_CREDENTIALS = env_vars.get('PROXY_CREDENTIALS')
|
||||
proxy_list = json.loads(PROXY_CREDENTIALS)
|
||||
proxy = random.choice(proxy_list)
|
||||
if proxy == "":
|
||||
proxies = {}
|
||||
else:
|
||||
proxies = {
|
||||
"http": proxy,
|
||||
"https": proxy
|
||||
}
|
||||
if AW_ForwardProxy == "1":
|
||||
ForwardProxy = env_vars.get('ForwardProxy')
|
||||
else:
|
||||
ForwardProxy = ""
|
||||
|
||||
|
||||
AW_DOMAIN = config.AW_DOMAIN
|
||||
months = {
|
||||
"Gennaio": "January", "Febbraio": "February", "Marzo": "March",
|
||||
@@ -18,17 +51,38 @@ showname_replace = {
|
||||
" ": " ",
|
||||
"Shippuuden": "Shippuden",
|
||||
" ": "+",
|
||||
"Solo+Leveling+2": "Solo+Leveling+2:",
|
||||
"-": ""
|
||||
}
|
||||
|
||||
async def get_mp4(anime_url,ismovie,episode,client):
|
||||
response = await client.get(anime_url,allow_redirects=True, impersonate = "chrome120")
|
||||
async def security_cookie (response):
|
||||
match = re.search(r'SecurityAW-([A-Za-z0-9]{2})=([^;]+)', response.text)
|
||||
if match:
|
||||
unknown_chars = match.group(1).strip()
|
||||
Security_Cookie = match.group(2).strip()
|
||||
cookies = {
|
||||
f"SecurityAW-{unknown_chars}": Security_Cookie
|
||||
}
|
||||
return cookies
|
||||
async def get_mp4(anime_url,ismovie,episode,client,i,streams):
|
||||
cookies = {}
|
||||
if ForwardProxy != "":
|
||||
response = await client.get(ForwardProxy + anime_url,allow_redirects=True,impersonate = "chrome124",proxies=proxies)
|
||||
anime_url = f'{AW_DOMAIN}/{response.url.replace(ForwardProxy,"")}?d=1'
|
||||
response = await client.get(ForwardProxy + anime_url, allow_redirects=True, cookies = cookies,impersonate = "chrome124",proxies=proxies)
|
||||
cookies = await security_cookie(response)
|
||||
response = await client.get(ForwardProxy + anime_url, allow_redirects=True, cookies = cookies,impersonate = "chrome124",proxies=proxies)
|
||||
else:
|
||||
response = await client.get(ForwardProxy + anime_url, allow_redirects=True, cookies = cookies,impersonate = "chrome124",proxies=proxies)
|
||||
soup = BeautifulSoup(response.text,'lxml')
|
||||
if ismovie == 0:
|
||||
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,allow_redirects=True, impersonate = "chrome120")
|
||||
episode_page = f'{AW_DOMAIN}{episode_page["href"]}'
|
||||
response = await client.get(ForwardProxy + episode_page,allow_redirects=True, cookies = cookies,impersonate = "chrome124", proxies=proxies)
|
||||
if response.status_code == 202:
|
||||
cookies = await security_cookie(response)
|
||||
response = await client.get(ForwardProxy + episode_page,allow_redirects=True, cookies = cookies,impersonate = "chrome124", proxies=proxies)
|
||||
soup = BeautifulSoup(response.text,'lxml')
|
||||
|
||||
a_tag = soup.find('a', {'id': 'alternativeDownloadLink', 'class': 'm-1 btn btn-sm btn-primary'})
|
||||
@@ -36,7 +90,96 @@ async def get_mp4(anime_url,ismovie,episode,client):
|
||||
response = await client.head(url)
|
||||
if response.status_code == 404:
|
||||
url = None
|
||||
return url
|
||||
if url:
|
||||
if i == 0:
|
||||
language = "Original"
|
||||
elif i == 1:
|
||||
language = "Italian"
|
||||
streams['streams'].append({'title': f'{Icon}Animeworld {language}', 'url': url,'behaviorHints': {'bingeGroup': 'animeworld'}})
|
||||
return streams
|
||||
|
||||
|
||||
|
||||
|
||||
async def search(showname,date,ismovie,episode,client,streams):
|
||||
search_year = date[:4]
|
||||
headers = random_headers.generate()
|
||||
link = f'{AW_DOMAIN}/filter?year={search_year}&sort=2&keyword={showname}'
|
||||
response = await client.get(ForwardProxy + link,allow_redirects=True, impersonate = "chrome124", headers = headers, proxies = proxies)
|
||||
if response.status_code == 202:
|
||||
cookies = await security_cookie(response)
|
||||
response = await client.get(ForwardProxy + link,allow_redirects=True, impersonate = "chrome124", proxies = proxies, headers = headers, cookies = cookies)
|
||||
else:
|
||||
cookies = {}
|
||||
soup = BeautifulSoup(response.text,'lxml')
|
||||
anime_list = soup.find_all('a', class_=['poster', 'tooltipstered'])
|
||||
i = 0
|
||||
for anime in anime_list:
|
||||
anime_info_url = f'{AW_DOMAIN}/{anime["data-tip"]}'
|
||||
response = await client.get(ForwardProxy + anime_info_url,allow_redirects=True, impersonate = "chrome124", cookies = cookies, proxies = proxies)
|
||||
if response.status_code == 202:
|
||||
cookies = await security_cookie(response)
|
||||
response = await client.get(ForwardProxy + anime_info_url,allow_redirects=True, impersonate = "chrome124", cookies = cookies, proxies = proxies)
|
||||
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()
|
||||
for ita, eng in months.items():
|
||||
release_date = release_date.replace(ita, eng)
|
||||
release_date_object = datetime.datetime.strptime(release_date, "%d %B %Y")
|
||||
date_object = datetime.datetime.strptime(date, "%Y-%m-%d")
|
||||
release_date = release_date_object.strftime("%Y-%m-%d")
|
||||
if (release_date == date or
|
||||
release_date == (datetime.datetime.strptime(date, "%Y-%m-%d") + datetime.timedelta(days=1)).strftime("%Y-%m-%d") or
|
||||
release_date == (datetime.datetime.strptime(date, "%Y-%m-%d") - datetime.timedelta(days=1)).strftime("%Y-%m-%d")):
|
||||
anime_url = f'{AW_DOMAIN}{anime["href"]}'
|
||||
streams = await get_mp4(anime_url,ismovie,episode,client,i,streams)
|
||||
i+=1
|
||||
logger.info(f"AnimeWorld Found Results for current ID")
|
||||
|
||||
return streams
|
||||
|
||||
async def animeworld(streams,id,client):
|
||||
try:
|
||||
kitsu_id = id.split(":")[1]
|
||||
ismovie = 1 if len(id.split(":")) == 2 else 0
|
||||
if ismovie == 1:
|
||||
episode = None
|
||||
else:
|
||||
episode = id.split(":")[2]
|
||||
showname,date = await get_info_kitsu(kitsu_id,client)
|
||||
#Format Showname
|
||||
for key in showname_replace:
|
||||
if key in showname: # Check if the key is a substring of showname
|
||||
showname = showname.replace(key, showname_replace[key])
|
||||
if "Naruto:" in showname:
|
||||
showname = showname.replace(":", "")
|
||||
if "’" in showname:
|
||||
showname = showname.split("’")[0]
|
||||
if ":" in showname:
|
||||
showname = showname.split(":")[0]
|
||||
streams = await search(showname,date,ismovie,episode,client,streams)
|
||||
return streams
|
||||
except Exception as e:
|
||||
logger.warning(f"Animeworld failed {e}")
|
||||
return streams
|
||||
|
||||
async def test_animeworld():
|
||||
async with AsyncSession() as client:
|
||||
# Replace with actual id, for example 'anime_id:episode' format
|
||||
test_id = "kitsu:46474:1" # This is an example ID format
|
||||
results = await animeworld(test_id, client)
|
||||
print(results)
|
||||
|
||||
if __name__ == "__main__":
|
||||
from curl_cffi.requests import AsyncSession
|
||||
import asyncio
|
||||
asyncio.run(test_animeworld())
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -72,7 +215,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,allow_redirects=True, impersonate = "chrome120")
|
||||
response = await client.post(f'https://www.animeworld.{AW_DOMAIN}/api/search/v2', params=params, cookies=cookies, headers=headers,allow_redirects=True)
|
||||
|
||||
data = json.loads(response.text)
|
||||
final_urls = []
|
||||
@@ -93,7 +236,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, allow_redirects=True, impersonate = "chrome120")
|
||||
response = await client.post(ForwardProxy + f'https://www.animeworld.{AW_DOMAIN}/api/search/v2', params=params, cookies=cookies, headers=headers, allow_redirects=True, proxies = proxies)
|
||||
data = json.loads(response.text)
|
||||
for anime in data["animes"]:
|
||||
release_date = anime["release"]
|
||||
@@ -109,61 +252,3 @@ async def old_search(showname,date,ismovie,episode,client):
|
||||
final_urls.append(final_url)
|
||||
break
|
||||
return final_urls
|
||||
|
||||
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}',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,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()
|
||||
for ita, eng in months.items():
|
||||
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")
|
||||
if release_date == date:
|
||||
anime_url = f'https://www.animeworld.{AW_DOMAIN}{anime["href"]}'
|
||||
final_url = await get_mp4(anime_url,ismovie,episode,client)
|
||||
if final_url:
|
||||
final_urls.append(final_url)
|
||||
|
||||
return final_urls
|
||||
|
||||
async def animeworld(id,client):
|
||||
try:
|
||||
print(id)
|
||||
kitsu_id = id.split(":")[1]
|
||||
ismovie = 1 if len(id.split(":")) == 2 else 0
|
||||
if ismovie == 1:
|
||||
episode = None
|
||||
else:
|
||||
episode = id.split(":")[2]
|
||||
showname,date = await get_info_kitsu(kitsu_id,client)
|
||||
for key in showname_replace:
|
||||
if key in showname: # Check if the key is a substring of showname
|
||||
showname = showname.replace(key, showname_replace[key])
|
||||
if "Naruto:" in showname:
|
||||
showname = showname.replace(":", "")
|
||||
final_urls = await search(showname,date,ismovie,episode,client)
|
||||
return final_urls
|
||||
except:
|
||||
print("Animeworld failed")
|
||||
return None
|
||||
'''
|
||||
async def test_animeworld():
|
||||
async with AsyncSession() as client:
|
||||
# Replace with actual id, for example 'anime_id:episode' format
|
||||
test_id = "kitsu:11407" # This is an example ID format
|
||||
results = await animeworld(test_id, client)
|
||||
print(results)
|
||||
|
||||
if __name__ == "__main__":
|
||||
from curl_cffi.requests import AsyncSession
|
||||
import asyncio
|
||||
asyncio.run(test_animeworld())
|
||||
'''
|
||||
+104
-139
@@ -4,8 +4,59 @@ from Src.Utilities.info import is_movie,get_info_tmdb,get_info_imdb
|
||||
from Src.Utilities.convert import get_TMDb_id_from_IMDb_id
|
||||
from fake_headers import Headers
|
||||
import Src.Utilities.config as config
|
||||
ForwardProxy_list = config.ForwardProxy
|
||||
ForwardProxy = ForwardProxy_list[0]
|
||||
from Src.Utilities.loadenv import load_env
|
||||
from Src.API.extractors.mixdrop import mixdrop
|
||||
import logging
|
||||
from Src.Utilities.config import setup_logging
|
||||
level = config.LEVEL
|
||||
logger = setup_logging(level)
|
||||
CB_DOMAIN = config.CB_DOMAIN
|
||||
CB_PROXY = config.CB_PROXY
|
||||
MX_PROXY = config.MX_PROXY
|
||||
proxies = {}
|
||||
proxies2 = {}
|
||||
env_vars = load_env()
|
||||
import random
|
||||
import json
|
||||
from Src.Utilities.mfp import build_mfp
|
||||
if MX_PROXY == "1":
|
||||
PROXY_CREDENTIALS = env_vars.get('PROXY_CREDENTIALS')
|
||||
proxy_list = json.loads(PROXY_CREDENTIALS)
|
||||
proxy = random.choice(proxy_list)
|
||||
if proxy == "":
|
||||
proxies2 = {}
|
||||
else:
|
||||
proxies2 = {
|
||||
"http": proxy,
|
||||
"https": proxy
|
||||
}
|
||||
if CB_PROXY == "1":
|
||||
PROXY_CREDENTIALS = env_vars.get('PROXY_CREDENTIALS')
|
||||
proxy_list = json.loads(PROXY_CREDENTIALS)
|
||||
proxy = random.choice(proxy_list)
|
||||
if proxy == "":
|
||||
proxies = {}
|
||||
else:
|
||||
proxies = {
|
||||
"http": proxy,
|
||||
"https": proxy
|
||||
}
|
||||
proxies2 = proxies
|
||||
|
||||
CB_ForwardProxy = config.CB_ForwardProxy
|
||||
MX_ForwardProxy = config.MX_ForwardProxy
|
||||
if CB_ForwardProxy == "1":
|
||||
ForwardProxy = env_vars.get('ForwardProxy')
|
||||
ForwardProxy2 = ForwardProxy
|
||||
if MX_ForwardProxy == "1":
|
||||
ForwardProxy2 = ForwardProxy
|
||||
elif MX_ForwardProxy == "1":
|
||||
ForwardProxy2 = env_vars.get('ForwardProxy')
|
||||
else:
|
||||
ForwardProxy2 = ""
|
||||
ForwardProxy = ""
|
||||
|
||||
|
||||
fake_headers = Headers()
|
||||
|
||||
async def get_stayonline(link,client):
|
||||
@@ -15,85 +66,20 @@ async def get_stayonline(link,client):
|
||||
'x-requested-with': 'XMLHttpRequest',
|
||||
}
|
||||
data = {'id': link.split("/")[-2], 'ref': ''}
|
||||
response = await client.post('https://stayonline.pro/ajax/linkEmbedView.php', headers=headers, data=data)
|
||||
response = await client.post('https://stayonline.pro/ajax/linkEmbedView.php', headers=headers, data=data, proxies = proxies2)
|
||||
real_url = response.json()['data']['value']
|
||||
print(real_url)
|
||||
return real_url
|
||||
|
||||
|
||||
async def get_uprot(link,client):
|
||||
if "msf" in link:
|
||||
link = link.replace("msf","mse")
|
||||
|
||||
headers = fake_headers.generate()
|
||||
response = await client.get(link, headers=headers, allow_redirects=True, timeout=10)
|
||||
soup = BeautifulSoup(response.text, "lxml")
|
||||
maxstream_url = soup.find("a")
|
||||
maxstream_url = maxstream_url.get("href")
|
||||
return maxstream_url
|
||||
|
||||
async def get_true_link_mixdrop(real_link,client):
|
||||
try:
|
||||
import string
|
||||
headers = fake_headers.generate()
|
||||
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("|")
|
||||
charset = string.digits + string.ascii_letters
|
||||
d = dict()
|
||||
for i in range(len(terms)):
|
||||
d[charset[i]] = terms[i] or charset[i]
|
||||
s = 'https:'
|
||||
for c in schema:
|
||||
s += d[c] if c in d else c
|
||||
print(s)
|
||||
return s
|
||||
except Exception as e:
|
||||
return None
|
||||
async def get_true_link_maxstream(maxstream_url,client):
|
||||
headers = fake_headers.generate()
|
||||
# Send a GET request to the Maxstream URL
|
||||
response = await client.get(maxstream_url, headers=headers, allow_redirects=True, timeout=10)
|
||||
[s1, s2] = re.search(r"\}\('(.+)',.+,'(.+)'\.split", response.text).group(1, 2)
|
||||
terms = s2.split("|")
|
||||
urlset_index = terms.index('urlset')
|
||||
hls_index = terms.index('hls')
|
||||
sources_index = terms.index('sources')
|
||||
result = terms[urlset_index + 1 : hls_index]
|
||||
reversed_elements = result[::-1]
|
||||
first_part = terms[hls_index +1 : sources_index]
|
||||
reversed_first_part = first_part[::-1]
|
||||
first_url_part = ""
|
||||
for first_part in reversed_first_part:
|
||||
if "0" in first_part:
|
||||
first_url_part += first_part
|
||||
else:
|
||||
first_url_part += first_part + "-"
|
||||
|
||||
|
||||
|
||||
base_url = f"https://{first_url_part}.host-cdn.net/hls/"
|
||||
if len(reversed_elements) == 1:
|
||||
final_url = base_url + "," + reversed_elements[0] + ".urlset/master.m3u8"
|
||||
lenght = len(reversed_elements)
|
||||
i = 1
|
||||
for element in reversed_elements:
|
||||
base_url += element + ","
|
||||
if lenght == i:
|
||||
base_url += ".urlset/master.m3u8"
|
||||
else:
|
||||
i += 1
|
||||
final_url = base_url
|
||||
return final_url
|
||||
|
||||
async def search_movie(showname,date,client):
|
||||
try:
|
||||
showname = showname.replace(" ","+")
|
||||
showname = showname.replace(" ","+").replace("ò","o").replace("è","e").replace("à","a").replace("ù","u").replace("ì","i")
|
||||
headers = fake_headers.generate()
|
||||
headers['Referer'] = 'https://cb01.technology/'
|
||||
query = f'https://cb01.technology/?s={showname}'
|
||||
response = await client.get(query,headers=headers)
|
||||
headers['Referer'] = f'{CB_DOMAIN}/'
|
||||
query = f'{CB_DOMAIN}/?s={showname}'
|
||||
response = await client.get(ForwardProxy + query,headers=headers, proxies = proxies)
|
||||
if response.status_code != 200:
|
||||
logger.warning(f"CB01 Failed to fetch search results: {response.status_code}")
|
||||
soup = BeautifulSoup(response.text, 'lxml',parse_only=SoupStrainer('div', class_='card-content'))
|
||||
cards = soup.find_all('div', class_='card-content')
|
||||
year_pattern = re.compile(r'(19|20)\d{2}')
|
||||
@@ -101,29 +87,28 @@ async def search_movie(showname,date,client):
|
||||
# Find the link inside the current card
|
||||
link_tag = card.find('h3', class_='card-title').find('a')
|
||||
href = link_tag['href']
|
||||
|
||||
# Find the date span and extract possible years
|
||||
date_span = card.find('span', style=re.compile('color'))
|
||||
if date_span:
|
||||
date_text = date_span.text
|
||||
|
||||
date_text = href.split("/")[-2]
|
||||
# Search for the first occurrence of a year (starting with 19 or 20)
|
||||
match = year_pattern.search(date_text)
|
||||
if match:
|
||||
year = match.group(0)
|
||||
if year == date : # Check if the year is 2011
|
||||
print(f"Link: {href}")
|
||||
return href
|
||||
except Exception as e:
|
||||
print(f'MammaMia: Error in search_series cb01: {e}')
|
||||
logger.warning(f'MammaMia: Error in search_series cb01: {e}')
|
||||
|
||||
|
||||
async def search_series(showname,date,client):
|
||||
try:
|
||||
showname = showname.replace(" ","+")
|
||||
headers = fake_headers.generate()
|
||||
headers['Referer'] = 'https://cb01.technology/serietv/'
|
||||
query = f'https://cb01.technology/serietv/?s={showname}'
|
||||
response = await client.get(query,headers=headers)
|
||||
headers['Referer'] = f'{CB_DOMAIN}/serietv/'
|
||||
query = f'{CB_DOMAIN}/serietv/?s={showname}'
|
||||
response = await client.get(ForwardProxy + query,headers=headers, proxies = proxies)
|
||||
if response.status_code != 200:
|
||||
logger.warning(f"CB01 Failed to fetch search results: {response.status_code}")
|
||||
soup = BeautifulSoup(response.text, 'lxml',parse_only=SoupStrainer('div', class_='card-content'))
|
||||
cards = soup.find_all('div', class_='card-content')
|
||||
year_pattern = re.compile(r'(19|20)\d{2}')
|
||||
@@ -141,23 +126,26 @@ async def search_series(showname,date,client):
|
||||
if match:
|
||||
year = match.group(0)
|
||||
if year == date : # Check if the year is 2011
|
||||
print(f"Link: {href}")
|
||||
return href
|
||||
except Exception as e:
|
||||
print(f'MammaMia: Error in search_series cb01: {e}')
|
||||
logger.warning(f'MammaMia: Error in search_series cb01: {e}')
|
||||
|
||||
async def movie_redirect_url(link,client):
|
||||
async def movie_redirect_url(link,client,MFP,MFP_CREDENTIALS,streams):
|
||||
headers = fake_headers.generate()
|
||||
response = client.get(link, headers=headers, allow_redirects=True, timeout=10)
|
||||
response = await client.get(ForwardProxy + link, headers=headers, allow_redirects=True, timeout=10, proxies = proxies)
|
||||
# Extract the redirect URL from the HTML
|
||||
soup = BeautifulSoup(response.text, "lxml",parse_only=SoupStrainer('div', id='iframen1'))
|
||||
redirect_url = soup.find("div", id="iframen1").get("data-src")
|
||||
return redirect_url
|
||||
async def series_redirect_url(link,season,episode,client):
|
||||
soup = BeautifulSoup(response.text, "lxml",parse_only=SoupStrainer('div'))
|
||||
redirect_url = soup.find("div", id="iframen2").get("data-src")
|
||||
if "stayonline" in redirect_url:
|
||||
mixdrop_real_link = await get_stayonline(redirect_url,client)
|
||||
streams = await mixdrop(mixdrop_real_link,client,MFP,MFP_CREDENTIALS,streams,"CB01",proxies,ForwardProxy,"")
|
||||
|
||||
return streams
|
||||
async def series_redirect_url(link,season,episode,client,MFP,MFP_CREDENTIALS,streams):
|
||||
if len(episode) == 1:
|
||||
episode = f'0{episode}'
|
||||
headers = fake_headers.generate()
|
||||
response = await client.get(link, headers=headers, allow_redirects=True, timeout=10)
|
||||
response = await client.get(ForwardProxy + link, headers=headers, allow_redirects=True, timeout=10, proxies = proxies)
|
||||
soup = BeautifulSoup(response.text, "lxml")
|
||||
seasons_text = soup.find_all('div', class_='sp-head')
|
||||
for season_text in seasons_text:
|
||||
@@ -165,53 +153,28 @@ async def series_redirect_url(link,season,episode,client):
|
||||
if f'STAGIONE' in text and f'{season}' in text:
|
||||
text = text.replace("STAGIONE","").replace("ITA", "")
|
||||
if "A" in text:
|
||||
if len(season) == 1:
|
||||
season = f'0{season}'
|
||||
sp_body = season_text.find_next('div', class_='sp-body')
|
||||
link_tag = sp_body.find('a')
|
||||
uprot_long = link_tag.get('href')
|
||||
response = await client.get(uprot_long, headers=headers, allow_redirects=True, timeout=10)
|
||||
season = "01"
|
||||
episode = "04"
|
||||
pattern1 = rf"(?i)\S*?\.{season}x{episode}\S*?\.mkv.*?href=['\"](.*?)['\"]"
|
||||
pattern2 = rf"\S*\.S{season}E{episode}\S*?\.mkv.*?href=['\"](.*?)['\"]"
|
||||
match = re.search(pattern1, response.text)
|
||||
if match:
|
||||
maxstream_link = match.group(1)
|
||||
return streams
|
||||
else:
|
||||
match = re.search(pattern2, response.text)
|
||||
episode = episode.zfill(2)
|
||||
match = re.search(rf'{season}×{episode}\s*–\s*<a[^>]*href="[^"]*"[^>]*>[^<]*</a>\s– <a[^>]*href="[^"]*',response.text)
|
||||
if match:
|
||||
maxstream_link = match.group(1)
|
||||
print(maxstream_link)
|
||||
if "stayonline" in maxstream_link:
|
||||
maxstream_link =await get_stayonline(maxstream_link,client)
|
||||
maxstream_real_link = await get_uprot(maxstream_link,client)
|
||||
final_url = await get_true_link_maxstream(maxstream_real_link,client)
|
||||
print(final_url)
|
||||
|
||||
else:
|
||||
pattern = re.compile(r'4×03\s*–.*?<a href="(.*?)".*?>Maxstream</a>\s*–.*?<a href="(.*?)".*?>Mixdrop</a>', re.DOTALL)
|
||||
match = pattern.search(response.text)
|
||||
maxstream_link = match.group(1)
|
||||
mixdrop_link = match.group(2)
|
||||
print(f"Maxstream: {maxstream_link}")
|
||||
print(f"Mixdrop: {mixdrop_link}")
|
||||
links = match.group(0)
|
||||
soup = BeautifulSoup(links,'lxml',parse_only=SoupStrainer('a'))
|
||||
mixdrop_a = soup.find_all('a')[1]
|
||||
mixdrop_link = mixdrop_a['href']
|
||||
mixdrop_real_link = await get_stayonline(mixdrop_link,client)
|
||||
final_url = await get_true_link_mixdrop(mixdrop_real_link,client)
|
||||
if final_url == None:
|
||||
if "stayonline" in maxstream_link:
|
||||
maxstream_link =await get_stayonline(maxstream_link,client)
|
||||
maxstream_real_link = await get_uprot(maxstream_link,client)
|
||||
final_url = await get_true_link_maxstream(maxstream_real_link,client)
|
||||
print(final_url)
|
||||
streams = await mixdrop(mixdrop_real_link,client,MFP,MFP_CREDENTIALS,streams,"CB01",proxies,ForwardProxy,"")
|
||||
return streams
|
||||
return streams
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
async def cb01(id,client):
|
||||
|
||||
async def cb01(streams,id,MFP,MFP_CREDENTIALS,client):
|
||||
try:
|
||||
general = is_movie(id)
|
||||
general = await is_movie(id)
|
||||
ismovie = general[0]
|
||||
real_id = general[1]
|
||||
type = "Cb01"
|
||||
@@ -223,15 +186,18 @@ async def cb01(id,client):
|
||||
season = general[2]
|
||||
episode = general[3]
|
||||
link = await search_series(showname,date,client)
|
||||
redirect_url = await series_redirect_url(link,season,episode,client)
|
||||
streams = await series_redirect_url(link,season,episode,client,MFP,MFP_CREDENTIALS,streams)
|
||||
return streams
|
||||
elif ismovie == 1:
|
||||
season = None
|
||||
episode = None
|
||||
link = await search_movie(showname,date,client)
|
||||
redirect_url = await movie_redirect_url(link,client)
|
||||
streams = await movie_redirect_url(link,client,MFP,MFP_CREDENTIALS,streams)
|
||||
return streams
|
||||
except Exception as e:
|
||||
print(f'MammaMia: Error in cb01: {e}')
|
||||
return None
|
||||
logger.warning(f'MammaMia: Error in cb01: {e}')
|
||||
return streams
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -250,16 +216,15 @@ async def cb01(id,client):
|
||||
|
||||
|
||||
|
||||
'''
|
||||
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 = "tt0158552:1:1" # This is an example ID format
|
||||
results = await cb01(test_id, client)
|
||||
test_id = "tt32360916:1:1" # This is an example ID format
|
||||
MFP = "0"
|
||||
results = await cb01({'streams': []},test_id,MFP,['test','test'],client)
|
||||
print(results)
|
||||
|
||||
if __name__ == "__main__":
|
||||
import asyncio
|
||||
asyncio.run(test_animeworld())
|
||||
'''
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
{'PHPSESSID': 'aq7rf8gu6nd9fuk0r711899blp', 'captch4': 'bc3c5526ddc7d0a3ad827e7848f5678f'}
|
||||
+15
-10
@@ -1,5 +1,9 @@
|
||||
from bs4 import BeautifulSoup
|
||||
|
||||
import Src.Utilities.config as config
|
||||
import logging
|
||||
from Src.Utilities.config import setup_logging
|
||||
level = config.LEVEL
|
||||
logger = setup_logging(level)
|
||||
tivu = {
|
||||
"dazn-zona-a": "801",
|
||||
}
|
||||
@@ -171,7 +175,7 @@ async def tivu_get(id,client):
|
||||
description = hour_range + " " + program_name
|
||||
return description
|
||||
except Exception as e:
|
||||
print(e)
|
||||
logger.warning(f"EPG {e}")
|
||||
description = f'Watch {id}'
|
||||
return description
|
||||
|
||||
@@ -186,28 +190,28 @@ async def epg_guide(id,client):
|
||||
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")
|
||||
response = await client.get(f"https://aimammam-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")
|
||||
response = await client.get(f"https://aimammam-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")
|
||||
logger.info("MammaMia: EPG FOUND")
|
||||
return description,title
|
||||
except Exception as e:
|
||||
print(e)
|
||||
logger.debug(e)
|
||||
description = f'Watch {id}'
|
||||
title = ""
|
||||
return description,title
|
||||
|
||||
|
||||
|
||||
|
||||
#async def test_animeworld():
|
||||
'''
|
||||
async def test_animeworld():
|
||||
async with httpx.AsyncClient() as client:
|
||||
test_id = "rai-news" # Replace with actual ID
|
||||
test_id = "rai-1" # Replace with actual ID
|
||||
try:
|
||||
results = await epg_guide(test_id, client)
|
||||
print(results)
|
||||
@@ -216,7 +220,8 @@ async def epg_guide(id,client):
|
||||
except Exception as e:
|
||||
print(f"An error occurred: {e}")
|
||||
|
||||
#if __name__ == "__main__":
|
||||
if __name__ == "__main__":
|
||||
import httpx
|
||||
import asyncio
|
||||
asyncio.run(test_animeworld())
|
||||
'''
|
||||
@@ -0,0 +1,236 @@
|
||||
from Src.Utilities.info import get_info_tmdb, is_movie, get_info_imdb
|
||||
import Src.Utilities.config as config
|
||||
from fake_headers import Headers
|
||||
from urllib.parse import quote
|
||||
from Src.Utilities.loadenv import load_env
|
||||
from Src.API.extractors.mixdrop import mixdrop
|
||||
from Src.API.extractors.deltabit import deltabit
|
||||
import re
|
||||
import logging
|
||||
from Src.Utilities.config import setup_logging
|
||||
level = config.LEVEL
|
||||
logger = setup_logging(level)
|
||||
from bs4 import BeautifulSoup,SoupStrainer
|
||||
env_vars = load_env()
|
||||
random_headers = Headers()
|
||||
try:
|
||||
import pytesseract
|
||||
from PIL import Image
|
||||
except Exception as e:
|
||||
print("You can not use ES")
|
||||
|
||||
import base64
|
||||
from io import BytesIO
|
||||
import time
|
||||
import os
|
||||
import json
|
||||
import difflib
|
||||
import random
|
||||
from Src.Utilities.mfp import build_mfp
|
||||
ES_DOMAIN = config.ES_DOMAIN
|
||||
|
||||
ES_PROXY = config.ES_PROXY
|
||||
proxies = {}
|
||||
if ES_PROXY == "1":
|
||||
PROXY_CREDENTIALS = env_vars.get('PROXY_CREDENTIALS')
|
||||
proxy_list = json.loads(PROXY_CREDENTIALS)
|
||||
proxy = random.choice(proxy_list)
|
||||
if proxy == "":
|
||||
proxies = {}
|
||||
else:
|
||||
proxies = {
|
||||
"http": proxy,
|
||||
"https": proxy
|
||||
}
|
||||
ES_ForwardProxy = config.ES_ForwardProxy
|
||||
if ES_ForwardProxy == "1":
|
||||
ForwardProxy = env_vars.get('ForwardProxy')
|
||||
else:
|
||||
ForwardProxy = ""
|
||||
|
||||
|
||||
|
||||
def convert_numbers(base64_data):
|
||||
image_data = base64.b64decode(base64_data)
|
||||
image = Image.open(BytesIO(image_data))
|
||||
custom_config = r'--oem 3 --psm 6 outputbase digits'
|
||||
number_string = pytesseract.image_to_string(image, config=custom_config)
|
||||
return number_string.strip()
|
||||
|
||||
|
||||
async def get_numbers(safego_url,client):
|
||||
headers = random_headers.generate()
|
||||
headers['User-Agent'] = 'Mozilla/5.0 (X11; Linux x86_64; rv:138.0) Gecko/20100101 Firefox/138.0'
|
||||
response = await client.get(ForwardProxy + safego_url,headers = headers, proxies = proxies)
|
||||
cookies = (response.cookies.get_dict())
|
||||
soup = BeautifulSoup(response.text,'lxml',parse_only=SoupStrainer('img'))
|
||||
numbers = soup.img['src'].split(',')[1]
|
||||
return numbers,cookies
|
||||
|
||||
async def real_page(safego_url,client):
|
||||
try:
|
||||
current_directory = os.path.dirname(os.path.abspath(__file__))
|
||||
file_path = os.path.join(current_directory, 'cookie.txt')
|
||||
headers = random_headers.generate()
|
||||
headers['Origin'] = 'https://safego.cc'
|
||||
headers['Referer'] = safego_url
|
||||
headers['User-Agent'] = 'Mozilla/5.0 (X11; Linux x86_64; rv:138.0) Gecko/20100101 Firefox/138.0'
|
||||
with open(file_path, 'r') as file:
|
||||
cookies = file.read()
|
||||
cookies = json.loads(cookies.replace("'", '"'))
|
||||
response = await client.post(ForwardProxy + safego_url,headers=headers, cookies = cookies, proxies = proxies)
|
||||
soup = BeautifulSoup(response.text,'lxml', parse_only=SoupStrainer('a'))
|
||||
if len(soup)>= 1:
|
||||
return soup.a['href']
|
||||
else:
|
||||
logger.info("Getting numbers")
|
||||
numbers,cookies = await get_numbers(safego_url,client)
|
||||
numbers = convert_numbers(numbers)
|
||||
data = {'captch4': numbers}
|
||||
response = await client.post(ForwardProxy + safego_url,headers=headers, data=data, cookies = cookies, proxies = proxies)
|
||||
cap4 = response.headers.get('set-cookie').split(';')[0]
|
||||
cookies[cap4.split('=')[0]] = cap4.split('=')[1]
|
||||
with open(file_path, 'w') as file:
|
||||
file.write(str(cookies))
|
||||
soup = BeautifulSoup(response.text,'lxml', parse_only=SoupStrainer('a'))
|
||||
return soup.a['href']
|
||||
except Exception as e:
|
||||
logger.info(f"ES{e}")
|
||||
async def get_host_link(pattern,atag,client):
|
||||
match = re.search(pattern, atag)
|
||||
headers = random_headers.generate()
|
||||
if match:
|
||||
href_value = match.group(1)
|
||||
response = await client.head(ForwardProxy + href_value, headers={**headers, 'Range': 'bytes=0-0'}, proxies = proxies)
|
||||
href_value = response.url
|
||||
href = await real_page(href_value,client)
|
||||
return href
|
||||
async def scraping_links(atag,MFP,MFP_CREDENTIALS,client,streams,language):
|
||||
#Check which hosts are avaiable and extract the links from one of them. Turbovid uses Cloudflare therefore is not avaiable. Maxstream has a captcha.
|
||||
if "MixDrop" in atag and "DeltaBit" in atag:
|
||||
pattern = r'<a\s+href="([^"]+)"[^>]*rel="noopener"[^>]*>DeltaBit</a>'
|
||||
href = await get_host_link(pattern,atag,client)
|
||||
try:
|
||||
streams = await deltabit(href,client,streams,"Eurostreaming",proxies,ForwardProxy,language)
|
||||
except Exception as e:
|
||||
pattern = r'<a\s+href="([^"]+)"[^>]*rel="noopener"[^>]*>MixDrop</a>'
|
||||
href = await get_host_link(pattern,atag,client)
|
||||
streams = await mixdrop(href,client,MFP,MFP_CREDENTIALS,streams,"Eurostreaming",proxies,ForwardProxy,language)
|
||||
return streams
|
||||
if "MixDrop" in atag and "DeltaBit" not in atag:
|
||||
try:
|
||||
pattern = r'<a\s+href="([^"]+)"[^>]*rel="noopener"[^>]*>MixDrop</a>'
|
||||
href = await get_host_link(pattern,atag,client)
|
||||
streams = await mixdrop(href,client,MFP,MFP_CREDENTIALS,streams,"Eurostreaming",proxies,ForwardProxy,language)
|
||||
return streams
|
||||
except Exception as e:
|
||||
return streams
|
||||
if 'DeltaBit' in atag and "MixDrop" not in atag:
|
||||
try:
|
||||
pattern = r'<a\s+href="([^"]+)"[^>]*rel="noopener"[^>]*>DeltaBit</a>'
|
||||
href = await get_host_link(pattern,atag,client)
|
||||
streams = await deltabit(href,client,streams,"Eurostreaming",proxies,ForwardProxy,language)
|
||||
return streams
|
||||
except Exception as e:
|
||||
return streams
|
||||
if 'DeltaBit' not in atag and 'MixDrop' not in atag:
|
||||
logger.info("Just give up")
|
||||
return streams
|
||||
|
||||
async def episodes_find(description,season,episode,MFP,MFP_CREDENTIALS,client,streams):
|
||||
t = 0
|
||||
episode = episode.zfill(2)
|
||||
pattern = rf'{season}×{episode}\s*(.*?)(?=<br\s*/?>)'
|
||||
match = re.findall(pattern, description)
|
||||
if match:
|
||||
for episode_details in match:
|
||||
if "href" in episode_details:
|
||||
if t == 0:
|
||||
language = "\nITA"
|
||||
elif t == 1:
|
||||
language = "\nSUB-ITA"
|
||||
t +=1
|
||||
streams = await scraping_links(episode_details.split(' – ', 1)[1],MFP,MFP_CREDENTIALS,client,streams,language)
|
||||
return streams
|
||||
async def search(showname,date,season,episode,MFP,MFP_CREDENTIALS,client,streams):
|
||||
headers = random_headers.generate()
|
||||
|
||||
response = await client.get(ForwardProxy + f"{ES_DOMAIN}/wp-json/wp/v2/search?search={quote(showname)}&_fields=id", proxies = proxies, headers = headers)
|
||||
results = response.json()
|
||||
for i in results:
|
||||
response = await client.get(ForwardProxy + f"{ES_DOMAIN}/wp-json/wp/v2/posts/{i['id']}?_fields=content,title", proxies = proxies, headers = headers)
|
||||
if f'ID articolo non valido' in response.text:
|
||||
continue
|
||||
description = response.json()
|
||||
title = description['title']['rendered']
|
||||
description = description['content']['rendered']
|
||||
ratio = difflib.SequenceMatcher(None, title, showname).ratio()
|
||||
if ratio >=0.96:
|
||||
streams = await episodes_find(description,season,episode,MFP,MFP_CREDENTIALS,client,streams)
|
||||
return streams
|
||||
else:
|
||||
year_pattern = re.compile(r'(?<!/)(19|20)\d{2}(?!/)')
|
||||
match = year_pattern.search(description)
|
||||
if match:
|
||||
year = match.group(0)
|
||||
|
||||
else:
|
||||
pattern = r'<a\s+href="([^"]+)"[^>]*>Continua a leggere</a>'
|
||||
match = re.search(pattern, description)
|
||||
if match:
|
||||
href_value = match.group(1)
|
||||
response_2 = await client.get(ForwardProxy + href_value, proxies = proxies, headers = headers)
|
||||
match = year_pattern.search(response_2.text)
|
||||
if match:
|
||||
year = match.group(0)
|
||||
if abs(int(year) - int(date)) <=1:
|
||||
streams = await episodes_find(description,season,episode,MFP,MFP_CREDENTIALS,client,streams)
|
||||
return streams
|
||||
return streams
|
||||
|
||||
|
||||
|
||||
async def eurostreaming(streams,id,client,MFP,MFP_CREDENTIALS):
|
||||
try:
|
||||
general = await is_movie(id)
|
||||
ismovie = general[0]
|
||||
clean_id = general[1]
|
||||
type = "Eurostreaming"
|
||||
if ismovie == 0 :
|
||||
season = str(general[2])
|
||||
episode = str(general[3])
|
||||
elif ismovie == 1:
|
||||
return streams
|
||||
if "tmdb" in id:
|
||||
showname,date = get_info_tmdb(clean_id,ismovie,type)
|
||||
else:
|
||||
showname,date = await get_info_imdb(clean_id,ismovie,type,client)
|
||||
logger.info(f"ES {showname}")
|
||||
streams = await search(showname,date, season,episode,MFP,MFP_CREDENTIALS,client,streams)
|
||||
return streams
|
||||
except Exception as e:
|
||||
logger.warning(f"ES {e}")
|
||||
return streams
|
||||
|
||||
|
||||
|
||||
|
||||
async def test_euro():
|
||||
from curl_cffi.requests import AsyncSession
|
||||
async with AsyncSession() as client:
|
||||
results = await eurostreaming({'streams': []},"tt6156584:4:1",client,"0",['test','test'])
|
||||
print(results)
|
||||
|
||||
async def test_deltabit():
|
||||
from curl_cffi.requests import AsyncSession
|
||||
async with AsyncSession() as client:
|
||||
results = await deltabit("https://deltabit.co/fgeki2456ab1",client)
|
||||
print(results)
|
||||
|
||||
if __name__ == "__main__":
|
||||
import asyncio
|
||||
asyncio.run(test_euro())
|
||||
#python3 -m Src.API.eurostreaming
|
||||
|
||||
'''tt11950864
|
||||
'''
|
||||
@@ -0,0 +1,85 @@
|
||||
from fake_headers import Headers
|
||||
import Src.Utilities.config as config
|
||||
from bs4 import BeautifulSoup,SoupStrainer
|
||||
import re
|
||||
import time
|
||||
import logging
|
||||
from Src.Utilities.config import setup_logging
|
||||
level = config.LEVEL
|
||||
logger = setup_logging(level)
|
||||
Icon = config.Icon
|
||||
Name = config.Name
|
||||
random_headers = Headers()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
async def deltabit(page_url,client,streams,site_name,proxies,ForwardProxy,language):
|
||||
"""Extract Deltabit URL."""
|
||||
i = 0
|
||||
#Set up some headers
|
||||
headers = random_headers.generate()
|
||||
headers2 = random_headers.generate()
|
||||
|
||||
#Get the redirected link, so the actual deltabit link.
|
||||
page_url_response = await client.get(ForwardProxy + page_url,headers={**headers, 'Range': 'bytes=0-0'}, proxies=proxies)
|
||||
page_url = page_url_response.url
|
||||
logger.info(f"Page_URl is {page_url}")
|
||||
|
||||
#Change the referer and user agent of the generated headers
|
||||
headers2['referer'] = 'https://safego.cc/'
|
||||
headers2['user-agent'] = 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36'
|
||||
|
||||
#Request to the deltabit link
|
||||
response = await client.get(ForwardProxy + page_url, headers = headers2, allow_redirects = True, proxies = proxies)
|
||||
page_url = response.url
|
||||
#Often deltabit redirects to another deltabit link. We need the redirected link to put it in the headers.
|
||||
origin = page_url.split('/')[2]
|
||||
headers['origin'] = f'https://{origin}'
|
||||
headers['referer'] = page_url
|
||||
headers['user-agent'] = 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36'
|
||||
#We check the page for the data such as hash and fname.
|
||||
soup = BeautifulSoup(response.text, 'lxml', parse_only=SoupStrainer('input'))
|
||||
data = {}
|
||||
for input in soup:
|
||||
name = input.get('name')
|
||||
value = input.get('value')
|
||||
data[name] = value
|
||||
data['imhuman'] = ''
|
||||
data['referer']= page_url
|
||||
#We need to wait 2.5 seconds or the request will fail
|
||||
time.sleep(2.5)
|
||||
|
||||
|
||||
fname = data['fname']
|
||||
#Request to the deltabit link
|
||||
response = await client.post(ForwardProxy + page_url, data = data, headers = headers, proxies = proxies)
|
||||
link = re.findall(r'sources:\s*\["([^"]+)"', response.text, re.DOTALL)
|
||||
if not link:
|
||||
if not i >= 3:
|
||||
page_url = 'https://deltabit.co/q4r8w4assff4'
|
||||
link,fname = await deltabit(page_url,client,streams,site_name,proxies,ForwardProxy,language)
|
||||
i +=1
|
||||
else:
|
||||
link = link[0]
|
||||
if link:
|
||||
streams['streams'].append({'name': f"{Name}{language}",'title': f'{Icon}{site_name}\n▶️ Deltabit\n{fname}', 'url': link, 'behaviorHints': {'bingeGroup': f'{site_name.lower()}'}})
|
||||
|
||||
|
||||
return streams
|
||||
|
||||
|
||||
|
||||
|
||||
#Testing
|
||||
async def test_deltabit():
|
||||
from curl_cffi.requests import AsyncSession
|
||||
async with AsyncSession() as client:
|
||||
results = await deltabit("https://deltabit.co/a54ehb8w42pe",client,{'streams': []},'Deltabit', {},"","")
|
||||
print(results)
|
||||
if __name__ == "__main__":
|
||||
import asyncio
|
||||
asyncio.run(test_deltabit())
|
||||
|
||||
# https://loadm.cam/#cfnqx
|
||||
@@ -0,0 +1,18 @@
|
||||
import Src.Utilities.config as config
|
||||
from Src.Utilities.eval import eval_solver
|
||||
import logging
|
||||
from Src.Utilities.config import setup_logging
|
||||
level = config.LEVEL
|
||||
logger = setup_logging(level)
|
||||
Icon = config.Icon
|
||||
Name = config.Name
|
||||
|
||||
|
||||
|
||||
async def dropload(player_link,client,streams,site_name, proxies, ForwardProxy):
|
||||
url = await eval_solver(player_link, proxies,ForwardProxy, client)
|
||||
if url:
|
||||
streams['streams'].append({'name': f"{Name}",'title': f'{Icon}{site_name}\n▶️ Dropload', 'url': url, 'behaviorHints': {'proxyHeaders': {"request": {"User-Agent": 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36'}}, 'notWebReady': True, 'bingeGroup': f'{site_name.lower()}'}})
|
||||
logger.info(f"{site_name} on Dropload found results for the current ID")
|
||||
|
||||
return streams
|
||||
@@ -0,0 +1,41 @@
|
||||
import Src.Utilities.config as config
|
||||
Icon = config.Icon
|
||||
Name = config.Name
|
||||
import re
|
||||
from fake_headers import Headers
|
||||
random_headers = Headers()
|
||||
import logging
|
||||
from Src.Utilities.config import setup_logging
|
||||
level = config.LEVEL
|
||||
logger = setup_logging(level)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
async def hdplayer(hdplayer,client,streams,Referer,site_name,proxies,ForwardProxy):
|
||||
headers = random_headers.generate()
|
||||
response = await client.get(hdplayer, allow_redirects=True, headers = headers)
|
||||
match = re.search(r'sources:\s*\[\s*\{\s*file\s*:\s*"([^"]*)"', response.text)
|
||||
url = match.group(1)
|
||||
if url:
|
||||
#Fix for Exoplayer which needs .m3u8 in the url to play the file
|
||||
url = url + ".m3u8"
|
||||
streams['streams'].append({'name': f"{Name}\n720/1080p",'title': f'{Icon}{site_name}\n ▶️ HDPlayer', 'url': url, 'behaviorHints': {'proxyHeaders': {"request": {"Referer": Referer}}, 'notWebReady': True, 'bingeGroup': f'{site_name.lower()}'}})
|
||||
logger.info(f"{site_name} on HDPlayer found results for the current ID")
|
||||
|
||||
return streams
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#Testing
|
||||
async def test_hdplayer():
|
||||
from curl_cffi.requests import AsyncSession
|
||||
async with AsyncSession() as client:
|
||||
results = await hdplayer("https://hdplayer.gives/embed/udnjutxECQGuwsU",client,{'streams': []},'https://hdplayer.gives/', "StreamingWatch", {},'')
|
||||
print(results)
|
||||
if __name__ == "__main__":
|
||||
import asyncio
|
||||
asyncio.run(test_hdplayer())
|
||||
@@ -0,0 +1,94 @@
|
||||
import requests
|
||||
from Crypto.Cipher import AES
|
||||
import json
|
||||
import re
|
||||
from rich.prompt import Prompt
|
||||
from rich.console import Console
|
||||
from fake_headers import Headers
|
||||
import Src.Utilities.config as config
|
||||
import logging
|
||||
from Src.Utilities.config import setup_logging
|
||||
level = config.LEVEL
|
||||
logger = setup_logging(level)
|
||||
Icon = config.Icon
|
||||
Name = config.Name
|
||||
'''
|
||||
This script was done mostly by @Arrowar, creator of https://github.com/Arrowar/StreamingCommunity/
|
||||
It was modified for the use in MammaMia
|
||||
'''
|
||||
|
||||
|
||||
random_headers = Headers()
|
||||
|
||||
KEY = b'kiemtienmua911ca' # 16 byte
|
||||
IV = b'1234567890oiuytr' # 16 byte
|
||||
|
||||
|
||||
async def fetch_response(client,referer,player_url,url,id, proxies, ForwardProxy):
|
||||
headers = random_headers.generate()
|
||||
headers['referer'] = player_url
|
||||
data = {
|
||||
'id': id,
|
||||
'w': '2560',
|
||||
'h': '1440',
|
||||
'r': referer,
|
||||
}
|
||||
response = await client.get(ForwardProxy + url, headers=headers, params = data, proxies = proxies)
|
||||
return response.text
|
||||
|
||||
def hex_to_bytes(hex_str):
|
||||
hex_str = re.sub(r'[^0-9a-fA-F]', '', hex_str)
|
||||
|
||||
if len(hex_str) % 2 != 0:
|
||||
hex_str = '0' + hex_str
|
||||
|
||||
return bytes(int(hex_str[i:i+2], 16) for i in range(0, len(hex_str), 2))
|
||||
|
||||
def decrypt_aes_cbc(ciphertext_bytes, key, iv):
|
||||
cipher = AES.new(key, AES.MODE_CBC, iv)
|
||||
decrypted = cipher.decrypt(ciphertext_bytes)
|
||||
|
||||
pad_len = decrypted[-1]
|
||||
if 1 <= pad_len <= 16:
|
||||
decrypted = decrypted[:-pad_len]
|
||||
|
||||
return decrypted
|
||||
|
||||
|
||||
|
||||
async def loadm(player_link,client,streams,referer,site_name,proxies,ForwardProxy):
|
||||
parts = player_link.split('#')
|
||||
id = parts[1]
|
||||
player_url = parts[0]
|
||||
api = player_url + 'api/v1/video'
|
||||
#It downloads m (crypted informations) from the API"
|
||||
response_hex = await fetch_response(client,referer,player_url,api,id, proxies, ForwardProxy)
|
||||
#Convert Hex in Bytes
|
||||
ciphertext_bytes = hex_to_bytes(response_hex)
|
||||
#We decrypt AES-CBC encryption with Key,IV and the bytes
|
||||
decrypted_bytes = decrypt_aes_cbc(ciphertext_bytes, KEY, IV)
|
||||
decrypted_str = decrypted_bytes.decode('utf-8')
|
||||
data = json.loads(decrypted_str)
|
||||
#We get the hls
|
||||
hls = data['cf']
|
||||
title = data['title']
|
||||
if hls:
|
||||
streams['streams'].append({'name': f"{Name}",'title': f'{Icon}{site_name}\n▶️ Loadm\n{title}', 'url': hls, 'behaviorHints': {'proxyHeaders': {"request": {"Referer": player_url}}, 'notWebReady': True, 'bingeGroup': f'{site_name.lower()}'}})
|
||||
logger.info(f"{site_name} on Loadm found results for the current ID")
|
||||
return streams
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#Testing
|
||||
async def test_loadm():
|
||||
from curl_cffi.requests import AsyncSession
|
||||
async with AsyncSession() as client:
|
||||
results = await loadm("https://loadm.cam/#6wx1p",client,{'streams': []},'guardoserie.live', 'Guardoserie', {},"")
|
||||
print(results)
|
||||
if __name__ == "__main__":
|
||||
import asyncio
|
||||
asyncio.run(test_loadm())
|
||||
|
||||
# https://loadm.cam/#cfnqx
|
||||
@@ -0,0 +1,31 @@
|
||||
import Src.Utilities.config as config
|
||||
Icon = config.Icon
|
||||
Name = config.Name
|
||||
from Src.Utilities.mfp import build_mfp
|
||||
import logging
|
||||
from Src.Utilities.config import setup_logging
|
||||
level = config.LEVEL
|
||||
logger = setup_logging(level)
|
||||
from Src.Utilities.eval import eval_solver
|
||||
|
||||
|
||||
async def mixdrop(url,client,MFP,MFP_CREDENTIALS,streams,site_name,proxies,ForwardProxy,language):
|
||||
"""Extract Mixdrop URL."""
|
||||
if "club" in url:
|
||||
url = url.replace("club", "cv").split("/2")[0]
|
||||
if "cfd" in url:
|
||||
url = url.replace("cfd", "cv").replace("emb","e").split("/2")[0]
|
||||
if MFP == "1":
|
||||
url = await build_mfp(MFP_CREDENTIALS,url,"Mixdrop",client)
|
||||
if url and "https%3ANone" not in url:
|
||||
logger.info(f"{site_name} on Mixdrop found results for the current ID")
|
||||
streams['streams'].append({'name': f"{Name} 🕵️♂️\n{language}",'title': f'{Icon}{site_name}\n▶️ MixDrop', 'url': url, 'behaviorHints':{'bingeGroup': f'{site_name.lower()}'}})
|
||||
|
||||
else:
|
||||
headers = {"accept-language": "en-US,en;q=0.5"}
|
||||
url = await eval_solver(url, proxies , ForwardProxy, client)
|
||||
if url:
|
||||
url = "https:" + url
|
||||
logger.info(f"{site_name} on Mixdrop found results for the current ID")
|
||||
streams['streams'].append({'name': f"{Name}{language}",'title': f'{Icon}{site_name}\n▶️ MixDrop', 'url': url, 'behaviorHints': {'proxyHeaders': {"request": {"User-Agent": 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36'}}, 'notWebReady': True, 'bingeGroup': f'{site_name.lower()}'}})
|
||||
return streams
|
||||
@@ -0,0 +1,18 @@
|
||||
import Src.Utilities.config as config
|
||||
from Src.Utilities.eval import eval_solver
|
||||
import logging
|
||||
from Src.Utilities.config import setup_logging
|
||||
level = config.LEVEL
|
||||
logger = setup_logging(level)
|
||||
Icon = config.Icon
|
||||
Name = config.Name
|
||||
|
||||
|
||||
|
||||
|
||||
async def supervideo(supervideo_link,client,streams, site_name, proxies,ForwardProxy):
|
||||
url = await eval_solver(supervideo_link,proxies, ForwardProxy, client)
|
||||
if url:
|
||||
streams['streams'].append({'name': f"{Name}",'title': f'{Icon}{site_name}\n▶️ Supervideo', 'url': url, 'behaviorHints': {'bingeGroup': f'{site_name.lower()}'}})
|
||||
logger.info(f"{site_name} on SuperVideo found results for the current ID")
|
||||
return streams
|
||||
@@ -0,0 +1,28 @@
|
||||
from fake_headers import Headers
|
||||
import Src.Utilities.config as config
|
||||
Icon = config.Icon
|
||||
Name = config.Name
|
||||
from Src.Utilities.mfp import build_mfp
|
||||
from fake_headers import Headers
|
||||
import re
|
||||
import logging
|
||||
from Src.Utilities.config import setup_logging
|
||||
level = config.LEVEL
|
||||
logger = setup_logging(level)
|
||||
random_headers = Headers()
|
||||
|
||||
async def uqload(player_link,client,MFP,MFP_CREDENTIALS,streams,site_name,proxies,ForwardProxy):
|
||||
headers = random_headers.generate()
|
||||
if MFP == "1":
|
||||
url = await build_mfp(MFP_CREDENTIALS, player_link, "Uqload",client)
|
||||
streams['streams'].append({'name': f"{Name} 🕵️♂️",'title': f'{Icon}{site_name}\n▶️ Uqload', 'url': url, 'behaviorHints': {'proxyHeaders': {"request": {"User-Agent": 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36'}}, 'notWebReady': True, 'bingeGroup': 'guardaflix'}})
|
||||
return streams
|
||||
response = await client.get(ForwardProxy + player_link, headers = headers, proxies = proxies)
|
||||
video_url_match = re.search(r'sources: \["(.*?)"]', response.text)
|
||||
title = re.search(r'title: "(.*?)"', response.text).group(1)
|
||||
if video_url_match:
|
||||
url = video_url_match.group(1)
|
||||
if url:
|
||||
streams['streams'].append({'name': f"{Name}",'title': f'{Icon}{site_name}\n▶️ Uqload\n{title}', 'url': url, 'behaviorHints': {'proxyHeaders': {"request": {"User-Agent": 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36'}}, 'notWebReady': True, 'bingeGroup': f'{site_name.lower()}'}})
|
||||
logger.info(f"{site_name} on Uqload found results for the current ID")
|
||||
return streams
|
||||
@@ -0,0 +1,73 @@
|
||||
from fake_headers import Headers
|
||||
import re
|
||||
from bs4 import BeautifulSoup,SoupStrainer
|
||||
random_headers = Headers()
|
||||
import Src.Utilities.config as config
|
||||
Icon = config.Icon
|
||||
Name = config.Name
|
||||
from Src.Utilities.mfp import build_mfp
|
||||
import logging
|
||||
from Src.Utilities.config import setup_logging
|
||||
level = config.LEVEL
|
||||
logger = setup_logging(level)
|
||||
SC_DOMAIN = config.SC_DOMAIN
|
||||
User_Agent= "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36"
|
||||
|
||||
|
||||
async def vixcloud(link,client,MFP,MFP_CREDENTIALS,streams,site_name,proxies,ForwardProxy):
|
||||
if MFP == "1":
|
||||
final_url = await build_mfp(MFP_CREDENTIALS, link, "VixCloud",client)
|
||||
quality = ""
|
||||
mfp_icon = '🕵️♂️'
|
||||
if final_url:
|
||||
streams['streams'].append({"name":f'{Name} {mfp_icon}\n{quality}', 'title': f'{Icon} StreamingCommunity\n▶️ Vixcloud','url': final_url,'behaviorHints': {'bingeGroup': f'{site_name.lower()}{quality}'}})
|
||||
return streams
|
||||
mfp_icon = ''
|
||||
headers = random_headers.generate()
|
||||
headers['Referer'] = f"{SC_DOMAIN}/"
|
||||
headers['Origin'] = f"{SC_DOMAIN}"
|
||||
headers['User-Agent'] = User_Agent
|
||||
headers['user-agent'] = User_Agent
|
||||
response = await client.get(link)
|
||||
if response.status_code != 200:
|
||||
logger.warning("Failed to extract URL components, Invalid Request")
|
||||
soup = BeautifulSoup(response.text, "lxml", parse_only=SoupStrainer("body"))
|
||||
if soup:
|
||||
script = soup.find("body").find("script").text
|
||||
token = re.search(r"'token':\s*'(\w+)'", script).group(1)
|
||||
expires = re.search(r"'expires':\s*'(\d+)'", script).group(1)
|
||||
server_url = re.search(r"url:\s*'([^']+)'", script).group(1)
|
||||
try:
|
||||
quality = re.search(r'"quality":(\d+)', script).group(1)
|
||||
except:
|
||||
quality = ""
|
||||
if "?b=1" in server_url:
|
||||
final_url = f'{server_url}&token={token}&expires={expires}'
|
||||
else:
|
||||
final_url = f"{server_url}?token={token}&expires={expires}"
|
||||
if "window.canPlayFHD = true" in script:
|
||||
final_url += "&h=1"
|
||||
if final_url:
|
||||
logger.info(f"Vixcloud Found Results for the current ID")
|
||||
streams['streams'].append({"name":f'{Name} {mfp_icon}\n{quality}', 'title': f'{Icon} StreamingCommunity\n▶️ Vixcloud','url': final_url,'behaviorHints': {'proxyHeaders': {"request": {"user-agent": User_Agent}}, 'notWebReady': True, 'bingeGroup': f'{site_name.lower()}{quality}'}})
|
||||
|
||||
return streams
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#Testing
|
||||
async def test_vixcloud():
|
||||
from curl_cffi.requests import AsyncSession
|
||||
async with AsyncSession() as client:
|
||||
results = await vixcloud("https://vixsrc.to/tv/204082/1/3/",client,"0",['',''],{'streams': []},'guardoserie.live', {},'')
|
||||
print(results)
|
||||
if __name__ == "__main__":
|
||||
import asyncio
|
||||
asyncio.run(test_vixcloud())
|
||||
|
||||
@@ -1,183 +0,0 @@
|
||||
|
||||
from tmdbv3api import TMDb, Movie, TV
|
||||
from bs4 import BeautifulSoup,SoupStrainer
|
||||
import string
|
||||
import re
|
||||
import dateparser
|
||||
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
|
||||
import urllib.parse
|
||||
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',
|
||||
'Accept-Language': 'en-US,en;q=0.5'
|
||||
}
|
||||
#Map months to check if date = date
|
||||
month_mapping = {
|
||||
'Jan': 'Gennaio', 'Feb': 'Febbraio', 'Mar': 'Marzo', 'Apr': 'Aprile',
|
||||
'May': 'Maggio', 'Jun': 'Giugno', 'Jul': 'Luglio', 'Aug': 'Agosto',
|
||||
'Sep': 'Settembre', 'Oct': 'Ottobre', 'Nov': 'Novembre', 'Dec': 'Dicembre'
|
||||
}
|
||||
|
||||
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, 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
|
||||
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")
|
||||
if release_date == date:
|
||||
url = link
|
||||
tid = 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("")
|
||||
|
||||
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={actual_season}&episode_id={episode-1}'
|
||||
return tlink
|
||||
|
||||
|
||||
def get_film(url):
|
||||
#Get the link from where we have to obtain mixdrop link
|
||||
tlink = url + "?show_video=true"
|
||||
return tlink
|
||||
|
||||
async def get_real_link(tlink,client):
|
||||
#Some basic code to get the mixdrop link
|
||||
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, 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:
|
||||
real_link = mega_button.get('meta-link')
|
||||
return real_link
|
||||
|
||||
async def get_true_link(real_link,client):
|
||||
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("|")
|
||||
charset = string.digits + string.ascii_letters
|
||||
d = dict()
|
||||
for i in range(len(terms)):
|
||||
d[charset[i]] = terms[i] or charset[i]
|
||||
s = 'https:'
|
||||
for c in schema:
|
||||
s += d[c] if c in d else c
|
||||
return s
|
||||
|
||||
async def filmpertutti(imdb,client):
|
||||
general = is_movie(imdb)
|
||||
ismovie = general[0]
|
||||
imdb_id = general[1]
|
||||
type = "Filmpertutti"
|
||||
if ismovie == 0 :
|
||||
season = general[2]
|
||||
episode = int(general[3])
|
||||
if "tt" in imdb:
|
||||
if ismovie == 0:
|
||||
#Get showname and date
|
||||
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
|
||||
showname,date = await get_info_imdb(imdb_id,ismovie,type, client)
|
||||
season = None
|
||||
|
||||
elif "tmdb" in imdb:
|
||||
#Get showname and date
|
||||
tmdba = imdb_id.replace("tmdb:","")
|
||||
showname,date = get_info_tmdb(tmdba,ismovie,type)
|
||||
showname = showname.replace(" ", "+").replace("–", "+").replace("—","+")
|
||||
showname = urllib.parse.quote_plus(showname)
|
||||
#Build the query
|
||||
query = f'https://filmpertutti.{FT_DOMAIN}/wp-json/wp/v2/posts?search={showname}&page=1&_fields=link,id'
|
||||
try:
|
||||
url,tid,actual_season = await search(query,date,client,season,ismovie)
|
||||
except:
|
||||
print("MammaMia: No results found for Filmpertutti")
|
||||
return None
|
||||
if ismovie == 0:
|
||||
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)
|
||||
#Let's get mixdrop link
|
||||
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)
|
||||
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")
|
||||
'''
|
||||
@@ -0,0 +1,119 @@
|
||||
from Src.Utilities.info import get_info_tmdb, is_movie, get_info_imdb
|
||||
import Src.Utilities.config as config
|
||||
from fake_headers import Headers
|
||||
from Src.Utilities.loadenv import load_env
|
||||
from urllib.parse import quote
|
||||
from bs4 import BeautifulSoup, SoupStrainer
|
||||
from Src.API.extractors.loadm import loadm
|
||||
from Src.API.extractors.uqload import uqload
|
||||
from Src.API.extractors.dropload import dropload
|
||||
import logging
|
||||
from Src.Utilities.config import setup_logging
|
||||
import json
|
||||
import random
|
||||
level = config.LEVEL
|
||||
logger = setup_logging(level)
|
||||
env_vars = load_env()
|
||||
random_headers = Headers()
|
||||
GF_DOMAIN = config.GF_DOMAIN
|
||||
|
||||
GF_PROXY = config.GF_PROXY
|
||||
proxies = {}
|
||||
if GF_PROXY == "1":
|
||||
PROXY_CREDENTIALS = env_vars.get('PROXY_CREDENTIALS')
|
||||
proxy_list = json.loads(PROXY_CREDENTIALS)
|
||||
proxy = random.choice(proxy_list)
|
||||
if proxy == "":
|
||||
proxies = {}
|
||||
else:
|
||||
proxies = {
|
||||
"http": proxy,
|
||||
"https": proxy
|
||||
}
|
||||
GF_ForwardProxy = config.GF_ForwardProxy
|
||||
if GF_ForwardProxy == "1":
|
||||
ForwardProxy = env_vars.get('ForwardProxy')
|
||||
else:
|
||||
ForwardProxy = ""
|
||||
|
||||
|
||||
|
||||
async def get_player(page_link,MFP, MFP_CREDENTIALS,client, headers,streams):
|
||||
response = await client.get(ForwardProxy + page_link, headers= headers, proxies = proxies)
|
||||
soup = BeautifulSoup(response.text,'lxml', parse_only=SoupStrainer('iframe'))
|
||||
iframe = soup.find('iframe')
|
||||
player_link = iframe.get('data-src') or iframe.get('src')
|
||||
if "loadm" in player_link:
|
||||
referer = page_link.split('//')[1].split('/')[0]
|
||||
streams = await loadm(player_link,client,streams,referer,"Guardaflix", proxies, ForwardProxy)
|
||||
elif "uqload" in player_link:
|
||||
streams = await uqload(player_link,client,MFP,MFP_CREDENTIALS,streams,"Guardaflix", proxies, ForwardProxy)
|
||||
elif "dropload" in player_link:
|
||||
streams = await dropload(player_link,client,streams,"Guardaflix", proxies, ForwardProxy)
|
||||
return streams
|
||||
|
||||
async def search(showname,date,MFP,MFP_CREDENTIALS,client,streams):
|
||||
headers = random_headers.generate()
|
||||
headers['Origin'] = f'{GF_DOMAIN}'
|
||||
headers['Referer'] = f'{GF_DOMAIN}/'
|
||||
headers['Content-Type'] = 'application/x-www-form-urlencoded; charset=UTF-8'
|
||||
data = {
|
||||
'action': 'action_tr_search_suggest',
|
||||
'nonce': '20115729b4',
|
||||
'term': showname,
|
||||
}
|
||||
response = await client.post(ForwardProxy + f'{GF_DOMAIN}/wp-admin/admin-ajax.php', headers=headers, data=data, proxies = proxies)
|
||||
soup = BeautifulSoup(response.text,'lxml', parse_only= SoupStrainer('a'))
|
||||
a_tags = soup.find_all('a')
|
||||
for a in a_tags:
|
||||
href = a['href']
|
||||
logger.info(href)
|
||||
response = await client.get(ForwardProxy + href, headers = headers, proxies = proxies)
|
||||
soup = BeautifulSoup(response.text,'lxml', parse_only = SoupStrainer(['iframe', 'span']))
|
||||
year = soup.find('span',class_='year fa-calendar far').text
|
||||
if year == date:
|
||||
iframe = soup.find('iframe')
|
||||
page_link = iframe.get('data-src') or iframe.get('src')
|
||||
streams = await get_player(page_link,MFP,MFP_CREDENTIALS,client, headers,streams)
|
||||
return streams
|
||||
return streams
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
async def guardaflix(streams,id,client,MFP,MFP_CREDENTIALS):
|
||||
try:
|
||||
general = await is_movie(id)
|
||||
ismovie = general[0]
|
||||
clean_id = general[1]
|
||||
type = "Guardaflix"
|
||||
if ismovie == 0:
|
||||
return streams
|
||||
if "tmdb" in id:
|
||||
showname,date = get_info_tmdb(clean_id,ismovie,type)
|
||||
else:
|
||||
showname,date = await get_info_imdb(clean_id,ismovie,type,client)
|
||||
logger.info(showname)
|
||||
streams = await search(showname,date,MFP,MFP_CREDENTIALS,client,streams)
|
||||
return streams
|
||||
except Exception as e:
|
||||
logger.warning(f'GF {e}')
|
||||
return streams
|
||||
|
||||
|
||||
|
||||
|
||||
async def test_guardaflix():
|
||||
from curl_cffi.requests import AsyncSession
|
||||
async with AsyncSession() as client:
|
||||
results = await guardaflix({'streams': []},"tt4045450",client,"0",['test','test'])
|
||||
print(results)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
import asyncio
|
||||
asyncio.run(test_guardaflix())
|
||||
@@ -0,0 +1,74 @@
|
||||
from Src.Utilities.info import is_movie
|
||||
from bs4 import BeautifulSoup,SoupStrainer
|
||||
import re
|
||||
import Src.Utilities.config as config
|
||||
from fake_headers import Headers
|
||||
from Src.Utilities.loadenv import load_env
|
||||
from Src.API.extractors.supervideo import supervideo
|
||||
import json, random
|
||||
import logging
|
||||
from Src.Utilities.config import setup_logging
|
||||
level = config.LEVEL
|
||||
logger = setup_logging(level)
|
||||
env_vars = load_env()
|
||||
GH_PROXY = config.GH_PROXY
|
||||
proxies = {}
|
||||
if GH_PROXY == "1":
|
||||
PROXY_CREDENTIALS = env_vars.get('PROXY_CREDENTIALS')
|
||||
proxy_list = json.loads(PROXY_CREDENTIALS)
|
||||
proxy = random.choice(proxy_list)
|
||||
if proxy == "":
|
||||
proxies = {}
|
||||
else:
|
||||
proxies = {
|
||||
"http": proxy,
|
||||
"https": proxy
|
||||
}
|
||||
GH_ForwardProxy = config.GH_ForwardProxy
|
||||
if GH_ForwardProxy == "1":
|
||||
ForwardProxy = env_vars.get('ForwardProxy')
|
||||
else:
|
||||
ForwardProxy = ""
|
||||
GHD_DOMAIN = config.GHD_DOMAIN
|
||||
|
||||
random_headers = Headers()
|
||||
|
||||
|
||||
async def search(clean_id,client):
|
||||
headers = random_headers.generate()
|
||||
response = await client.get(ForwardProxy + f"{GHD_DOMAIN}/set-movie-a/{clean_id}", allow_redirects=True, headers = headers, proxies = proxies)
|
||||
if response.status_code != 200:
|
||||
logger.warning(f"GuardaHD Failed to fetch search results: {response.status_code}")
|
||||
soup = BeautifulSoup(response.text,'lxml',parse_only=SoupStrainer('li'))
|
||||
li_tag = soup.find('li')
|
||||
href = "https:" + li_tag['data-link']
|
||||
return href
|
||||
|
||||
|
||||
|
||||
async def guardahd(streams,id,client):
|
||||
try:
|
||||
general = await is_movie(id)
|
||||
ismovie = general[0]
|
||||
clean_id = general[1]
|
||||
if ismovie == 0:
|
||||
return streams
|
||||
supervideo_link = await search(clean_id,client)
|
||||
streams = await supervideo(supervideo_link, client,streams,"GuardaHD",proxies, ForwardProxy)
|
||||
return streams
|
||||
except Exception as e:
|
||||
logger.warning(f"MammaMia: GuardaHD Failed {e}")
|
||||
return streams
|
||||
|
||||
async def test_script():
|
||||
from curl_cffi.requests import AsyncSession
|
||||
async with AsyncSession() as client:
|
||||
# Replace with actual id, for example 'anime_id:episode' format
|
||||
test_id = "tt16426418" # This is an example ID format
|
||||
results = await guardahd({'streams': []},test_id, client)
|
||||
print(results)
|
||||
|
||||
if __name__ == "__main__":
|
||||
import asyncio
|
||||
asyncio.run(test_script())
|
||||
|
||||
@@ -0,0 +1,151 @@
|
||||
from Src.Utilities.info import is_movie
|
||||
from bs4 import BeautifulSoup,SoupStrainer
|
||||
import re
|
||||
import Src.Utilities.config as config
|
||||
from fake_headers import Headers
|
||||
from Src.Utilities.loadenv import load_env
|
||||
import json, random
|
||||
from Src.Utilities.info import get_info_imdb,get_info_tmdb
|
||||
import urllib.parse
|
||||
from Src.Utilities.convert import get_IMDB_id_from_TMDb_id
|
||||
from Src.API.extractors.supervideo import supervideo
|
||||
import logging
|
||||
from Src.Utilities.config import setup_logging
|
||||
level = config.LEVEL
|
||||
logger = setup_logging(level)
|
||||
|
||||
env_vars = load_env()
|
||||
GS_PROXY = config.GS_PROXY
|
||||
proxies = {}
|
||||
if GS_PROXY == "1":
|
||||
PROXY_CREDENTIALS = env_vars.get('PROXY_CREDENTIALS')
|
||||
proxy_list = json.loads(PROXY_CREDENTIALS)
|
||||
proxy = random.choice(proxy_list)
|
||||
if proxy == "":
|
||||
proxies = {}
|
||||
else:
|
||||
proxies = {
|
||||
"http": proxy,
|
||||
"https": proxy
|
||||
}
|
||||
GS_ForwardProxy = config.GS_ForwardProxy
|
||||
if GS_ForwardProxy == "1":
|
||||
ForwardProxy = env_vars.get('ForwardProxy')
|
||||
else:
|
||||
ForwardProxy = ""
|
||||
#Get domain
|
||||
GS_DOMAIN = config.GS_DOMAIN
|
||||
random_headers = Headers()
|
||||
|
||||
async def search_imdb(clean_id,client):
|
||||
try:
|
||||
headers = random_headers.generate()
|
||||
response = await client.get(ForwardProxy + f'{GS_DOMAIN}/?story={clean_id}&do=search&subaction=search', allow_redirects=True, headers = headers, proxies = proxies)
|
||||
if response.status_code != 200:
|
||||
logger.warning(f"Guardaserie Failed to fetch search results: {response.status_code}")
|
||||
soup = BeautifulSoup(response.text,'lxml',parse_only=SoupStrainer('div',class_="mlnh-2"))
|
||||
div_mlnh2 = soup.select_one('div.mlnh-2:nth-of-type(2)')
|
||||
a_tag = div_mlnh2.find('h2').find('a')
|
||||
href = a_tag['href']
|
||||
return href
|
||||
except Exception as e:
|
||||
logger.warning(f'GS {e}')
|
||||
return None
|
||||
|
||||
async def search(showname,date,client):
|
||||
try:
|
||||
headers = random_headers.generate()
|
||||
showname = urllib.parse.quote(showname)
|
||||
response = await client.get(ForwardProxy + f'{GS_DOMAIN}/?story={showname}&do=search&subaction=search', allow_redirects=True, impersonate = "chrome124", headers = headers, proxies = proxies)
|
||||
if response.status_code != 200:
|
||||
logger.warning(f"Guardaserie Failed to fetch search results: {response.status_code}")
|
||||
soup = BeautifulSoup(response.text,'lxml',parse_only=SoupStrainer('div'))
|
||||
div_mlnew = soup.find_all('div', class_='mlnew')
|
||||
for mlnew in div_mlnew:
|
||||
div_date = mlnew.find('div', class_='mlnh-3 hdn').text
|
||||
div_date = div_date[:4]
|
||||
if div_date == date:
|
||||
a_tag = mlnew.find('div', class_='mlnh-2').find('h2').find('a')
|
||||
href = a_tag['href']
|
||||
return href
|
||||
|
||||
except Exception as e:
|
||||
return None
|
||||
|
||||
|
||||
|
||||
async def player_url(page_url, season, episode,client):
|
||||
try:
|
||||
headers = random_headers.generate()
|
||||
response = await client.get(ForwardProxy + page_url, allow_redirects=True, headers = headers, proxies = proxies)
|
||||
soup = BeautifulSoup(response.text,'lxml',parse_only=SoupStrainer('a'))
|
||||
a_tag = soup.find('a', id = f"serie-{season}_{episode}")
|
||||
href = a_tag['data-link']
|
||||
return href
|
||||
except Exception as e:
|
||||
return None
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
async def guardaserie(streams,id,client):
|
||||
try:
|
||||
general = await is_movie(id)
|
||||
ismovie = general[0]
|
||||
clean_id = general[1]
|
||||
if ismovie == 1:
|
||||
return streams
|
||||
if ismovie == 0:
|
||||
season = general[2]
|
||||
episode = general[3]
|
||||
type = "Guardaserie"
|
||||
page_url = await search_imdb(clean_id,client)
|
||||
supervideo_link =await player_url(page_url,season,episode,client)
|
||||
if supervideo_link:
|
||||
streams = await supervideo(supervideo_link, client, streams,"Guardaserie",proxies, ForwardProxy)
|
||||
return streams
|
||||
else:
|
||||
logger.warning(" GS Couldn't find iframe source")
|
||||
return streams
|
||||
except Exception as e:
|
||||
logger.warning(f"MammaMia: Guardaserie Failed{e}")
|
||||
return streams
|
||||
|
||||
|
||||
async def test_script():
|
||||
from curl_cffi.requests import AsyncSession
|
||||
async with AsyncSession() as client:
|
||||
# Replace with actual id, for example 'anime_id:episode' format
|
||||
test_id = "tt10919420:1:1" # This is an example ID format tt0460649
|
||||
results = await guardaserie({'streams': []},test_id, client)
|
||||
print(results)
|
||||
|
||||
if __name__ == "__main__":
|
||||
import asyncio
|
||||
asyncio.run(test_script())
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
'''
|
||||
if "tt" not in clean_id:
|
||||
clean_id = await get_IMDB_id_from_TMDb_id(clean_id,client)
|
||||
print(clean_id)
|
||||
'''
|
||||
'''
|
||||
if "tt" in id:
|
||||
showname,date = await get_info_imdb(clean_id,ismovie,type,client)
|
||||
else:
|
||||
showname,date = get_info_tmdb(clean_id,ismovie,type)
|
||||
showname = showname.replace("'"," ")
|
||||
if "Guru" in showname:
|
||||
showname = showname.split("-")[0]
|
||||
'''
|
||||
'''
|
||||
page_url = await search(showname,date,client)
|
||||
'''
|
||||
@@ -0,0 +1,141 @@
|
||||
from Src.Utilities.info import get_info_tmdb, is_movie, get_info_imdb
|
||||
import Src.Utilities.config as config
|
||||
from fake_headers import Headers
|
||||
from Src.Utilities.loadenv import load_env
|
||||
from urllib.parse import quote
|
||||
from bs4 import BeautifulSoup, SoupStrainer
|
||||
import re
|
||||
from Src.API.extractors.uqload import uqload
|
||||
from Src.API.extractors.loadm import loadm
|
||||
from Src.API.extractors.dropload import dropload
|
||||
import logging
|
||||
from Src.Utilities.config import setup_logging
|
||||
level = config.LEVEL
|
||||
import json
|
||||
import random
|
||||
logger = setup_logging(level)
|
||||
env_vars = load_env()
|
||||
random_headers = Headers()
|
||||
GO_DOMAIN = config.GO_DOMAIN
|
||||
|
||||
GO_PROXY = config.GO_PROXY
|
||||
proxies = {}
|
||||
if GO_PROXY == "1":
|
||||
PROXY_CREDENTIALS = env_vars.get('PROXY_CREDENTIALS')
|
||||
proxy_list = json.loads(PROXY_CREDENTIALS)
|
||||
proxy = random.choice(proxy_list)
|
||||
if proxy == "":
|
||||
proxies = {}
|
||||
else:
|
||||
proxies = {
|
||||
"http": proxy,
|
||||
"https": proxy
|
||||
}
|
||||
GO_ForwardProxy = config.GO_ForwardProxy
|
||||
if GO_ForwardProxy == "1":
|
||||
ForwardProxy = env_vars.get('ForwardProxy')
|
||||
else:
|
||||
ForwardProxy = ""
|
||||
|
||||
|
||||
|
||||
async def get_player(page_link,MFP,MFP_CREDENTIALS,client, headers, streams):
|
||||
response = await client.get(ForwardProxy + page_link, headers= headers, proxies = proxies)
|
||||
soup = BeautifulSoup(response.text,'lxml', parse_only=SoupStrainer('iframe'))
|
||||
iframe = soup.find('iframe')
|
||||
player_link = iframe.get('data-src') or iframe.get('src')
|
||||
urls = []
|
||||
if "loadm" in player_link:
|
||||
referer = page_link.split('//')[1].split('/')[0]
|
||||
streams = await loadm(player_link,client,streams,referer,"Guardoserie", proxies,ForwardProxy)
|
||||
elif "uqload" in player_link:
|
||||
streams = await uqload(player_link,client,MFP,MFP_CREDENTIALS,streams,"Guardoserie",proxies,ForwardProxy)
|
||||
elif "dropload" in player_link:
|
||||
streams = await dropload(player_link,client,streams,"Guardoserie",proxies,ForwardProxy)
|
||||
return streams
|
||||
|
||||
|
||||
async def search(showname,date,season,episode,MFP, MFP_CREDENTIALS,ismovie,client,streams,):
|
||||
headers = random_headers.generate()
|
||||
headers['Origin'] = f'{GO_DOMAIN}'
|
||||
headers['Referer'] = f'{GO_DOMAIN}/'
|
||||
headers['Content-Type'] = 'application/x-www-form-urlencoded; charset=UTF-8'
|
||||
showname = quote(showname)
|
||||
data = f's={showname}&action=searchwp_live_search&swpengine=default&swpquery={showname}'
|
||||
response = await client.post(ForwardProxy + f'{GO_DOMAIN}/wp-admin/admin-ajax.php', data = data, headers = headers, proxies = proxies)
|
||||
soup = BeautifulSoup(response.text,'lxml', parse_only= SoupStrainer('a', class_='ss-title'))
|
||||
a_tags = soup.find_all('a')
|
||||
for a in a_tags:
|
||||
href = a['href']
|
||||
response = await client.get(ForwardProxy + href, headers = headers, proxies = proxies)
|
||||
pattern = r'(?<=/release-year\/)(\d{4})(?=\/" rel="tag">)'
|
||||
match = re.search(pattern, response.text)
|
||||
if match:
|
||||
year = match.group(0)
|
||||
if year == date:
|
||||
if ismovie == 0:
|
||||
soup = BeautifulSoup(response.text, 'lxml', parse_only= SoupStrainer('div', class_='les-content'))
|
||||
divs = soup.find_all('div', class_='les-content')
|
||||
actual_div = divs[int(season)-1]
|
||||
episodes_a = actual_div.find_all('a')
|
||||
actual_episode = episodes_a[int(episode)-1]
|
||||
page_link = actual_episode['href']
|
||||
logger.info(page_link)
|
||||
elif ismovie == 1:
|
||||
page_link = href
|
||||
streams = await get_player(page_link,MFP,MFP_CREDENTIALS,client, headers,streams)
|
||||
return streams
|
||||
return streams
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
async def guardoserie(streams,id,client,MFP,MFP_CREDENTIALS):
|
||||
try:
|
||||
general = await is_movie(id)
|
||||
ismovie = general[0]
|
||||
clean_id = general[1]
|
||||
type = "Guardoserie"
|
||||
if ismovie == 0 :
|
||||
season = str(general[2])
|
||||
episode = str(general[3])
|
||||
elif ismovie == 1:
|
||||
season = None
|
||||
episode = None
|
||||
if "tmdb" in id:
|
||||
showname,date = get_info_tmdb(clean_id,ismovie,type)
|
||||
else:
|
||||
showname,date = await get_info_imdb(clean_id,ismovie,type,client)
|
||||
logger.info(f'GO {showname}')
|
||||
streams = await search(showname,date, season,episode,MFP,MFP_CREDENTIALS,ismovie,client,streams)
|
||||
return streams
|
||||
except Exception as e:
|
||||
logger.warning(f'GO {e}')
|
||||
return streams
|
||||
|
||||
|
||||
|
||||
|
||||
async def test_guardoserie():
|
||||
from curl_cffi.requests import AsyncSession
|
||||
async with AsyncSession() as client:
|
||||
results = await guardoserie({'streams': []},"tt10919420:1:1",client,"1",['test','test'])
|
||||
print(results)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
import asyncio
|
||||
asyncio.run(test_guardoserie())
|
||||
@@ -3,6 +3,7 @@ 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()
|
||||
ForwardProxy = env_vars.get('ALTERNATIVE_LINK')
|
||||
MYSTERIUS_KEY = env_vars.get('MYSTERIUS_KEY')
|
||||
|
||||
async def get_links(slug,season,episode,ismovie,client):
|
||||
@@ -10,31 +11,28 @@ async def get_links(slug,season,episode,ismovie,client):
|
||||
headers = {
|
||||
"x-api-key": MYSTERIUS_KEY
|
||||
}
|
||||
response = await client.get("https://mammamia-urlo-ulala12431.hf.space/api/cookie", headers=headers)
|
||||
response = await client.get("https://aimammam-ulala12431.hf.space/api/cookie", headers=headers)
|
||||
Auths = response.json()
|
||||
Bearer = Auths.get('cookie')
|
||||
ap_session = Auths.get('auth')
|
||||
|
||||
cookies = {'ap_session': ap_session}
|
||||
|
||||
print(cookies)
|
||||
headers = {
|
||||
'accept': 'application/json, text/plain, */*',
|
||||
'accept-language': 'it-IT,it;q=0.9,en-US;q=0.8,en;q=0.7',
|
||||
'authorization': f'Bearer {Bearer}',
|
||||
'referer': f'https://altadefinizione-originale.com/play/{slug}',
|
||||
'referer': f'https://altadefinizioneapp.com/play/{slug}',
|
||||
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36 OPR/111.0.0.0',
|
||||
'x-requested-with': 'XMLHttpRequest',
|
||||
}
|
||||
if ismovie == 1:
|
||||
|
||||
response = await client.get(f'https://altadefinizione-originale.com/api/post/urls/stream/{slug}',cookies=cookies,headers=headers)
|
||||
response = await client.get(f'https://altadefinizioneapp.com/api/post/urls/stream/{slug}',cookies=cookies,headers=headers)
|
||||
elif ismovie == 0:
|
||||
print("HERE SEASON",season)
|
||||
print("HERE EPISODE",episode)
|
||||
request_url =f'https://altadefinizione-originale.com/api/post/urls/stream/{slug}/{season}/{episode}'
|
||||
request_url =f'https://altadefinizioneapp.com/api/post/urls/stream/{slug}/{season}/{episode}'
|
||||
print(request_url)
|
||||
response = await client.get(request_url,cookies=cookies,headers=headers)
|
||||
print(response.text)
|
||||
try:
|
||||
video_data = response.json() # Assuming this is the JSON response containing video streams
|
||||
if 'streams' not in video_data:
|
||||
@@ -82,7 +80,7 @@ async def get_links(slug,season,episode,ismovie,client):
|
||||
async def search_imdb(showname,tmdba,client):
|
||||
showname = showname.replace(" ","%20")
|
||||
tmdba = str(tmdba)
|
||||
query = f'https://altadefinizione-originale.com/api/search?search={showname}&page=1'
|
||||
query = f'https://altadefinizioneapp.com/api/search?search={showname}&page=1'
|
||||
response = await client.get(query,allow_redirects=True, impersonate = "chrome120")
|
||||
if response.status_code == 200:
|
||||
data = response.json()
|
||||
@@ -92,7 +90,6 @@ async def search_imdb(showname,tmdba,client):
|
||||
tmdb_id = ''.join(char for char in tmdb_id if char.isdigit())
|
||||
if tmdb_id == tmdba:
|
||||
slug = item.get('slug')
|
||||
print(slug)
|
||||
return slug
|
||||
|
||||
|
||||
@@ -100,11 +97,9 @@ async def search_imdb(showname,tmdba,client):
|
||||
def parse_links(resolution_links):
|
||||
results = {}
|
||||
if resolution_links:
|
||||
print("Video links:")
|
||||
for resolution, link in resolution_links.items():
|
||||
if "cdn.altadefinizione-originale.com" in link:
|
||||
link = link.replace("cdn.altadefinizione-originale.com","protectlinknt.b-cdn.net")
|
||||
print(f"{resolution}: {link}")
|
||||
if "cdn.altadefinizione-originale.com" in link or "cdn.altadefinizioneapp.com" in link:
|
||||
link = link.replace("cdn.altadefinizione-originale.com","protectlinknt.b-cdn.net").replace("cdn.altadefinizioneapp.com","protectlinknt.b-cdn.net")
|
||||
results[resolution] = link
|
||||
return results
|
||||
else:
|
||||
@@ -114,7 +109,7 @@ def parse_links(resolution_links):
|
||||
async def cool(imdb,client):
|
||||
try:
|
||||
type = "Cool"
|
||||
general = is_movie(imdb)
|
||||
general = await is_movie(imdb)
|
||||
ismovie = general[0]
|
||||
imdb_id = general[1]
|
||||
if ismovie == 0 :
|
||||
@@ -146,7 +141,7 @@ async def cool(imdb,client):
|
||||
except Exception as e:
|
||||
print("Cool Error",e)
|
||||
return None
|
||||
'''
|
||||
|
||||
async def test_animeworld():
|
||||
from curl_cffi.requests import AsyncSession
|
||||
async with AsyncSession() as client:
|
||||
@@ -157,4 +152,3 @@ async def test_animeworld():
|
||||
if __name__ == "__main__":
|
||||
import asyncio
|
||||
asyncio.run(test_animeworld())
|
||||
'''
|
||||
@@ -3,16 +3,23 @@ import re
|
||||
from bs4 import BeautifulSoup, SoupStrainer
|
||||
from Src.Utilities.info import get_info_imdb, is_movie, get_info_tmdb
|
||||
import urllib.parse
|
||||
import Src.Utilities.config as config
|
||||
|
||||
DDL_DOMAIN = config.DDL_DOMAIN
|
||||
ips4_device_key = config.ips4_device_key
|
||||
ips4_login_key = config.ips4_login_key
|
||||
ips4_member_id = config.ips4_member_id
|
||||
ips4_IPSSessionFront = config.ips4_IPSSessionFront
|
||||
cookies = {
|
||||
'ips4_device_key': 'b6f084be79c28bb53ecfc556fd7a2a70',
|
||||
'ips4_IPSSessionFront': 'f2b9db91793e084cf2003a07c563e6aa',
|
||||
'ips4_member_id': '4029711',
|
||||
'ips4_login_key': '41b6a70b16cce2fd39482f5b21a9c35f',
|
||||
'ips4_device_key': ips4_device_key,
|
||||
'ips4_IPSSessionFront': ips4_IPSSessionFront,
|
||||
'ips4_member_id': ips4_member_id,
|
||||
'ips4_login_key': ips4_login_key
|
||||
}
|
||||
|
||||
async def search_series(client,id,season,episode,showname):
|
||||
showname = showname.replace(" ", "%20").replace("–", "+").replace("—","+")
|
||||
response = await client.get(f"https://ddlstreamitaly.co/search/?&q={showname}%20{season}%20Streaming&type=videobox_video&quick=1&nodes=11&search_and_or=and&search_in=titles&sortby=relevancy")
|
||||
response = await client.get(f"{DDL_DOMAIN}/search/?&q={showname}%20{season}%20Streaming&type=videobox_video&quick=1&nodes=11,36&search_and_or=and&search_in=titles&sortby=relevancy", cookies = cookies)
|
||||
soup = BeautifulSoup(response.text, 'lxml',parse_only=SoupStrainer('a'))
|
||||
a_tags = soup.find_all('a', {'data-linktype': 'link'})
|
||||
for a in a_tags:
|
||||
@@ -48,7 +55,6 @@ async def get_episode(client,link,episode):
|
||||
'Sec-Fetch-Site': 'same-origin',
|
||||
'Sec-Fetch-User': '?1',
|
||||
'Connection': 'keep-alive',
|
||||
# 'Cookie': 'ips4_device_key=b6f084be79c28bb53ecfc556fd7a2a70; ips4_IPSSessionFront=f2b9db91793e084cf2003a07c563e6aa; ips4_ipsTimezone=Europe/Rome; ips4_hasJS=true; ips4_noCache=1; ips4_announcement_3=true; ips4_member_id=4029711; ips4_login_key=41b6a70b16cce2fd39482f5b21a9c35f; ips4_loggedIn=1725985598',
|
||||
'Priority': 'u=1',
|
||||
'Pragma': 'no-cache',
|
||||
'Cache-Control': 'no-cache',
|
||||
@@ -58,11 +64,7 @@ async def get_episode(client,link,episode):
|
||||
}
|
||||
|
||||
|
||||
|
||||
episode = "6"
|
||||
response = await client.get(link, cookies = cookies, headers = headers, params = params, impersonate="chrome120")
|
||||
print(link)
|
||||
|
||||
response = await client.get(link, cookies = cookies, headers = headers, params = params, impersonate="chrome124")
|
||||
pattern = rf'<a\s+href="([^"]+)"[^>]*>\s*Part {episode}\s*</a>'
|
||||
match = re.search(pattern, response.text)
|
||||
mp4_link = match.group(1)
|
||||
@@ -71,9 +73,9 @@ async def get_episode(client,link,episode):
|
||||
return mp4_link
|
||||
|
||||
async def search_movie(client,showname,id):
|
||||
showname = showname.replace(" ", "%20").replace("–", "+").replace("—","+")
|
||||
showname = urllib.parse.quote_plus(showname)
|
||||
link = f"https://ddlstreamitaly.co/search/?&q={showname}%20Streaming&quick=1&nodes=11&search_and_or=and&search_in=titles&sortby=relevancy"
|
||||
showname = showname.replace("–", "+").replace("—","+")
|
||||
showname = urllib.parse.quote(showname)
|
||||
link = f"{DDL_DOMAIN}/search/?&q={showname}%20Streaming&quick=1&nodes=11&search_and_or=and&search_in=titles&sortby=relevancy"
|
||||
response = await client.get(link,impersonate = "chrome120")
|
||||
soup = BeautifulSoup(response.text, 'lxml',parse_only=SoupStrainer('a'))
|
||||
a_tags = soup.find_all('a', {'data-linktype': 'link'})
|
||||
@@ -116,13 +118,12 @@ async def get_mp4(client,link):
|
||||
|
||||
async def ddlstream(imdb,client):
|
||||
try:
|
||||
general = is_movie(imdb)
|
||||
general = await is_movie(imdb)
|
||||
ismovie = general[0]
|
||||
id = general[1]
|
||||
type = "DDLStream"
|
||||
if "tt" in imdb:
|
||||
showname = await get_info_imdb(id,ismovie,type,client)
|
||||
print(showname)
|
||||
else:
|
||||
showname = get_info_tmdb(id,ismovie,type)
|
||||
if ismovie == 0:
|
||||
@@ -131,24 +132,22 @@ async def ddlstream(imdb,client):
|
||||
page_link = await search_series(client,id,season,episode,showname)
|
||||
mp4_link = await get_episode(client,page_link,episode)
|
||||
final_url = await get_mp4(client,mp4_link)
|
||||
print(final_url)
|
||||
return final_url
|
||||
else:
|
||||
page_link = await search_movie(client,showname,id)
|
||||
mp4_link = page_link + "?area=online"
|
||||
final_url = await get_mp4(client,mp4_link)
|
||||
print(final_url)
|
||||
return final_url
|
||||
|
||||
except Exception as e:
|
||||
print(f"MammaMia: DDLStream Failed {e}")
|
||||
return None,None
|
||||
return None
|
||||
|
||||
|
||||
'''
|
||||
async def test_animeworld():
|
||||
from curl_cffi.requests import AsyncSession
|
||||
async with AsyncSession() as client:
|
||||
test_id = "tt6263850" # This is an example ID format
|
||||
test_id = "tt3148266:3:4" # This is an example ID format
|
||||
results = await ddlstream(test_id, client)
|
||||
print(results)
|
||||
|
||||
@@ -158,4 +157,3 @@ if __name__ == "__main__":
|
||||
|
||||
|
||||
#python3 -m Src.API.ddlstream
|
||||
'''
|
||||
@@ -0,0 +1,211 @@
|
||||
|
||||
from tmdbv3api import TMDb, Movie, TV
|
||||
from bs4 import BeautifulSoup,SoupStrainer
|
||||
import string
|
||||
import re
|
||||
import dateparser
|
||||
from Src.Utilities.convert import get_TMDb_id_from_IMDb_id, get_IMDB_id_from_TMDb_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
|
||||
import urllib.parse
|
||||
#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',
|
||||
'Accept-Language': 'en-US,en;q=0.5'
|
||||
}
|
||||
#Map months to check if date = date
|
||||
month_mapping = {
|
||||
'Jan': 'Gennaio', 'Feb': 'Febbraio', 'Mar': 'Marzo', 'Apr': 'Aprile',
|
||||
'May': 'Maggio', 'Jun': 'Giugno', 'Jul': 'Luglio', 'Aug': 'Agosto',
|
||||
'Sep': 'Settembre', 'Oct': 'Ottobre', 'Nov': 'Novembre', 'Dec': 'Dicembre'
|
||||
}
|
||||
async def get_streamtape(link,client):
|
||||
headers = {
|
||||
'user-agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36',
|
||||
}
|
||||
response = await client.get(link, headers=headers, impersonate = "chrome124")
|
||||
regex = r"id=.*?(?=')"
|
||||
matches = re.findall(regex, response.text)
|
||||
i = 0
|
||||
final_url = next((f"https://streamtape.com/get_video?{matches[i + 1]}" for i in range(len(matches) - 1) if matches[i] == matches[i + 1]), None)
|
||||
return final_url
|
||||
|
||||
|
||||
async def search(query,imdb_id,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, allow_redirects=True, timeout = 30)
|
||||
series_soup = BeautifulSoup(series_response.text, 'lxml')
|
||||
imdb_pattern = r"'imdb_id':\s*'([^']+)'"
|
||||
imdb_match = re.search(imdb_pattern, series_response.text)
|
||||
if imdb_match:
|
||||
id = imdb_match.group(1)
|
||||
print(id)
|
||||
if id == imdb_id:
|
||||
url = link
|
||||
tid = 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("There's no IMDB_ID")
|
||||
|
||||
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={actual_season}&episode_id={episode-1}'
|
||||
return tlink
|
||||
|
||||
|
||||
def get_film(url):
|
||||
#Get the link from where we have to obtain mixdrop link
|
||||
tlink = url + "?show_video=true"
|
||||
return tlink
|
||||
|
||||
async def get_real_link(tlink,client):
|
||||
try:
|
||||
print(tlink)
|
||||
#Some basic code to get the mixdrop link
|
||||
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, allow_redirects=True, timeout = 30)
|
||||
iframe_soup = BeautifulSoup(iframe_page.content, features="lxml", parse_only=SoupStrainer('div',class_="megaButton"))
|
||||
|
||||
mega_button = iframe_soup.find('div', attrs={'class': 'megaButton', 'rel': 'nofollow'}, string='MIXDROP')
|
||||
if mega_button:
|
||||
real_link = mega_button.get('meta-link')
|
||||
return real_link
|
||||
else:
|
||||
mega_button = iframe_soup.find('div', attrs={'class': 'megaButton', 'rel': 'nofollow'}, string='STREAMTAPE')
|
||||
real_link = mega_button.get('meta-link')
|
||||
return real_link
|
||||
except Exception as e:
|
||||
print(f"Error: {e}")
|
||||
return None
|
||||
async def get_true_link(real_link,client):
|
||||
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("|")
|
||||
charset = string.digits + string.ascii_letters
|
||||
d = dict()
|
||||
for i in range(len(terms)):
|
||||
d[charset[i]] = terms[i] or charset[i]
|
||||
s = 'https:'
|
||||
for c in schema:
|
||||
s += d[c] if c in d else c
|
||||
return s
|
||||
|
||||
async def filmpertutti(imdb,client,MFP):
|
||||
try:
|
||||
general = await is_movie(imdb)
|
||||
ismovie = general[0]
|
||||
imdb_id = general[1]
|
||||
type = "Filmpertutti"
|
||||
if ismovie == 0 :
|
||||
season = general[2]
|
||||
episode = int(general[3])
|
||||
else:
|
||||
season = None
|
||||
episode = None
|
||||
if "tt" in imdb:
|
||||
showname = await get_info_imdb(imdb_id,ismovie,type,client)
|
||||
elif "tmdb" in imdb:
|
||||
#Get showname and date
|
||||
tmdba = imdb_id.replace("tmdb:","")
|
||||
imdb_id = await get_IMDB_id_from_TMDb_id(tmdba,client)
|
||||
showname = get_info_tmdb(tmdba,ismovie,type)
|
||||
showname = showname.replace(" ", "+").replace("–", "+").replace("—","+")
|
||||
showname = urllib.parse.quote_plus(showname)
|
||||
# Build the query
|
||||
query = f'{FT_DOMAIN}/wp-json/wp/v2/posts?search={showname}&page=1&_fields=link,id'
|
||||
try:
|
||||
url,tid,actual_season = await search(query,imdb_id,client,season,ismovie)
|
||||
except:
|
||||
print("MammaMia: No results found for Filmpertutti")
|
||||
return None,None
|
||||
if ismovie == 0:
|
||||
episode_link = get_episode_link(actual_season,episode,tid,url)
|
||||
#Let's get mixdrop link
|
||||
real_link = await get_real_link(episode_link,client)
|
||||
if MFP == "1":
|
||||
if "mixdrop" in real_link:
|
||||
Host = "Mixdrop"
|
||||
elif "streamtape" in real_link:
|
||||
Host = "Streamtape"
|
||||
return real_link, Host
|
||||
#let's get delivery link, streaming link
|
||||
if "mixdrop" in real_link:
|
||||
streaming_link = await get_true_link(real_link,client)
|
||||
elif "streamtape" in real_link:
|
||||
streaming_link = await get_streamtape(real_link,client)
|
||||
Host = None
|
||||
return streaming_link, Host
|
||||
elif ismovie == 1:
|
||||
film_link = get_film(url)
|
||||
#Let's get mixdrop link
|
||||
real_link = await get_real_link(film_link,client)
|
||||
if MFP == "1":
|
||||
if "mixdrop" in real_link:
|
||||
Host = "Mixdrop"
|
||||
elif "streamtape" in real_link:
|
||||
Host = "Streamtape"
|
||||
return real_link, Host
|
||||
if "mixdrop" in real_link:
|
||||
streaming_link = await get_true_link(real_link,client)
|
||||
elif "streamtape" in real_link:
|
||||
streaming_link = await get_streamtape(real_link,client)
|
||||
#let's get delivery link, streaming link
|
||||
Host = None
|
||||
return streaming_link, Host
|
||||
except Exception as e:
|
||||
print(f"Filmpertutti failed: {e}")
|
||||
return None,None
|
||||
|
||||
async def test_animeworld():
|
||||
from curl_cffi.requests import AsyncSession
|
||||
async with AsyncSession() as client:
|
||||
MFP = "1"
|
||||
# Replace with actual id, for example 'anime_id:episode' format
|
||||
test_id = "tt1190634:1:1" # This is an example ID format
|
||||
results = await filmpertutti(test_id, client,MFP)
|
||||
|
||||
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")
|
||||
'''
|
||||
@@ -12,11 +12,11 @@ async def search(showname,date,season,episode,ismovie,client):
|
||||
}
|
||||
|
||||
headers = {
|
||||
'authority': f'lordchannel.{LC_DOMAIN}',
|
||||
'authority': f'{LC_DOMAIN}',
|
||||
'accept': '*/*',
|
||||
'accept-language': 'it-IT,it;q=0.9,en-US;q=0.8,en;q=0.7',
|
||||
# 'cookie': 'csrftoken=7lvc502CZe8Zbx7iSX1xkZOBA1NbDxJZ',
|
||||
'referer': f'https://lordchannel.{LC_DOMAIN}/anime/anime-ita/',
|
||||
'referer': f'{LC_DOMAIN}/anime/anime-ita/',
|
||||
'sec-ch-ua': '"Not-A.Brand";v="99", "Chromium";v="124"',
|
||||
'sec-ch-ua-mobile': '?0',
|
||||
'sec-ch-ua-platform': '"Android"',
|
||||
@@ -31,13 +31,13 @@ async def search(showname,date,season,episode,ismovie,client):
|
||||
'media': showname,
|
||||
'_': '1724421723999',
|
||||
}
|
||||
response = await client.get(f'https://lordchannel.{LC_DOMAIN}/live_search/', params=params, cookies=cookies, headers=headers, allow_redirects=True, impersonate = "chrome120")
|
||||
response = await client.get(f'{LC_DOMAIN}/live_search/', params=params, cookies=cookies, headers=headers, allow_redirects=True, impersonate = "chrome124")
|
||||
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}'
|
||||
link = f'{LC_DOMAIN}{href}'
|
||||
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)")
|
||||
@@ -62,16 +62,15 @@ async def search(showname,date,season,episode,ismovie,client):
|
||||
|
||||
async def get_m3u8(video_url,client):
|
||||
response = await client.get(video_url, allow_redirects=True, impersonate = "chrome120")
|
||||
pattern = r'const\s+videoData\s*=\s*\[(.*?)\];'
|
||||
pattern = r'https?://[^\s]+\.m3u8'
|
||||
match = re.search(pattern, response.text)
|
||||
if match:
|
||||
video_data = match.group(1).strip().split(', ')
|
||||
url = video_data[0]
|
||||
url = match.group(0)
|
||||
return url
|
||||
|
||||
async def lordchannel(imdb,client):
|
||||
try:
|
||||
general = is_movie(imdb)
|
||||
general = await is_movie(imdb)
|
||||
ismovie = general[0]
|
||||
imdb_id = general[1]
|
||||
type = "LordChannel"
|
||||
@@ -99,8 +98,6 @@ async def lordchannel(imdb,client):
|
||||
print("MammaMia: Lordchannel Failed",e)
|
||||
return None,None
|
||||
|
||||
|
||||
'''
|
||||
async def test_animeworld():
|
||||
from curl_cffi.requests import AsyncSession
|
||||
async with AsyncSession() as client:
|
||||
@@ -110,4 +107,4 @@ async def test_animeworld():
|
||||
if __name__ == "__main__":
|
||||
import asyncio
|
||||
asyncio.run(test_animeworld())
|
||||
'''
|
||||
#python3 -m Src.API.lordchannel
|
||||
@@ -0,0 +1,132 @@
|
||||
from urllib.parse import urlparse, parse_qs,unquote,quote
|
||||
from fastapi import APIRouter, HTTPException, Response, Request
|
||||
from curl_cffi.requests import AsyncSession
|
||||
import Src.Utilities.config as config
|
||||
from Src.Utilities.loadenv import load_env
|
||||
env_vars = load_env()
|
||||
SC_PROXY = config.SC_PROXY
|
||||
VX_PROXY = config.VX_PROXY
|
||||
import json
|
||||
import re
|
||||
|
||||
import random
|
||||
proxies = {}
|
||||
proxies2 = {}
|
||||
if VX_PROXY == "1":
|
||||
PROXY_CREDENTIALS = env_vars.get('PROXY_CREDENTIALS')
|
||||
proxy_list = json.loads(PROXY_CREDENTIALS)
|
||||
proxy = random.choice(proxy_list)
|
||||
if proxy == "":
|
||||
proxies2 = {}
|
||||
else:
|
||||
proxies2 = {
|
||||
"http": proxy,
|
||||
"https": proxy
|
||||
}
|
||||
if SC_PROXY == "1":
|
||||
PROXY_CREDENTIALS = env_vars.get('PROXY_CREDENTIALS')
|
||||
proxy_list = json.loads(PROXY_CREDENTIALS)
|
||||
proxy = random.choice(proxy_list)
|
||||
if proxy == "":
|
||||
proxies = {}
|
||||
else:
|
||||
proxies = {
|
||||
"http": proxy,
|
||||
"https": proxy
|
||||
}
|
||||
if VX_PROXY == "1":
|
||||
proxies2 = proxies
|
||||
SC_ForwardProxy = config.SC_ForwardProxy
|
||||
VX_ForwardProxy = config.VX_ForwardProxy
|
||||
if SC_ForwardProxy == "1":
|
||||
ForwardProxy = env_vars.get('ForwardProxy')
|
||||
else:
|
||||
ForwardProxy = ""
|
||||
|
||||
if VX_ForwardProxy == "1":
|
||||
ForwardProxy = env_vars.get('ForwardProxy')
|
||||
else:
|
||||
ForwardProxy = ""
|
||||
|
||||
|
||||
router = APIRouter()
|
||||
User_Agent= "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:127.0) Gecko/20100101 Firefox/127.0"
|
||||
async def fetch_m3u8(url):
|
||||
"""Fetch the M3U8 file from the URL and store it in memory."""
|
||||
async with AsyncSession() as client:
|
||||
response = await client.get(ForwardProxy + url,headers = {"User-Agent": User_Agent, "user-agent": User_Agent}, proxies = proxies2)
|
||||
response.raise_for_status() # Raise an error for bad responses
|
||||
return response.text
|
||||
|
||||
@router.get("/clone/manifest.m3u8")
|
||||
async def clone_m3u8(d: str = None):
|
||||
if d:
|
||||
try:
|
||||
d = unquote(d)
|
||||
m3u8_content = await fetch_m3u8(d)
|
||||
return Response(content=m3u8_content, media_type='application/vnd.apple.mpegurl')
|
||||
except Exception as e:
|
||||
print(f"Failed to fetch M3U8 file: {e}")
|
||||
raise HTTPException(status_code=404, detail="M3U8 content not found")
|
||||
#This is just for testing, ignore that endpoint and the func
|
||||
|
||||
|
||||
@router.api_route("/vixcloud/manifest.m3u8", methods=["GET", "HEAD"])
|
||||
async def clone2_m3u8(d:str,token:str,expires:str,h:str = None, b:str = None, request: Request = None):
|
||||
try:
|
||||
m3u8 = f'{d}?token={token}&expires={expires}'
|
||||
if h:
|
||||
m3u8 = m3u8 + f'&h={h}'
|
||||
if b:
|
||||
m3u8 = m3u8 + f'&b={b}'
|
||||
forwarded_proto = request.headers.get("x-forwarded-proto")
|
||||
scheme = forwarded_proto if forwarded_proto else request.url.scheme
|
||||
instance_url = f"{scheme}://{request.url.netloc}"
|
||||
m3u8_content = await fetch_m3u8(m3u8)
|
||||
modified_playlist = m3u8_content.replace("https://vixcloud.co/playlist/", f"{instance_url}/clony/")
|
||||
|
||||
return Response(content=modified_playlist, media_type='application/vnd.apple.mpegurl')
|
||||
except Exception as e:
|
||||
print(f"Failed to fetch M3U8 file: {e}")
|
||||
raise HTTPException(status_code=404, detail="M3U8 content not found")
|
||||
|
||||
@router.api_route("/clony/{segment:path}", methods=["GET", "HEAD"])
|
||||
async def clony_m3u8(segment: str, request: Request):
|
||||
base_url = "https://vixcloud.co/playlist/"
|
||||
full_url = f"{base_url}{segment}?{request.query_params}"
|
||||
print(full_url, "A",request.query_params)
|
||||
if "rendition=1080p" in full_url or "type=subtitle" in full_url:
|
||||
print(full_url)
|
||||
raise HTTPException(status_code=404, detail="Requested variant not available.")
|
||||
m3u8_content = await fetch_m3u8(full_url)
|
||||
if "sc-u12" not in m3u8_content:
|
||||
m3u8_content = re.sub(r"https://sc-[a-zA-Z0-9]+-\d+.scws-content.net", "https://sc-u12-01.scws-content.net", m3u8_content)
|
||||
return Response(content=m3u8_content, media_type='application/vnd.apple.mpegurl')
|
||||
|
||||
@router.api_route('/storage/enc.key')
|
||||
async def get_key():
|
||||
async with AsyncSession(timeout = 20) as client:
|
||||
response = await client.get(ForwardProxy + 'https://vixcloud.co/storage/enc.key', headers = {"User-Agent": User_Agent, "user-agent": User_Agent}, proxies = proxies2)
|
||||
|
||||
response_headers = {
|
||||
'date': response.headers['date'],
|
||||
'content-length': response.headers['content-length'],
|
||||
'content-type': 'application/octet-stream',
|
||||
'access-control-allow-origin': '*'
|
||||
}
|
||||
|
||||
return Response(
|
||||
response.content,
|
||||
response.status_code,
|
||||
response_headers
|
||||
)
|
||||
#r"https://sc-b1-([0-2][0-9]|30).scws-content.net", "https://sc-u9-01.scws-content.net", m3u8_content)
|
||||
|
||||
|
||||
'''
|
||||
forwarded_proto = request.headers.get("x-forwarded-proto")
|
||||
scheme = forwarded_proto if forwarded_proto else request.url.scheme
|
||||
instance_url = f"{scheme}://{request.url.netloc}"
|
||||
url_streaming_community = url_streaming_community.replace("?","&")
|
||||
url_streaming_community = instance_url + "/vixcloud/manifest.m3u8?d=" + url_streaming_community
|
||||
'''
|
||||
@@ -0,0 +1,38 @@
|
||||
from bs4 import BeautifulSoup
|
||||
import json
|
||||
from Src.Utilities.dictionaries import okru
|
||||
User_Agent= "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:127.0) Gecko/20100101 Firefox/127.0"
|
||||
|
||||
|
||||
headers = {
|
||||
'User-Agent': 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:127.0) Gecko/20100101 Firefox/127.0',
|
||||
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8',
|
||||
'Accept-Language': 'en-US,en;q=0.5',
|
||||
'DNT': '1',
|
||||
'Sec-GPC': '1',
|
||||
'Connection': 'keep-alive',
|
||||
'Upgrade-Insecure-Requests': '1',
|
||||
'Sec-Fetch-Dest': 'document',
|
||||
'Sec-Fetch-Mode': 'navigate',
|
||||
'Sec-Fetch-Site': 'none',
|
||||
'Sec-Fetch-User': '?1',
|
||||
'Priority': 'u=1',
|
||||
'Pragma': 'no-cache',
|
||||
'Cache-Control': 'no-cache',
|
||||
}
|
||||
|
||||
async def okru_get_url(id,client):
|
||||
try:
|
||||
embed_link = okru[id]
|
||||
response = await client.get(embed_link, allow_redirects=True, headers = headers, impersonate = "chrome124")
|
||||
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("MammaMia: Found results for Okru")
|
||||
return m3u8_link
|
||||
except Exception as e:
|
||||
print("MammaMia: No results found for Okru")
|
||||
return None
|
||||
@@ -0,0 +1,157 @@
|
||||
from Src.Utilities.info import get_info_imdb, is_movie, get_info_tmdb
|
||||
from bs4 import BeautifulSoup,SoupStrainer
|
||||
import Src.Utilities.config as config
|
||||
from fake_headers import Headers
|
||||
from Src.Utilities.loadenv import load_env
|
||||
import json, random
|
||||
import re
|
||||
from Src.Utilities.eval import eval_solver
|
||||
import urllib.parse
|
||||
OST_DOMAIN = config.OST_DOMAIN
|
||||
OST_PROXY = config.OST_PROXY
|
||||
env_vars = load_env()
|
||||
proxies = {}
|
||||
if OST_PROXY == "1":
|
||||
PROXY_CREDENTIALS = env_vars.get('PROXY_CREDENTIALS')
|
||||
proxy_list = json.loads(PROXY_CREDENTIALS)
|
||||
proxy = random.choice(proxy_list)
|
||||
if proxy == "":
|
||||
proxies = {}
|
||||
else:
|
||||
proxies = {
|
||||
"http": proxy,
|
||||
"https": proxy
|
||||
}
|
||||
OST_ForwardProxy = config.OST_ForwardProxy
|
||||
if OST_ForwardProxy == "1":
|
||||
ForwardProxy = env_vars.get('ForwardProxy')
|
||||
else:
|
||||
ForwardProxy = ""
|
||||
headers = {
|
||||
'User-Agent': 'Mozilla/5.0 (Linux; Android 12) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.5060.71 Mobile Safari/537.36',
|
||||
'Accept': '*/*',
|
||||
'Accept-Language': 'en-US,en;q=0.5',
|
||||
# 'Accept-Encoding': 'gzip, deflate, br, zstd',
|
||||
'X-Requested-With': 'XMLHttpRequest',
|
||||
'DNT': '1',
|
||||
'Sec-GPC': '1',
|
||||
'Connection': 'keep-alive',
|
||||
'Referer': f'https://onlineserietv.{OST_DOMAIN}/',
|
||||
# 'Cookie': 'player_opt=fx',
|
||||
'Sec-Fetch-Dest': 'empty',
|
||||
'Sec-Fetch-Mode': 'cors',
|
||||
'Sec-Fetch-Site': 'same-origin',
|
||||
'Pragma': 'no-cache',
|
||||
'Cache-Control': 'no-cache',
|
||||
}
|
||||
|
||||
async def search(showname,date,client,ismovie,episode,season):
|
||||
cookies = {
|
||||
'player_opt': 'fx',
|
||||
}
|
||||
params = {
|
||||
's': showname,
|
||||
'action': 'searchwp_live_search',
|
||||
'swpengine': 'default',
|
||||
'swpquery': showname,
|
||||
'origin_id': '50141',
|
||||
'searchwp_live_search_client_nonce': 'undefined',
|
||||
}
|
||||
response = await client.get(ForwardProxy + f"https://onlineserietv.{OST_DOMAIN}/wp-admin/admin-ajax.php?s={urllib.parse.quote(showname)}&action=searchwp_live_search&swpengine=default&swpquery={urllib.parse.quote(showname)}&origin_id=50141&searchwp_live_search_client_nonce=undefined", headers=headers, cookies=cookies, impersonate = "chrome124", proxies = proxies)
|
||||
if response.status_code != 200:
|
||||
print("IP Blocked by OnlineserieTV",response)
|
||||
soup = BeautifulSoup(response.text, 'lxml', parse_only=SoupStrainer('a'))
|
||||
a_tags_with_href = soup.find_all("a", href=True)
|
||||
for a_tag in a_tags_with_href:
|
||||
href = a_tag.get("href")
|
||||
if ismovie == 1:
|
||||
if "film" in href:
|
||||
response = await client.get(ForwardProxy + href, headers=headers, impersonate = "chrome124", proxies = proxies)
|
||||
if response.status_code != 200:
|
||||
print("IP Blocked by OnlineserieTV",response)
|
||||
year_match = re.search(r'Anno: <i>(\d{4})</i>', response.text)
|
||||
year = year_match.group(1) if year_match else None
|
||||
if year == date:
|
||||
pattern = r'https://uprot\.net/fxf/[^\s"<>]+'
|
||||
match = re.search(pattern, response.text)
|
||||
if match:
|
||||
name = a_tag.text.replace("\t","").replace("\n","")
|
||||
flexy_link = match.group()
|
||||
return flexy_link,name
|
||||
else:
|
||||
print("No flexy link found.")
|
||||
else:
|
||||
continue
|
||||
elif ismovie == 0:
|
||||
if "serietv" in href:
|
||||
response = await client.get(ForwardProxy + href, headers=headers, impersonate = "chrome124", proxies = proxies)
|
||||
if response.status_code != 200:
|
||||
print("IP Blocked by OnlineserieTV",response)
|
||||
year_match = re.search(r'Anno: <i>(\d{4})</i>', response.text)
|
||||
year = year_match.group(1) if year_match else None
|
||||
if year == date:
|
||||
season = season.zfill(2)
|
||||
episode = episode.zfill(2)
|
||||
if season == "0000000000000":
|
||||
print(True,season,episode)
|
||||
#pattern = rf'{season}x{episode}.*?<a href=[\'"](https://uprot\.net/fxf/[^\'"]+)|0{episode}.*?<a href=[\'"](https://uprot\.net/fxf/[^\'"]+)'
|
||||
pattern = rf'0{episode}.*?<a href=[\'"](https://uprot\.net/fxf/[^\'"]+)'
|
||||
match1 = re.findall(pattern, response.text)
|
||||
match = re.search(pattern, response.text)
|
||||
print(match)
|
||||
else:
|
||||
pattern = rf'{season}x{episode}.*?<a href=[\'"](https://uprot\.net/fxf/[^\'"]+)'
|
||||
match = re.search(pattern, response.text, re.DOTALL)
|
||||
if match:
|
||||
name = a_tag.text.replace("\t","").replace("\n","")
|
||||
flexy_link = match.group(1)
|
||||
print(match,flexy_link)
|
||||
return flexy_link,name
|
||||
else:
|
||||
print("No flexy link found.")
|
||||
else:
|
||||
continue
|
||||
|
||||
|
||||
|
||||
async def onlineserietv(id,client):
|
||||
try:
|
||||
general = await is_movie(id)
|
||||
ismovie = general[0]
|
||||
clean_id = general[1]
|
||||
if ismovie == 0:
|
||||
season = general[2]
|
||||
episode = general[3]
|
||||
elif ismovie == 1:
|
||||
season = None
|
||||
episode = None
|
||||
type = "Onlineserietv"
|
||||
if "tt" in id:
|
||||
showname,date = await get_info_imdb(clean_id,ismovie,type,client)
|
||||
else:
|
||||
showname,date = get_info_tmdb(clean_id,ismovie,type)
|
||||
showname = showname.replace("'"," ")
|
||||
flexy_link,name = await search(showname,date,client,ismovie,episode,season)
|
||||
flexy_link = flexy_link.replace("fxf","fxe")
|
||||
real_url = await client.head(ForwardProxy + flexy_link, headers=headers, impersonate = "chrome124", proxies = proxies)
|
||||
real_url = real_url.url
|
||||
final_url = await eval_solver(real_url,proxies, ForwardProxy, client)
|
||||
return final_url,name
|
||||
except Exception as e:
|
||||
print("MammaMia: Onlineserietv Failed",e)
|
||||
return None,None
|
||||
|
||||
|
||||
async def test_animeworld():
|
||||
from curl_cffi.requests import AsyncSession
|
||||
async with AsyncSession() as client:
|
||||
test_id = "tt0206516:2:1" # This is an example ID format
|
||||
results = await onlineserietv(test_id, client)
|
||||
print(results)
|
||||
|
||||
if __name__ == "__main__":
|
||||
import asyncio
|
||||
asyncio.run(test_animeworld())
|
||||
|
||||
# Guru Guru tt0330592 Uomo tigre tt0206516
|
||||
#python3 -m Src.API.onlineserietv
|
||||
@@ -4,21 +4,26 @@ import time
|
||||
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_PROXY = config.TF_PROXY
|
||||
if TF_PROXY == "1":
|
||||
PROXY_CREDENTIALS = env_vars.get('PROXY_CREDENTIALS')
|
||||
TF_FORWARDPROXY = config.TF_ForwardProxy
|
||||
if TF_FORWARDPROXY == "1":
|
||||
ForwardProxy = env_vars.get('ForwardProxy')
|
||||
else:
|
||||
ForwardProxy = ""
|
||||
TF_DOMAIN = config.TF_DOMAIN
|
||||
import urllib.parse
|
||||
async def search(showname,ismovie,date,client):
|
||||
showname = showname.replace(" ","%20")
|
||||
showname = urllib.parse.quote_plus(showname)
|
||||
url = f'https://www.tanti.bond/ajax/posts?q={showname}'
|
||||
response = await client.post(url, allow_redirects=True, impersonate = "chrome120")
|
||||
showname = showname.replace(" ","+")
|
||||
url = f'{TF_DOMAIN}/ajax/posts?q={showname}'
|
||||
response = await client.get(url, allow_redirects=True)
|
||||
response = response.json()['data']
|
||||
if ismovie == 1:
|
||||
for link in response:
|
||||
url = link['url']
|
||||
response = client.get(url, allow_redirects=True, impersonate = "chrome120")
|
||||
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))
|
||||
@@ -45,7 +50,7 @@ async def search(showname,ismovie,date,client):
|
||||
|
||||
async def fast_search(showname,ismovie,client):
|
||||
showname = showname.replace(" ","%20")
|
||||
url = f'https://www.tanti.{TF_DOMAIN}/search/{showname}'
|
||||
url = f'{TF_DOMAIN}/search/{showname}'
|
||||
response = await client.get(url, allow_redirects=True, impersonate = "chrome120")
|
||||
soup = BeautifulSoup(response.text, "lxml")
|
||||
if ismovie == 1:
|
||||
@@ -86,7 +91,7 @@ async def get_protect_link(id,url,client):
|
||||
data = {
|
||||
'id': embed_id
|
||||
}
|
||||
ajax_url = f"https://www.tanti.{TF_DOMAIN}/ajax/embed"
|
||||
ajax_url = f"{TF_DOMAIN}/ajax/embed"
|
||||
response = await client.post(ajax_url, headers=headers, data=data)
|
||||
hdplayer = response.text[43:-27]
|
||||
response = await client.get(hdplayer, allow_redirects=True, impersonate = "chrome120")
|
||||
@@ -105,7 +110,7 @@ async def get_protect_link(id,url,client):
|
||||
soup = BeautifulSoup(response.text, "lxml", parse_only=SoupStrainer('iframe'))
|
||||
protect_link = soup.iframe['src']
|
||||
if "protect" in protect_link:
|
||||
url = true_url(protect_link)
|
||||
url = await true_url(protect_link,client)
|
||||
links_dict[title] = url
|
||||
return links_dict
|
||||
# Get the value of the href attribute
|
||||
@@ -120,7 +125,7 @@ async def get_nuovo_indirizzo_and_protect_link(url,embed_id,season,episode,clien
|
||||
data = {
|
||||
'id': embed_id
|
||||
}
|
||||
ajax_url = f"https://www.tanti.{TF_DOMAIN}/ajax/embed"
|
||||
ajax_url = f"{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, allow_redirects=True, impersonate = "chrome120")
|
||||
@@ -157,19 +162,27 @@ async def true_url(protect_link,client):
|
||||
"Range": "bytes=0-",
|
||||
"Referer": "https://d000d.com/",
|
||||
}
|
||||
if HF == "1":
|
||||
doodstream_url = protect_link
|
||||
proxies = {}
|
||||
|
||||
if TF_PROXY == "1":
|
||||
import random
|
||||
import json
|
||||
print(PROXY_CREDENTIALS)
|
||||
proxy_list = json.loads(PROXY_CREDENTIALS)
|
||||
proxy = random.choice(proxy_list)
|
||||
if proxy == "":
|
||||
proxies = {}
|
||||
else:
|
||||
proxies = {
|
||||
"http": proxy,
|
||||
"https": proxy
|
||||
}
|
||||
response = await client.get(protect_link, proxies=proxies, allow_redirects=True, impersonate = "chrome120")
|
||||
else:
|
||||
response = await client.get(protect_link, allow_redirects=True, impersonate = "chrome120")
|
||||
|
||||
elif TF_FORWARDPROXY == "1":
|
||||
response = await client.head(protect_link, allow_redirects=True, impersonate = "chrome120", proxies = proxies)
|
||||
doodstream_url = response.url
|
||||
response = await client.get(ForwardProxy + doodstream_url, allow_redirects=True, impersonate = "chrome120", proxies = proxies)
|
||||
|
||||
if response.status_code == 200:
|
||||
# Get unique timestamp for the request
|
||||
@@ -185,15 +198,13 @@ 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]}'
|
||||
if "HF" == "1" :
|
||||
rebobo = await client.get(url, headers=headers, allow_redirects=True, impersonate = "chrome120",proxies= proxies)
|
||||
else:
|
||||
rebobo = await client.get(url, headers=headers, allow_redirects=True, impersonate = "chrome120")
|
||||
rebobo = await client.get(ForwardProxy + url, headers=headers, allow_redirects=True, impersonate = "chrome120",proxies= proxies)
|
||||
if len(rebobo.text)> 2:
|
||||
real_url = f'{rebobo.text}123456789{match[2]}{real_time}'
|
||||
print("MammaMia: Found results for Tantifilm")
|
||||
return real_url
|
||||
else:
|
||||
print("No match found in the text.")
|
||||
print("Tantifilm: No match found in the text. Please be sure you are using a local instance")
|
||||
return None
|
||||
|
||||
print("Error: Could not get the response.")
|
||||
@@ -205,7 +216,7 @@ async def true_url(protect_link,client):
|
||||
async def tantifilm(imdb,client,TF_FAST_SEARCH):
|
||||
urls = None
|
||||
try:
|
||||
general = is_movie(imdb)
|
||||
general = await is_movie(imdb)
|
||||
ismovie = general[0]
|
||||
imdb_id = general[1]
|
||||
if ismovie == 0 :
|
||||
@@ -272,17 +283,19 @@ async def tantifilm(imdb,client,TF_FAST_SEARCH):
|
||||
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
|
||||
test_id = "tt3148266:1:1" # This is an example ID format
|
||||
results = await tantifilm(test_id, client,"0")
|
||||
print(results)
|
||||
|
||||
if __name__ == "__main__":
|
||||
import asyncio
|
||||
asyncio.run(test_animeworld())
|
||||
|
||||
'''
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,186 @@
|
||||
import random
|
||||
from bs4 import BeautifulSoup,SoupStrainer
|
||||
import Src.Utilities.config as config
|
||||
from Src.Utilities.dictionaries import webru_vary,webru_dlhd,skystreaming
|
||||
from Src.Utilities.loadenv import load_env
|
||||
from urllib.parse import urlparse
|
||||
import re
|
||||
TF_DOMAIN = config.TF_DOMAIN
|
||||
DLHD_DOMAIN = config.DLHD_DOMAIN
|
||||
env_vars = load_env()
|
||||
MEDIAFLOW_PASS = env_vars.get('MEDIAFLOW_PASS')
|
||||
Referer = "https://ilovetoplay.xyz/"
|
||||
Origin = "https://ilovetoplay.xyz"
|
||||
key_url = "https%3A%2F%2Fkey2.keylocking.ru%2F"
|
||||
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",
|
||||
}
|
||||
|
||||
async def get_stream_link(id,site,client):
|
||||
try:
|
||||
if site == "dlhd":
|
||||
dlhd_id = webru_dlhd[id]
|
||||
response = await client.get(f"{DLHD_DOMAIN}/embed/stream-853.php", impersonate = "chrome124", headers = headers)
|
||||
soup = BeautifulSoup(response.text, 'lxml', parse_only=SoupStrainer('iframe'))
|
||||
iframe = soup.find('iframe', id='thatframe')
|
||||
real_link = iframe.get('src')
|
||||
parent_site_domain = real_link.split('/premiumtv')[0]
|
||||
server_key_link = (f'{parent_site_domain}/server_lookup.php?channel_id={dlhd_id}')
|
||||
response = await client.get(server_key_link, allow_redirects = False)
|
||||
server_key = response.json()['server_key']
|
||||
'''
|
||||
response = await client.get(real_link, allow_redirects = False)
|
||||
print(response.text)
|
||||
pattern = r"source:\s*'([^']*\.m3u8)'"
|
||||
match = re.search(pattern, response.text)
|
||||
if match:
|
||||
m3u8_url = match.group(1) # The URL is captured in the first capturing group
|
||||
parsed_url = urlparse(m3u8_url)
|
||||
domain = parsed_url.netloc
|
||||
|
||||
else:
|
||||
print("No .m3u8 URL found.")
|
||||
'''
|
||||
stream_url = f"https://{server_key}new.iosplayer.ru/{server_key}/{dlhd_id}" + "/mono.m3u8"
|
||||
return stream_url,Referer,Origin
|
||||
elif site == "vary":
|
||||
response = await client.get("https://calcio.monster/streaming-gratis-calcio-1.php", impersonate = "chrome124", headers = headers)
|
||||
soup = BeautifulSoup(response.text, 'lxml', parse_only=SoupStrainer('div', class_='ticket_btn'))
|
||||
href = soup.find('a').get('href')
|
||||
response = await client.get(href)
|
||||
soup = BeautifulSoup(response.text, 'lxml', parse_only=SoupStrainer('button'))
|
||||
webru_iframe = soup.find_all('button', {"data-type": "embed"})
|
||||
for i in webru_iframe:
|
||||
webru_iframe = i.get('data-url')
|
||||
if "php" not in webru_iframe:
|
||||
continue
|
||||
else:
|
||||
break
|
||||
webru_iframe = "https://" + webru_iframe.split("/")[2]
|
||||
vary_id = webru_vary[id]
|
||||
vary_link = f"{webru_iframe}/server_lookup.php?channel_id={vary_id}"
|
||||
response = await client.get(vary_link, headers=headers, allow_redirects=True, impersonate = "chrome124")
|
||||
server_key = response.json()['server_key']
|
||||
stream_url = f"https://{server_key}new.iosplayer.ru/{server_key}/{vary_id}" + "/mono.m3u8"
|
||||
return stream_url,Referer,Origin
|
||||
except Exception as e:
|
||||
print("WebRu failed",e)
|
||||
return None,None,None
|
||||
async def webru(id,site,client):
|
||||
try:
|
||||
new_stream_url,Referer,Origin = await get_stream_link(id,site,client)
|
||||
if new_stream_url == None:
|
||||
raise Exception("No stream URL found")
|
||||
return new_stream_url,Referer,Origin
|
||||
except Exception as e:
|
||||
print("WebRu failed",e)
|
||||
return None,None,None
|
||||
|
||||
|
||||
|
||||
async def get_skystreaming(id,client):
|
||||
try:
|
||||
skystreaming_link = skystreaming[id]
|
||||
if type(skystreaming_link) == list:
|
||||
|
||||
for link in skystreaming_link:
|
||||
m3u8_url,Host,Origin = await get_skystreaming_url(link,client)
|
||||
else:
|
||||
m3u8_url,Host,Origin = await get_skystreaming_url(skystreaming_link,client)
|
||||
return m3u8_url,Host,Origin
|
||||
except Exception as e:
|
||||
print("SkyStreaming failed",e)
|
||||
return None,None,None
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
async def get_skystreaming_url(skystreaming_link,client):
|
||||
try:
|
||||
if "hls" in skystreaming_link:
|
||||
m3u8_url = skystreaming_link
|
||||
Host = m3u8_url.replace("https://","").split("/")[0]
|
||||
response = await client.get(skystreaming_link, headers=headers, allow_redirects=True, impersonate = "chrome120")
|
||||
Origin = response.url.split('/embed')[0]
|
||||
return m3u8_url,Host,Origin
|
||||
response = await client.get(skystreaming_link, headers=headers, allow_redirects=True, impersonate = "chrome120")
|
||||
Origin = response.url.split('/embed')[0]
|
||||
soup = BeautifulSoup(response.text, 'lxml', parse_only=SoupStrainer('source'))
|
||||
source_tag = soup.find('source')
|
||||
m3u8_url = source_tag.get('src')
|
||||
Host = m3u8_url.replace("https://","").split("/")[0]
|
||||
return m3u8_url,Host,Origin
|
||||
except Exception as e:
|
||||
print("SkyStreaming failed",e)
|
||||
return None,None
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
'''
|
||||
async def webru(id,site,client,MFP_CREDENTIALS):
|
||||
try:
|
||||
stream_url, Referer,Origin = await get_stream_link(id,site,client)
|
||||
mfp_url = MFP_CREDENTIALS[0]
|
||||
mfp_pass = MFP_CREDENTIALS[1]
|
||||
new_stream_url = f'{mfp_url}/proxy/hls/manifest.m3u8?api_password={mfp_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
|
||||
'''
|
||||
'''
|
||||
async def webru2(id,site,client):
|
||||
try:
|
||||
print(id)
|
||||
if site == "vary":
|
||||
print("1")
|
||||
url = await get_stream_link(id,site)
|
||||
if any(keyword in id for keyword in ["cinema", "arte", "nature", "investigation", "sky-uno", "sky-serie"]):
|
||||
print("2")
|
||||
url = await get_stream_link(id,site)
|
||||
else:
|
||||
print("3")
|
||||
response = await client.get(f"https://848b3516657c-worldwide-sports-tv.baby-beamup.club/stream/tv/wwstv-it-{id}.json", impersonate = "chrome120", headers = headers)
|
||||
data = response.json()
|
||||
url = data['streams'][0]['url']
|
||||
print(url)
|
||||
return url
|
||||
except Exception as e:
|
||||
print("WorldSport failed",e)
|
||||
return None
|
||||
|
||||
'''
|
||||
'''
|
||||
if id in skystreaming:
|
||||
i = i+1
|
||||
url,Host = await get_skystreaming(id,client)
|
||||
streams['streams'].append({'title': f'{HF}Server {i}', 'url': url, "behaviorHints": {"notWebReady": True, "proxyHeaders": {"request": {"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", "Origin": "https://skystreaming.guru", "DNT": "1", "Sec-GPC": "1", "Connection": "keep-alive", "Referer": "https://skystreaming.guru/", "Sec-Fetch-Dest": "empty", "Sec-Fetch-Mode": "cors", "Sec-Fetch-Site": "cross-site", "Pragma": "no-cache", "Cache-Control": "no-cache", "TE": "trailers","Host": Host}}}})
|
||||
|
||||
'''
|
||||
async def test_webru():
|
||||
from curl_cffi.requests import AsyncSession
|
||||
async with AsyncSession() as client:
|
||||
# Replace with actual id, for example 'anime_id:episode' format
|
||||
test_id = "sky-sport-uno" # This is an example ID format
|
||||
results = await get_skystreaming(test_id,client)
|
||||
print(results)
|
||||
|
||||
if __name__ == "__main__":
|
||||
import asyncio
|
||||
asyncio.run(test_webru())
|
||||
@@ -1,7 +1,7 @@
|
||||
from Src.Utilities.info import is_movie,get_info_imdb,get_info_tmdb
|
||||
import json
|
||||
import urllib.parse
|
||||
|
||||
#This doesn't work anymore.
|
||||
headers = {
|
||||
'User-Agent': 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:127.0) Gecko/20100101 Firefox/127.0',
|
||||
'Accept': '*/*',
|
||||
@@ -76,6 +76,7 @@ async def whvx(id,client):
|
||||
showname = urllib.parse.quote_plus(showname)
|
||||
response = await client.get(f'https://api.whvx.net/search', params = params, headers=headers, impersonate = "chrome120")
|
||||
data = json.loads(response.text)
|
||||
print(data)
|
||||
url = data['url']
|
||||
print(data)
|
||||
params = {
|
||||
@@ -110,7 +111,7 @@ async def whvx(id,client):
|
||||
print(resolution_links)
|
||||
return resolution_links
|
||||
|
||||
'''
|
||||
|
||||
async def test_animeworld():
|
||||
from curl_cffi.requests import AsyncSession
|
||||
async with AsyncSession() as client:
|
||||
@@ -123,4 +124,3 @@ if __name__ == "__main__":
|
||||
asyncio.run(test_animeworld())
|
||||
|
||||
|
||||
'''
|
||||
@@ -1,23 +0,0 @@
|
||||
from bs4 import BeautifulSoup
|
||||
import json
|
||||
from Src.Utilities.dictionaries import okru
|
||||
|
||||
|
||||
|
||||
async def okru_get_url(id,client):
|
||||
try:
|
||||
embed_link = okru[id]
|
||||
print(embed_link)
|
||||
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("MammaMia: Found results for Okru")
|
||||
print(m3u8_link)
|
||||
return m3u8_link
|
||||
except Exception as e:
|
||||
print("MammaMia: No results found for Okru")
|
||||
return None
|
||||
+81
-241
@@ -1,264 +1,104 @@
|
||||
from bs4 import BeautifulSoup
|
||||
from bs4 import BeautifulSoup,SoupStrainer
|
||||
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.info import is_movie
|
||||
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
|
||||
import urllib.parse
|
||||
from Src.API.extractors.vixcloud import vixcloud
|
||||
import logging
|
||||
from Src.Utilities.config import setup_logging
|
||||
level = config.LEVEL
|
||||
logger = setup_logging(level)
|
||||
User_Agent= "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:127.0) Gecko/20100101 Firefox/127.0"
|
||||
|
||||
env_vars = load_env()
|
||||
SC_PROXY = config.SC_PROXY
|
||||
VX_PROXY = config.VX_PROXY
|
||||
proxies = {}
|
||||
proxies2 = {}
|
||||
if VX_PROXY == "1":
|
||||
PROXY_CREDENTIALS = env_vars.get('PROXY_CREDENTIALS')
|
||||
proxy_list = json.loads(PROXY_CREDENTIALS)
|
||||
proxy = random.choice(proxy_list)
|
||||
if proxy == "":
|
||||
proxies2 = {}
|
||||
else:
|
||||
proxies2 = {
|
||||
"http": proxy,
|
||||
"https": proxy
|
||||
}
|
||||
if SC_PROXY == "1":
|
||||
PROXY_CREDENTIALS = env_vars.get('PROXY_CREDENTIALS')
|
||||
proxy_list = json.loads(PROXY_CREDENTIALS)
|
||||
proxy = random.choice(proxy_list)
|
||||
if proxy == "":
|
||||
proxies = {}
|
||||
else:
|
||||
proxies = {
|
||||
"http": proxy,
|
||||
"https": proxy
|
||||
}
|
||||
if VX_PROXY == "1":
|
||||
proxies2 = proxies
|
||||
|
||||
SC_ForwardProxy = config.SC_ForwardProxy
|
||||
VX_ForwardProxy = config.VX_ForwardProxy
|
||||
if SC_ForwardProxy == "1":
|
||||
ForwardProxy = env_vars.get('ForwardProxy')
|
||||
elif VX_ForwardProxy == "1":
|
||||
ForwardProxy = env_vars.get('ForwardProxy')
|
||||
else:
|
||||
ForwardProxy = ""
|
||||
#Get domain
|
||||
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'] = f"https://streamingcommunity.{SC_DOMAIN}/"
|
||||
random_headers['Origin'] = f"https://streamingcommunity.{SC_DOMAIN}"
|
||||
base_url = f'https://streamingcommunity.{SC_DOMAIN}/richiedi-un-titolo'
|
||||
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 Exception as e:
|
||||
print("Couldn't find the version",e)
|
||||
version = "65e52dcf34d64173542cd2dc6b8bb75b"
|
||||
return version
|
||||
|
||||
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"
|
||||
random_headers['Accept'] = 'application/json' # Assuming the API returns JSON
|
||||
random_headers['Content-Type'] = 'application/json'
|
||||
#Do a request to get the ID of serie/move and it's slug in the URL
|
||||
response = await client.get(query, headers = random_headers, allow_redirects=True)
|
||||
print(response)
|
||||
response = response.json()
|
||||
|
||||
for item in response['data']:
|
||||
tid = item['id']
|
||||
slug = item['slug']
|
||||
type = item['type']
|
||||
if type == "tv":
|
||||
type = 0
|
||||
elif type == "movie":
|
||||
type = 1
|
||||
if type == ismovie:
|
||||
#Added a Check to see if the result is what it is supposed to be
|
||||
if SC_FAST_SEARCH == "0":
|
||||
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
|
||||
else:
|
||||
print("Couldn't find anything")
|
||||
|
||||
|
||||
async def get_film(tid,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
|
||||
#Access the iframe
|
||||
url = f'https://streamingcommunity.{SC_DOMAIN}/iframe/{tid}'
|
||||
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")
|
||||
#Get the ID containted in the src of iframe
|
||||
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 = 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)
|
||||
expires = re.search(r"'expires':\s*'(\d+)'", script).group(1)
|
||||
quality = re.search(r'"quality":(\d+)', script).group(1)
|
||||
#Example url https://vixcloud.co/playlist/231315?b=1&token=bce060eec3dc9d1965a5d258dc78c964&expires=1728995040&rendition=1080p
|
||||
url = f'https://vixcloud.co/playlist/{vixid}.m3u8?token={token}&expires={expires}'
|
||||
if 'canPlayFHD' in query_params:
|
||||
canPlayFHD = 'h=1'
|
||||
url += "&h=1"
|
||||
if 'b' in query_params:
|
||||
b = 'b=1'
|
||||
url += "&b=1"
|
||||
url720 = f'https://vixcloud.co/playlist/{vixid}.m3u8'
|
||||
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
|
||||
#Get episode ID
|
||||
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:
|
||||
if dict_episode['number'] == episode:
|
||||
return dict_episode['id']
|
||||
|
||||
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, 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]
|
||||
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 = 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)
|
||||
expires = re.search(r"'expires':\s*'(\d+)'", script).group(1)
|
||||
quality = re.search(r'"quality":(\d+)', script).group(1)
|
||||
#Example url https://vixcloud.co/playlist/231315?b=1&token=bce060eec3dc9d1965a5d258dc78c964&expires=1728995040&rendition=1080p
|
||||
url = f'https://vixcloud.co/playlist/{vixid}.m3u8?token={token}&expires={expires}'
|
||||
if 'canPlayFHD' in query_params:
|
||||
canPlayFHD = 'h=1'
|
||||
url += "&h=1"
|
||||
if 'b' in query_params:
|
||||
b = 'b=1'
|
||||
url += "&b=1"
|
||||
url720 = f'https://vixcloud.co/playlist/{vixid}.m3u8'
|
||||
return url,url720,quality
|
||||
|
||||
|
||||
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/{SC_FAST_SEARCH}/{SC_DOMAIN}/{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)
|
||||
async def vixsrc(streams,id,client,MFP,MFP_CREDENTIALS):
|
||||
general = await is_movie(id)
|
||||
ismovie = general[0]
|
||||
imdb_id = general[1]
|
||||
clean_id = general[1]
|
||||
if "tt" in id:
|
||||
tmdb_id = await get_TMDb_id_from_IMDb_id(clean_id,client)
|
||||
else:
|
||||
tmdb_id = clean_id
|
||||
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)
|
||||
date = None
|
||||
site_url = f'{SC_DOMAIN}/tv/{tmdb_id}/{general[2]}/{general[3]}/'
|
||||
else:
|
||||
#I just set n season to None to avoid bugs, but it is not needed if Fast search is enabled
|
||||
date = None
|
||||
#else just equals them
|
||||
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 SC_FAST_SEARCH == "1":
|
||||
type = "StreamingCommunityFS"
|
||||
if "tt" in imdb:
|
||||
#Get showname
|
||||
date = None
|
||||
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":
|
||||
type = "StreamingCommunity"
|
||||
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)
|
||||
site_url = f'{SC_DOMAIN}/movie/{tmdb_id}/'
|
||||
streams = await vixcloud(site_url,client,MFP,MFP_CREDENTIALS,streams,"Vixcloud",proxies,ForwardProxy)
|
||||
return streams
|
||||
|
||||
showname = showname.replace(" ", "+").replace("–", "+").replace("—","+")
|
||||
showname = urllib.parse.quote_plus(showname)
|
||||
query = f'https://streamingcommunity.{SC_DOMAIN}/api/search?q={showname}'
|
||||
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("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("MammaMia found results for StreamingCommunity")
|
||||
return url,url720,quality
|
||||
|
||||
async def streaming_community(streams,id,client,MFP,MFP_CREDENTIALS):
|
||||
try:
|
||||
if "vixsrc" in SC_DOMAIN:
|
||||
streams = await vixsrc(streams,id,client,MFP,MFP_CREDENTIALS)
|
||||
return streams
|
||||
except Exception as e:
|
||||
print("MammaMia: StreamingCommunity failed",e)
|
||||
return None,None,None
|
||||
'''
|
||||
async def test_animeworld():
|
||||
logger.warning(f"StreamingCommunity failed {e}")
|
||||
return streams
|
||||
|
||||
|
||||
|
||||
async def test_vixsrc():
|
||||
from curl_cffi.requests import AsyncSession
|
||||
async with AsyncSession() as client:
|
||||
# Replace with actual id, for example 'anime_id:episode' format
|
||||
test_id = "tt12930350" # This is an example ID format
|
||||
results = await streaming_community(test_id, client,"0")
|
||||
test_id = "tt6468322:1:1" # This is an example ID format
|
||||
results = await streaming_community(test_id, client,"0","0")
|
||||
print(results)
|
||||
|
||||
if __name__ == "__main__":
|
||||
import asyncio
|
||||
asyncio.run(test_animeworld())
|
||||
'''
|
||||
asyncio.run(test_vixsrc())
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+58
-31
@@ -4,10 +4,37 @@ from Src.Utilities.info import get_info_tmdb, is_movie, get_info_imdb
|
||||
import Src.Utilities.config as config
|
||||
import re
|
||||
import json
|
||||
import urllib.parse
|
||||
from Src.API.extractors.hdplayer import hdplayer
|
||||
from Src.Utilities.loadenv import load_env
|
||||
import logging
|
||||
from Src.Utilities.config import setup_logging
|
||||
level = config.LEVEL
|
||||
logger = setup_logging(level)
|
||||
|
||||
SW_DOMAIN = config.SW_DOMAIN
|
||||
env_vars = load_env()
|
||||
SW_PROXY = config.SW_PROXY
|
||||
proxies = {}
|
||||
if SW_PROXY == "1":
|
||||
PROXY_CREDENTIALS = env_vars.get('PROXY_CREDENTIALS')
|
||||
proxy_list = json.loads(PROXY_CREDENTIALS)
|
||||
proxy = random.choice(proxy_list)
|
||||
if proxy == "":
|
||||
proxies = {}
|
||||
else:
|
||||
proxies = {
|
||||
"http": proxy,
|
||||
"https": proxy
|
||||
}
|
||||
SW_ForwardProxy = config.SW_ForwardProxy
|
||||
if SW_ForwardProxy == "1":
|
||||
ForwardProxy = env_vars.get('ForwardProxy')
|
||||
else:
|
||||
ForwardProxy = ""
|
||||
|
||||
|
||||
async def wponce_get(client):
|
||||
response = await client.get(f"https://www.streamingwatch.{SW_DOMAIN}/contatto/")
|
||||
response = await client.get(ForwardProxy + f"{SW_DOMAIN}/contatto/", proxies = proxies)
|
||||
pattern = r'"admin_ajax_nonce":"(\w+)"'
|
||||
matches = re.findall(pattern, response.text)
|
||||
wponce = matches[1]
|
||||
@@ -16,15 +43,15 @@ async def wponce_get(client):
|
||||
async def search(showname,season,episode,date,ismovie,client):
|
||||
if ismovie == 1:
|
||||
wponce = await wponce_get(client)
|
||||
query = f'https://www.streamingwatch.{SW_DOMAIN}/wp-admin/admin-ajax.php'
|
||||
query = f'{SW_DOMAIN}/wp-admin/admin-ajax.php'
|
||||
headers = {
|
||||
'authority': f'www.streamingwatch.{SW_DOMAIN}',
|
||||
'authority': f'{SW_DOMAIN}',
|
||||
'accept': '*/*',
|
||||
'accept-language': 'it-IT,it;q=0.9,en-US;q=0.8,en;q=0.7',
|
||||
'content-type': 'application/x-www-form-urlencoded; charset=UTF-8',
|
||||
# 'cookie': 'wordpress_test_cookie=WP%20Cookie%20check',
|
||||
'origin': f'https://www.streamingwatch.{SW_DOMAIN}',
|
||||
'referer': f'https://www.streamingwatch.{SW_DOMAIN}',
|
||||
'origin': f'{SW_DOMAIN}',
|
||||
'referer': f'{SW_DOMAIN}/',
|
||||
'sec-ch-ua': '"Not-A.Brand";v="99", "Chromium";v="124"',
|
||||
'sec-ch-ua-mobile': '?0',
|
||||
'sec-ch-ua-platform': '"Android"',
|
||||
@@ -42,12 +69,16 @@ async def search(showname,season,episode,date,ismovie,client):
|
||||
cookies = {
|
||||
'wordpress_test_cookie': 'WP%20Cookie%20check',
|
||||
}
|
||||
response = await client.post(query,cookies=cookies, headers=headers, data=data)
|
||||
response = await client.post(ForwardProxy + query,cookies=cookies, headers=headers, data=data, proxies = proxies)
|
||||
soup = BeautifulSoup(response.content,'lxml')
|
||||
page_date = soup.find(id = 'search-cat-year').text.strip()
|
||||
if page_date == date:
|
||||
all_page_dates = soup.find_all(id = 'search-cat-year')
|
||||
all_hrefs = soup.find_all('a')
|
||||
for temp_data,temp_href in zip(all_page_dates,all_hrefs):
|
||||
page_date = temp_data.text.strip()
|
||||
if date == page_date:
|
||||
href = temp_href['href']
|
||||
href = soup.find('a')['href']
|
||||
response = await client.get(href, allow_redirects=True, impersonate = "chrome120")
|
||||
response = await client.get(ForwardProxy + href, allow_redirects=True, proxies = proxies)
|
||||
soup = BeautifulSoup(response.text,'lxml',parse_only=SoupStrainer('iframe'))
|
||||
iframe = soup.find('iframe')
|
||||
hdplayer = iframe.get('data-lazy-src')
|
||||
@@ -55,15 +86,16 @@ 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', allow_redirects=True, impersonate = "chrome120")
|
||||
id_response = await client.get(ForwardProxy + f'{SW_DOMAIN}/wp-json/wp/v2/categories?search={showname}&_fields=id', allow_redirects=True, proxies = proxies)
|
||||
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, allow_redirects=True, impersonate = "chrome120")
|
||||
query = f'{SW_DOMAIN}/wp-json/wp/v2/posts?categories={category_id}&per_page=100'
|
||||
response = await client.get(ForwardProxy + query, allow_redirects=True, impersonate = "chrome120", proxies = proxies)
|
||||
data_json = response.text
|
||||
data = json.loads(data_json)
|
||||
for entry in data:
|
||||
if f"stagione-{season}-episodio-{episode}" in entry["slug"] and f"stagione-{season}-episodio-{episode}0" not in entry["slug"]:
|
||||
if f"stagione-{season}-episodio-{episode}" in entry["slug"] or f"stagione-{season}-episode-{episode}" in entry["slug"]:
|
||||
if f"stagione-{season}-episodio-{episode}0" not in entry["slug"]:
|
||||
content = entry["content"]["rendered"]
|
||||
#"content":{
|
||||
# "rendered":"<p><!--baslik:PRO--><iframe loading=\"lazy\" src=\"https:\/\/hdplayer.gives\/embed\/YErLVq64uNTZRNz\" frameborder=\"0\" width=\"700\" height=\"400\" allowfullscreen><\/iframe><\/p>\n","protected":false}
|
||||
@@ -71,14 +103,10 @@ async def search(showname,season,episode,date,ismovie,client):
|
||||
end = content.find('"', start) #end of url
|
||||
hdplayer = content[start:end]
|
||||
return hdplayer
|
||||
async def hls_url(hdplayer,client):
|
||||
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)
|
||||
return url
|
||||
async def streamingwatch(imdb,client):
|
||||
|
||||
async def streamingwatch(streams,imdb,client):
|
||||
try:
|
||||
general = is_movie(imdb)
|
||||
general = await is_movie(imdb)
|
||||
ismovie = general[0]
|
||||
imdb_id = general[1]
|
||||
type = "StreamingWatch"
|
||||
@@ -97,24 +125,23 @@ async def streamingwatch(imdb,client):
|
||||
else:
|
||||
tmdba = imdb_id
|
||||
showname,date = get_info_tmdb(tmdba,ismovie,type)
|
||||
showname = showname.replace(" ", "+").replace("–", "+").replace("—","+")
|
||||
hdplayer = await search(showname,season,episode,date,ismovie,client)
|
||||
url = await hls_url(hdplayer,client)
|
||||
print(f"MammaMia: StreamingWatch found results for {showname}")
|
||||
return url
|
||||
showname = showname.replace(" ", "+").replace("–", "+").replace("—","+").replace("&","")
|
||||
url_hdplayer = await search(showname,season,episode,date,ismovie,client)
|
||||
streams = await hdplayer(url_hdplayer,client,streams,url_hdplayer,"Streamingwatch",proxies,ForwardProxy)
|
||||
return streams
|
||||
except Exception as e:
|
||||
print("MammaMia: StreamingWatch Failed",e)
|
||||
return None
|
||||
logger.warning(f"MammaMia: StreamingWatch Failed {e}")
|
||||
return streams
|
||||
|
||||
|
||||
'''
|
||||
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 = "tt16426418" # This is an example ID format
|
||||
results = await streamingwatch(test_id, client)
|
||||
results = await streamingwatch({'streams': []},test_id, client)
|
||||
print(results)
|
||||
|
||||
if __name__ == "__main__":
|
||||
import asyncio
|
||||
asyncio.run(test_animeworld())
|
||||
'''
|
||||
@@ -1,106 +0,0 @@
|
||||
import random
|
||||
from bs4 import BeautifulSoup,SoupStrainer
|
||||
import Src.Utilities.config as config
|
||||
from Src.Utilities.dictionaries import webru_vary,webru_dlhd,skystreaming
|
||||
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"
|
||||
key_url = "https%3A%2F%2Fkey2.keylocking.ru%2F"
|
||||
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":
|
||||
stream_url = "https://xyzdddd.mizhls.ru/lb/" + webru_dlhd[id] + "/index.m3u8"
|
||||
elif site == "vary":
|
||||
stream_url = "https://webuit.mizhls.ru/lb/"+ webru_vary[id] + "/index.m3u8"
|
||||
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/manifest.m3u8?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
|
||||
|
||||
|
||||
|
||||
async def get_skystreaming(id,client):
|
||||
try:
|
||||
skystreaming_link = skystreaming[id]
|
||||
m3u8_urls = {}
|
||||
if type(skystreaming_link) == list:
|
||||
|
||||
for link in skystreaming_link:
|
||||
m3u8_url,Host = await get_skystreaming_url(link,client)
|
||||
m3u8_urls[m3u8_url] = Host
|
||||
print(m3u8_urls)
|
||||
else:
|
||||
m3u8_url,Host = await get_skystreaming_url(skystreaming_link,client)
|
||||
m3u8_urls[m3u8_url] = Host
|
||||
return m3u8_urls
|
||||
|
||||
except Exception as e:
|
||||
print("SkyStreaming failed",e)
|
||||
return None,None
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
async def get_skystreaming_url(skystreaming_link,client):
|
||||
try:
|
||||
if "hls" in skystreaming_link:
|
||||
m3u8_url = skystreaming_link
|
||||
Host = m3u8_url.replace("https://","").split("/")[0]
|
||||
return m3u8_url,Host
|
||||
response = await client.get(skystreaming_link, headers=headers, allow_redirects=True, impersonate = "chrome120")
|
||||
soup = BeautifulSoup(response.text, 'lxml', parse_only=SoupStrainer('source'))
|
||||
source_tag = soup.find('source')
|
||||
m3u8_url = source_tag.get('src')
|
||||
Host = m3u8_url.replace("https://","").split("/")[0]
|
||||
print(Host)
|
||||
return m3u8_url,Host
|
||||
except Exception as e:
|
||||
print("SkyStreaming failed",e)
|
||||
return None,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/manifest.m3u8?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
|
||||
'''
|
||||
+52
-14
@@ -1,6 +1,6 @@
|
||||
#LOAD THE CONFIG
|
||||
import json
|
||||
|
||||
import logging
|
||||
# Open the configuration file
|
||||
with open('config.json') as f:
|
||||
# Load JSON data from file
|
||||
@@ -8,21 +8,59 @@ with open('config.json') as f:
|
||||
|
||||
# Accessing SC_DOMAIN
|
||||
SITE = config["Siti"]
|
||||
FT_DOMAIN = SITE["Filmpertutti"]['domain']
|
||||
SC_DOMAIN = SITE["StreamingCommunity"]['domain']
|
||||
TF_DOMAIN = SITE["Tantifilm"]['domain']
|
||||
LC_DOMAIN = SITE["LordChannel"]['domain']
|
||||
SW_DOMAIN = SITE["StreamingWatch"]['domain']
|
||||
AW_DOMAIN = SITE['AnimeWorld']['domain']
|
||||
SKY_DOMAIN = SITE['SkyStreaming']['domain']
|
||||
MYSTERIUS = SITE['Mysterius']['enabled']
|
||||
DLHD = SITE['DaddyLiveHD']['enabled']
|
||||
SC_DOMAIN = SITE["StreamingCommunity"]['url']
|
||||
SW_DOMAIN = SITE["StreamingWatch"]['url']
|
||||
AW_DOMAIN = SITE['AnimeWorld']['url']
|
||||
CB_DOMAIN = SITE['CB01']['url']
|
||||
GS_DOMAIN = SITE['Guardaserie']['url']
|
||||
GHD_DOMAIN = SITE['GuardaHD']['url']
|
||||
ES_DOMAIN = SITE['Eurostreaming']['url']
|
||||
GF_DOMAIN = SITE['Guardaflix']['url']
|
||||
GO_DOMAIN = SITE['Guardoserie']['url']
|
||||
SC = SITE['StreamingCommunity']['enabled']
|
||||
SW = SITE['StreamingWatch']['enabled']
|
||||
AW = SITE['AnimeWorld']['enabled']
|
||||
CB = SITE['CB01']['enabled']
|
||||
GS = SITE['Guardaserie']['enabled']
|
||||
GHD = SITE['GuardaHD']['enabled']
|
||||
ES= SITE['Eurostreaming']['enabled']
|
||||
GF = SITE['Guardaflix']['enabled']
|
||||
GO = SITE['Guardoserie']['enabled']
|
||||
SC_ForwardProxy = SITE['StreamingCommunity']["SC_ForwardProxy"]
|
||||
GS_ForwardProxy = SITE['Guardaserie']["GS_ForwardProxy"]
|
||||
GH_ForwardProxy = SITE['GuardaHD']["GH_ForwardProxy"]
|
||||
VX_ForwardProxy = SITE['StreamingCommunity']["VX_ForwardProxy"]
|
||||
AW_ForwardProxy = SITE['AnimeWorld']["AW_ForwardProxy"]
|
||||
MX_ForwardProxy = SITE['CB01']["MX_ForwardProxy"]
|
||||
CB_ForwardProxy = SITE['CB01']["CB_ForwardProxy"]
|
||||
ES_ForwardProxy = SITE['Eurostreaming']['ES_ForwardProxy']
|
||||
GF_ForwardProxy = SITE['Guardaflix']['GF_ForwardProxy']
|
||||
GO_ForwardProxy = SITE['Guardoserie']['GO_ForwardProxy']
|
||||
SW_ForwardProxy = SITE['StreamingWatch']['SW_ForwardProxy']
|
||||
GS_PROXY = SITE['Guardaserie']["GS_PROXY"]
|
||||
GH_PROXY = SITE['GuardaHD']["GH_PROXY"]
|
||||
CB_PROXY = SITE['CB01']["CB_PROXY"]
|
||||
SC_PROXY = SITE['StreamingCommunity']["SC_PROXY"]
|
||||
VX_PROXY = SITE['StreamingCommunity']["VX_PROXY"]
|
||||
AW_PROXY = SITE['AnimeWorld']["AW_PROXY"]
|
||||
MX_PROXY = SITE['CB01']["MX_PROXY"]
|
||||
ES_PROXY = SITE['Eurostreaming']['ES_PROXY']
|
||||
GF_PROXY = SITE['Guardaflix']['GF_PROXY']
|
||||
GO_PROXY = SITE['Guardoserie']['GO_PROXY']
|
||||
SW_PROXY = SITE['StreamingWatch']['SW_PROXY']
|
||||
#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"]
|
||||
ForwardProxy = GENERAL["ForwardProxy"]
|
||||
Icon = GENERAL["Icon"]
|
||||
Name = GENERAL["Name"]
|
||||
LEVEL = GENERAL["level"]
|
||||
Global_Proxy = GENERAL["Global_Proxy"]
|
||||
|
||||
def setup_logging(LEVEL):
|
||||
LEVEL = LEVEL.upper()
|
||||
level = getattr(logging, LEVEL, logging.DEBUG)
|
||||
logging.basicConfig(level=level,format='%(message)s')
|
||||
logger = logging.getLogger(__name__)
|
||||
return logger
|
||||
@@ -12,3 +12,14 @@ async def get_TMDb_id_from_IMDb_id(imdb_id,client):
|
||||
return tmbda['tv_results'][0]['id']
|
||||
else:
|
||||
return None
|
||||
async def get_IMDB_id_from_TMDb_id(tmdb_id,client):
|
||||
url = f"https://api.themoviedb.org/3/movie/{tmdb_id}?api_key={TMDB_KEY}"
|
||||
response = await client.get(url)
|
||||
if response.status_code == 200:
|
||||
data = response.json()
|
||||
imdb_id = data.get('imdb_id')
|
||||
if imdb_id:
|
||||
return imdb_id
|
||||
|
||||
|
||||
|
||||
|
||||
+55
-497
@@ -1,15 +1,4 @@
|
||||
okru = {
|
||||
"rai-1": "https://ok.ru/videoembed/7868570672752?nochat=1",
|
||||
"rai-2": "https://ok.ru/videoembed/7805618364016?nochat=1",
|
||||
"canale-5": "https://ok.ru/videoembed/7871149252208?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",
|
||||
"mediaset-extra": "https://ok.ru/videoembed/7363152715376?nochat=1",
|
||||
"mediaset-infinity": "https://ok.ru/videoembed/6323249159792%3Fnochat=1"
|
||||
}
|
||||
import Src.Utilities.config as config
|
||||
|
||||
STREAM = {
|
||||
"channels": [
|
||||
@@ -24,34 +13,34 @@ STREAM = {
|
||||
{
|
||||
"id": "rai-1",
|
||||
"title": "Rai 1",
|
||||
"name": "Full HD Http",
|
||||
"name": "Full HD ",
|
||||
"genres": ["Rai"],
|
||||
"poster": "https://i.imgur.com/OPV9jJD.png",
|
||||
"url": "http://173.208.52.200/rai1/index.m3u8"
|
||||
"poster": "https://i.imgur.com/bb72vqh.jpeg",
|
||||
"url": "https://viamotionhsi.netplus.ch/live/eds/rai1/browser-HLS8/rai1.m3u8"
|
||||
},
|
||||
{
|
||||
"id": "rai-2",
|
||||
"title": "Rai 2",
|
||||
"name": "Full HD Http",
|
||||
"name": "Full HD ",
|
||||
"genres": ["Rai"],
|
||||
"poster": "https://i.imgur.com/uHtYy8w.png",
|
||||
"url": "http://173.208.52.200/rai2/index.m3u8"
|
||||
"poster": "https://i.imgur.com/jX95Qod.jpeg",
|
||||
"url": "https://viamotionhsi.netplus.ch/live/eds/rai2/browser-HLS8/rai2.m3u8"
|
||||
},
|
||||
{
|
||||
"id": "rai-3",
|
||||
"title": "Rai 3",
|
||||
"name": "Full HD Http",
|
||||
"name": "Full HD ",
|
||||
"genres": ["Rai"],
|
||||
"poster": "https://i.imgur.com/iXst6me.png",
|
||||
"url": "http://173.208.52.200/rai3/index.m3u8"
|
||||
"poster": "https://i.imgur.com/fgAh9if.jpeg",
|
||||
"url": "https://viamotionhsi.netplus.ch/live/eds/rai3/browser-HLS8/rai3.m3u8"
|
||||
},
|
||||
{
|
||||
"id": "rai-4",
|
||||
"title": "Rai 4",
|
||||
"name": "Full HD Http",
|
||||
"name": "Full HD ",
|
||||
"genres": ["Rai"],
|
||||
"poster": "https://i.imgur.com/KGg3hvr.png",
|
||||
"url": "http://173.208.52.200/rai4/index.m3u8"
|
||||
"poster": "https://i.imgur.com/NryLzhA.jpeg",
|
||||
"url": "https://raiquattro1-dash-live.akamaized.net/dash/live/663977/raiquattro1/manifest.mpd"
|
||||
},
|
||||
{
|
||||
"id": "rai-premium",
|
||||
@@ -59,7 +48,7 @@ STREAM = {
|
||||
"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"
|
||||
"url": "https://raipremium1-dash-live.akamaized.net/dash/live/663979/raipremium1/manifest.mpd"
|
||||
},
|
||||
{
|
||||
"id": "rai-4k",
|
||||
@@ -76,7 +65,7 @@ STREAM = {
|
||||
"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"
|
||||
"url": "https://streamcdnb2-8e7439fdb1694c8da3a0fd63e4dda518.msvdn.net/rainews1/hls/playlist_mo.m3u8"
|
||||
},
|
||||
{
|
||||
"id": "rai-movie",
|
||||
@@ -84,7 +73,7 @@ STREAM = {
|
||||
"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"
|
||||
"url": "https://raimovie1-dash-live.akamaized.net/dash/live/663983/raimovie1/manifest.mpd"
|
||||
},
|
||||
{
|
||||
"id": "rai-sport",
|
||||
@@ -92,15 +81,15 @@ STREAM = {
|
||||
"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"
|
||||
"url": "https://viamotionhsi.netplus.ch/live/eds/raisport1/browser-HLS8/raisport1.m3u8"
|
||||
},
|
||||
{
|
||||
"id": "rete-4",
|
||||
"title": "Rete 4",
|
||||
"name": "Full HD Http",
|
||||
"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"
|
||||
"url": "https://live02-seg.msf.cdn.mediaset.net/live/ch-r4/r4-clr.isml/index.m3u8"
|
||||
},
|
||||
{
|
||||
"id": "euronews",
|
||||
@@ -108,23 +97,22 @@ STREAM = {
|
||||
"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 Http",
|
||||
"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"
|
||||
"url": "https://viamotionhsi.netplus.ch/live/eds/canale5/browser-HLS8/canale5.m3u8"
|
||||
},
|
||||
{
|
||||
"id": "italia-1",
|
||||
"title": "Italia 1",
|
||||
"name": "Full HD Http",
|
||||
"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"
|
||||
"url": "https://viamotionhsi.netplus.ch/live/eds/italia1/browser-HLS8/italia1.m3u8"
|
||||
},
|
||||
{
|
||||
"id": "topcrime",
|
||||
@@ -173,13 +161,6 @@ STREAM = {
|
||||
"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",
|
||||
@@ -204,308 +185,13 @@ STREAM = {
|
||||
"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": "dazn-1",
|
||||
"title": "DAZN 1",
|
||||
"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"
|
||||
"url": "https://d2j2nqgg7bzth.cloudfront.net/v1/master/3722c60a815c199d9c0ef36c5b73da68a62b09d1/cc-02k1gv1j0ufwn/DMAX_IT.m3u8"
|
||||
},
|
||||
{
|
||||
"id": "foodnetwork",
|
||||
@@ -513,7 +199,7 @@ STREAM = {
|
||||
"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"
|
||||
"url": "https://dk3okdd5036kz.cloudfront.net/v1/master/3722c60a815c199d9c0ef36c5b73da68a62b09d1/cc-o4pw0nc02sthz/Foodnetwork_IT.m3u8"
|
||||
},
|
||||
{
|
||||
"id": "frisbee",
|
||||
@@ -521,7 +207,7 @@ STREAM = {
|
||||
"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"
|
||||
"url": "https://d6m7lubks416z.cloudfront.net/v1/manifest/3722c60a815c199d9c0ef36c5b73da68a62b09d1/cc-zmbstsedxme9s/2fbb852d-6778-4a74-955b-59164269c705/0.m3u8"
|
||||
},
|
||||
{
|
||||
"id": "giallo",
|
||||
@@ -529,7 +215,7 @@ STREAM = {
|
||||
"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"
|
||||
"url": "https://d9fqo6nfqlv2h.cloudfront.net/v1/master/3722c60a815c199d9c0ef36c5b73da68a62b09d1/cc-ulukbrgm1n3yb/Giallo_IT.m3u8"
|
||||
},
|
||||
{
|
||||
"id": "hgtv",
|
||||
@@ -537,7 +223,7 @@ STREAM = {
|
||||
"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"
|
||||
"url": "https://timlivetu0.cb.ticdn.it/Content/DASH/Live/channel(hgtvhd)/manifest.mpd"
|
||||
},
|
||||
{
|
||||
"id": "k2",
|
||||
@@ -545,7 +231,7 @@ STREAM = {
|
||||
"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"
|
||||
"url": "https://d1pmpe0hs35ka5.cloudfront.net/v1/master/3722c60a815c199d9c0ef36c5b73da68a62b09d1/cc-39hsskpppgf72/K2_IT.m3u8"
|
||||
},
|
||||
{
|
||||
"id": "nove",
|
||||
@@ -553,7 +239,7 @@ STREAM = {
|
||||
"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"
|
||||
"url": "https://d31mw7o1gs0dap.cloudfront.net/v1/master/3722c60a815c199d9c0ef36c5b73da68a62b09d1/cc-y5pbi2sq9r609/NOVE_IT.m3u8"
|
||||
},
|
||||
|
||||
{
|
||||
@@ -562,7 +248,7 @@ STREAM = {
|
||||
"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"
|
||||
"url": "https://d3562mgijzx0zq.cloudfront.net/v1/master/3722c60a815c199d9c0ef36c5b73da68a62b09d1/cc-kizqtzpvvl3i8/Realtime_IT.m3u8"
|
||||
},
|
||||
{
|
||||
"id": "supertennis",
|
||||
@@ -570,7 +256,7 @@ STREAM = {
|
||||
"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"
|
||||
"url": "https://live-embed.supertennix.hiway.media/restreamer/supertennix_client/gpu-a-c0-16/restreamer/outgest/aa3673f1-e178-44a9-a947-ef41db73211a/manifest.m3u8"
|
||||
},
|
||||
{
|
||||
"id": "solocalcio",
|
||||
@@ -586,22 +272,15 @@ STREAM = {
|
||||
"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"
|
||||
"url": "https://origin.streamup.eu/sportitaliain/sisolocalcio/playlist.m3u8"
|
||||
},
|
||||
{
|
||||
"id": "rsi-la-2",
|
||||
"title": "RSI LA 2",
|
||||
"name": "",
|
||||
"genres": ["RSI"],
|
||||
"poster": "https://livehere.one/img/rsi.png"
|
||||
"poster": "https://livehere.one/img/rsi.png",
|
||||
"url": "https://viamotionhsi.netplus.ch/live/eds/rsila2hd/browser-HLS8/rsila2hd.m3u8"
|
||||
},
|
||||
{
|
||||
"id": "baby-shark-tv",
|
||||
@@ -611,21 +290,13 @@ STREAM = {
|
||||
"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"
|
||||
"url": "https://797fbe152cbe418697be037aef3a708f.mediatailor.us-east-1.amazonaws.com/v1/master/44f73ba4d03e9607dcd9bebdcb8494d86964f1d8/Samsung-it_BizzarroMovies/playlist.m3u8"
|
||||
},
|
||||
{
|
||||
"id": "cinema-italiano",
|
||||
@@ -633,7 +304,7 @@ STREAM = {
|
||||
"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"
|
||||
"url": "http://stitcher-ipv4.pluto.tv/v1/stitch/embed/hls/channel/608aa512d67fd900072323db/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&profileFloor=&profileLimit=&embedPartner=samsung-tvplus"
|
||||
},
|
||||
{
|
||||
"id": "le-vite-degli-altri",
|
||||
@@ -742,95 +413,13 @@ STREAM = {
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
webru_vary = {
|
||||
"sky-cinema-action": "calcioXac",
|
||||
"comedy-central": "calcioXcomedycentral",
|
||||
"history": "calcioXhistory",
|
||||
"sky-arte": "calcioXskyarte",
|
||||
"sky-atlantic": "calcioXskyatlantic",
|
||||
"sky-cinema-collection": "calcioXskycinemacollection",
|
||||
"sky-cinema-comedy": "calcioXskycinemacomedy",
|
||||
"sky-cinema-drama": "calcioXskycinemadrama",
|
||||
"sky-cinema-due": "calcioXskycinemadue",
|
||||
"sky-cinema-family": "calcioXskycinemafamily",
|
||||
"sky-cinema-romance": "calcioXskycinemaromance",
|
||||
"sky-cinema-suspence": "calcioXskycinemasuspence",
|
||||
"sky-cinema-uno": "calcioXskycinemauno",
|
||||
"sky-crime": "calcioXskycrime",
|
||||
"sky-documentaries": "calcioXskydocumentaries",
|
||||
"sky-investigation": "calcioXskyinvestigation",
|
||||
"sky-nature": "calcioXskynature",
|
||||
"sky-serie": "calcioXskyserie",
|
||||
"sky-uno": "calcioXskyuno",
|
||||
"sky-sport-24": "calcioXskysport24",
|
||||
}
|
||||
'''
|
||||
"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": "premium576",
|
||||
"sky-sport-uno": "premium461",
|
||||
"sky-cinema-collection": "premium859",
|
||||
"sky-cinema-romance": "premium864",
|
||||
"sky-sport-24": "premium869",
|
||||
"sky-sport-254": "premium874",
|
||||
"sky-sport-f1": "premium577",
|
||||
"sky-sport-arena": "premium462",
|
||||
"sky-cinema-uno": "premium860",
|
||||
"sky-cinema-family": "premium865",
|
||||
"sky-sport-calcio": "premium870",
|
||||
"sky-sport-255": "premium875",
|
||||
"sky-cinema-action": "premium861",
|
||||
"sky-cinema-due": "premium866",
|
||||
"sky-sport-251": "premium871",
|
||||
"sky-sport-256": "premium876",
|
||||
"sky-sport-golf": "premium574",
|
||||
"sky-uno": "premium881",
|
||||
"sky-cinema-comedy": "premium862",
|
||||
"sky-cinema-drama": "premium867",
|
||||
"sky-sport-252": "premium872",
|
||||
"sky-sport-257": "premium877",
|
||||
"sky-sport-motogp": "premium575",
|
||||
"sky-sport-football": "premium460",
|
||||
"sky-cinema-uno-24": "premium863",
|
||||
"sky-cinema-suspence": "premium868",
|
||||
"sky-sport-253": "premium873",
|
||||
"sky-serie": "premium880",
|
||||
"dazn-1": "premium877"
|
||||
}
|
||||
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":["https://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","https://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-1": ["https://ilglobotv-live.akamaized.net/channels/RAI1/Live.m3u8"],
|
||||
"rai-2": ["https://ilglobotv-live.akamaized.net/channels/RAI2/Live.m3u8"],
|
||||
"rai-3": ["https://ilglobotv-live.akamaized.net/channels/RAI2/Live.m3u8","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":["https://tvit.leicaflorianrobert.dev/mediaset/rete-4/stream.m3u8","https://timlivetu0.cb.ticdn.it/Content/DASH/Live/channel(rete4)/manifest.mpd"],
|
||||
"canale-5":["https://timlivetu0.cb.ticdn.it/Content/DASH/Live/channel(canale5)/manifest.mpd","https://tvit.leicaflorianrobert.dev/mediaset/canale-5/stream.m3u8",'https://timlivetu0.cb.ticdn.it/Content/DASH/Live/channel(canale5)/manifest.mpd','https://live02-seg.msf.cdn.mediaset.net/live/ch-c5/c5-clr.isml/index.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",'https://timlivetu0.cb.ticdn.it/Content/DASH/Live/channel(italia1)/manifest.mpd'],
|
||||
"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"],
|
||||
@@ -843,49 +432,10 @@ extra_sources = {
|
||||
"dmax": ["https://tvit.leicaflorianrobert.dev/discovery/dmax/stream.m3u8"],
|
||||
"nove": ["https://tvit.leicaflorianrobert.dev/discovery/nove/stream.m3u8"],
|
||||
"euronews": ["https://amg00882-amg00882c4-wedotv-eu-4536.playouts.now.amagi.tv/playlist/amg00882-euronewsfast-euronewsita-wedotveu/playlist.m3u8?app_bundle=&app_name=wedotv&app_store_url=https://wedotv.com&url=https://wedotv.com&gdpr=1&channel_name=Euronews - Italiano&content_custom_1_param=Euronews - Italiano"],
|
||||
"doctor-who": ["https://amg00793-amg00793c17-samsung-it-4577.playouts.now.amagi.tv/playlist/amg00793-bbcstudios-drwhoitaly-samsungit/playlist.m3u8"]
|
||||
}
|
||||
skystreaming ={
|
||||
"sky-sport-tennis": "https://skystreaming.guru/embed/MKCKP",
|
||||
"sky-sport-24": "https://skystreaming.guru/embed/GB7zq",
|
||||
"sky-sport-251": "https://skystreaming.guru/embed/drHbM",
|
||||
"sky-sport-252": "https://skystreaming.guru/embed/m5kfg",
|
||||
"sky-sport-253": "https://skystreaming.guru/embed/YprHf",
|
||||
"sky-sport-254": "https://skystreaming.guru/embed/wroRV",
|
||||
"sky-sport-255": "https://skystreaming.guru/embed/0TixN",
|
||||
"sky-sport-256": "https://skystreaming.guru/embed/8g8bh",
|
||||
"sky-sport-257": "https://skystreaming.guru/embed/ri859",
|
||||
"sky-sport-258": "https://skystreaming.guru/embed/UoJuW",
|
||||
"sky-sport-259": "https://skystreaming.guru/embed/squCy",
|
||||
"sky-sport-260": "https://skystreaming.guru/embed/Z5h2e",
|
||||
"sky-sport-261": "https://skystreaming.guru/embed/Hz9FW",
|
||||
"sky-sport-uno": "https://skystreaming.guru/embed/tb1np",
|
||||
"sky-sport-f1": "https://skystreaming.guru/embed/MLkym",
|
||||
"sky-sport-motogp": "https://skystreaming.guru/embed/ARFFv",
|
||||
"sky-sport-calcio": "https://skystreaming.guru/embed/STOZT",
|
||||
"sky-sport-arena": "https://skystreaming.guru/embed/NkEda",
|
||||
"sky-sport-max": "https://skystreaming.guru/embed/4QzWz",
|
||||
"sky-sport-nba": "https://skystreaming.guru/embed/saR8j",
|
||||
"sky-sport-golf": "https://skystreaming.guru/embed/s9L5f",
|
||||
"eurosport-1": "https://skystreaming.guru/embed/Vyv99",
|
||||
"eurosport-2": "https://skystreaming.guru/embed/um8E5",
|
||||
"dazn-zona-a": ["https://hls.psz.pm/hls/serie/index.m3u8","https://hls.cls.autos/hls/serie/index.m3u8"],
|
||||
"sportitalia": "https://hls.cls.autos/hls/sportitalia/index.m3u8",
|
||||
}
|
||||
huhu = {
|
||||
"canale-5": "1101559666",
|
||||
"sky-sport-motogp": "2090703806",
|
||||
"rai-1": "1225653759",
|
||||
"sky-cinema-drama": "1235530177",
|
||||
"sky-cinema-action": "3812796171",
|
||||
"Dazn": "2745635299",
|
||||
"sky-sport-uno": "3192996672",
|
||||
"canale-5": "1534161807",
|
||||
"mediaset-extra": "477466531",
|
||||
"Dazn-1": "1376440573",
|
||||
"sky-sport-24": "2775802255",
|
||||
"sky-sport-24": "3445562519",
|
||||
"doctor-who": ["https://amg00793-amg00793c17-samsung-it-4577.playouts.now.amagi.tv/playlist/amg00793-bbcstudios-drwhoitaly-samsungit/playlist.m3u8"],
|
||||
"supertennis": ["https://live-embed.supertennix.hiway.media/restreamer/supertennix_client/gpu-a-c0-16/restreamer/outgest/h24_supertennix/manifest.m3u8"]
|
||||
}
|
||||
|
||||
provider_map = {
|
||||
'SC': 'STREAMINGCOMMUNITY',
|
||||
'SC_FS': 'SC_FAST_SEARCH',
|
||||
@@ -894,5 +444,13 @@ provider_map = {
|
||||
'TF_FS': 'TF_FAST_SEARCH',
|
||||
'TF': 'TANTIFILM', # Assuming 'TF' should also be handled
|
||||
'FT': 'FILMPERTUTTI',
|
||||
'AW': 'ANIMEWORLD'
|
||||
'AW': 'ANIMEWORLD',
|
||||
'DDL': 'DDLSTREAM',
|
||||
'CB': 'CB01',
|
||||
"GS": "GUARDASERIE",
|
||||
"GHD": "GUARDAHD",
|
||||
"OST": "ONLINESERIETV",
|
||||
"ES": "EUROSTREAMING",
|
||||
"GO": "GUARDOSERIE",
|
||||
"GF": "GUARDAFLIX"
|
||||
}
|
||||
@@ -0,0 +1,179 @@
|
||||
#Adapted for use in MammaMia from:
|
||||
#https://github.com/einars/js-beautify/blob/master/python/jsbeautifier/unpackers/packer.py
|
||||
# Unpacker for Dean Edward's p.a.c.k.e.r, a part of javascript beautifier
|
||||
# by Einar Lielmanis <[email protected]>
|
||||
#
|
||||
# written by Stefano Sanfilippo <[email protected]>
|
||||
#
|
||||
# usage:
|
||||
#
|
||||
# if detect(some_string):
|
||||
# unpacked = unpack(some_string)
|
||||
#
|
||||
from fake_headers import Headers
|
||||
"""Unpacker for Dean Edward's p.a.c.k.e.r"""
|
||||
import re
|
||||
from bs4 import BeautifulSoup, SoupStrainer
|
||||
import logging
|
||||
import Src.Utilities.config as config
|
||||
from Src.Utilities.config import setup_logging
|
||||
level = config.LEVEL
|
||||
logger = setup_logging(level)
|
||||
|
||||
def detect(source):
|
||||
if "eval(function(p,a,c,k,e,d)" in source:
|
||||
mystr = "smth"
|
||||
return mystr is not None
|
||||
|
||||
|
||||
def unpack(source):
|
||||
"""Unpacks P.A.C.K.E.R. packed js code."""
|
||||
payload, symtab, radix, count = _filterargs(source)
|
||||
|
||||
if count != len(symtab):
|
||||
raise UnpackingError("Malformed p.a.c.k.e.r. symtab.")
|
||||
|
||||
try:
|
||||
unbase = Unbaser(radix)
|
||||
except TypeError:
|
||||
raise UnpackingError("Unknown p.a.c.k.e.r. encoding.")
|
||||
|
||||
def lookup(match):
|
||||
"""Look up symbols in the synthetic symtab."""
|
||||
word = match.group(0)
|
||||
return symtab[unbase(word)] or word
|
||||
|
||||
payload = payload.replace("\\\\", "\\").replace("\\'", "'")
|
||||
source = re.sub(r"\b\w+\b", lookup, payload)
|
||||
return _replacestrings(source)
|
||||
|
||||
|
||||
def _filterargs(source):
|
||||
"""Juice from a source file the four args needed by decoder."""
|
||||
juicers = [
|
||||
(r"}\('(.*)', *(\d+|\[\]), *(\d+), *'(.*)'\.split\('\|'\), *(\d+), *(.*)\)\)"),
|
||||
(r"}\('(.*)', *(\d+|\[\]), *(\d+), *'(.*)'\.split\('\|'\)"),
|
||||
]
|
||||
for juicer in juicers:
|
||||
args = re.search(juicer, source, re.DOTALL)
|
||||
if args:
|
||||
a = args.groups()
|
||||
if a[1] == "[]":
|
||||
a = list(a)
|
||||
a[1] = 62
|
||||
a = tuple(a)
|
||||
try:
|
||||
return a[0], a[3].split("|"), int(a[1]), int(a[2])
|
||||
except ValueError:
|
||||
raise UnpackingError("Corrupted p.a.c.k.e.r. data.")
|
||||
|
||||
# could not find a satisfying regex
|
||||
raise UnpackingError(
|
||||
"Could not make sense of p.a.c.k.e.r data (unexpected code structure)"
|
||||
)
|
||||
|
||||
|
||||
def _replacestrings(source):
|
||||
"""Strip string lookup table (list) and replace values in source."""
|
||||
match = re.search(r'var *(_\w+)\=\["(.*?)"\];', source, re.DOTALL)
|
||||
|
||||
if match:
|
||||
varname, strings = match.groups()
|
||||
startpoint = len(match.group(0))
|
||||
lookup = strings.split('","')
|
||||
variable = "%s[%%d]" % varname
|
||||
for index, value in enumerate(lookup):
|
||||
source = source.replace(variable % index, '"%s"' % value)
|
||||
return source[startpoint:]
|
||||
return source
|
||||
|
||||
|
||||
class Unbaser(object):
|
||||
"""Functor for a given base. Will efficiently convert
|
||||
strings to natural numbers."""
|
||||
|
||||
ALPHABET = {
|
||||
62: "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
|
||||
95: (
|
||||
" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ"
|
||||
"[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~"
|
||||
),
|
||||
}
|
||||
|
||||
def __init__(self, base):
|
||||
self.base = base
|
||||
|
||||
# fill elements 37...61, if necessary
|
||||
if 36 < base < 62:
|
||||
if not hasattr(self.ALPHABET, self.ALPHABET[62][:base]):
|
||||
self.ALPHABET[base] = self.ALPHABET[62][:base]
|
||||
# attrs = self.ALPHABET
|
||||
# print ', '.join("%s: %s" % item for item in attrs.items())
|
||||
# If base can be handled by int() builtin, let it do it for us
|
||||
if 2 <= base <= 36:
|
||||
self.unbase = lambda string: int(string, base)
|
||||
else:
|
||||
# Build conversion dictionary cache
|
||||
try:
|
||||
self.dictionary = dict(
|
||||
(cipher, index) for index, cipher in enumerate(self.ALPHABET[base])
|
||||
)
|
||||
except KeyError:
|
||||
raise TypeError("Unsupported base encoding.")
|
||||
|
||||
self.unbase = self._dictunbaser
|
||||
|
||||
def __call__(self, string):
|
||||
return self.unbase(string)
|
||||
|
||||
def _dictunbaser(self, string):
|
||||
"""Decodes a value to an integer."""
|
||||
ret = 0
|
||||
for index, cipher in enumerate(string[::-1]):
|
||||
ret += (self.base**index) * self.dictionary[cipher]
|
||||
return ret
|
||||
class UnpackingError(Exception):
|
||||
"""Badly packed source or general error. Argument is a
|
||||
meaningful description."""
|
||||
|
||||
pass
|
||||
|
||||
random_headers = Headers()
|
||||
|
||||
|
||||
async def eval_solver(stream_link,proxies, ForwardProxy, client):
|
||||
try:
|
||||
headers = random_headers.generate()
|
||||
headers["User-Agent"] = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36"
|
||||
headers["accept-language"] = 'en-US,en;q=0.5'
|
||||
response = await client.get( ForwardProxy + stream_link, allow_redirects=True, timeout=30, headers = headers, proxies = proxies, impersonate = "chrome124")
|
||||
logger.debug("Eval:",response.status_code)
|
||||
soup = BeautifulSoup(response.text, "lxml",parse_only=SoupStrainer("script"))
|
||||
script_all = soup.find_all("script")
|
||||
for i in script_all:
|
||||
if detect(i.text):
|
||||
unpacked_code = unpack(i.text)
|
||||
if "mixdrop" in stream_link:
|
||||
pattern = r'MDCore.wurl ?= ?"(.*?)"'
|
||||
|
||||
else:
|
||||
pattern = r'file:"(.*?)"'
|
||||
match = re.search(pattern, unpacked_code)
|
||||
if match:
|
||||
m3u8_url = match.group(1)
|
||||
return m3u8_url
|
||||
except Exception as e:
|
||||
logger.debug("Eval solver error\n",e)
|
||||
raise Exception("Error in eval_solver")
|
||||
|
||||
|
||||
#Testing
|
||||
async def test_animeworld():
|
||||
from curl_cffi.requests import AsyncSession
|
||||
async with AsyncSession() as client:
|
||||
results = await eval_solver("https://mixdrop.cv/e/l6kqxrm4t4l4or",{},"",client)
|
||||
|
||||
if __name__ == "__main__":
|
||||
import asyncio
|
||||
asyncio.run(test_animeworld())
|
||||
#python3 -m Src.Utilities.eval
|
||||
+59
-27
@@ -16,21 +16,16 @@ def get_info_tmdb(tmbda,ismovie,type):
|
||||
show= tv.details(tmbda)
|
||||
showname = show.name
|
||||
if type == "Filmpertutti":
|
||||
date= show.first_air_date
|
||||
date = date.split("-")[0]
|
||||
print("Real date",date)
|
||||
return showname,date
|
||||
return showname
|
||||
elif type == "StreamingCommunity":
|
||||
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
|
||||
@@ -39,12 +34,10 @@ def get_info_tmdb(tmbda,ismovie,type):
|
||||
elif type == "LordChannel":
|
||||
date = show.first_air_date
|
||||
date = date.split("-")[0]
|
||||
print("Real date",date)
|
||||
return showname,date
|
||||
elif type == "StreamingWatch":
|
||||
date = show.first_air_date
|
||||
date = date.split("-")[0]
|
||||
print("Real date",date)
|
||||
return showname,date
|
||||
elif type == "DDLStream":
|
||||
return showname
|
||||
@@ -56,6 +49,18 @@ def get_info_tmdb(tmbda,ismovie,type):
|
||||
date = show.first_air_date
|
||||
date = date.split("-")[0]
|
||||
return showname,date
|
||||
elif type == "Guardaserie":
|
||||
date = show.first_air_date
|
||||
date = date.split("-")[0]
|
||||
return showname,date
|
||||
elif type == "Eurostreaming":
|
||||
date = show.first_air_date
|
||||
date = date.split("-")[0]
|
||||
return showname,date
|
||||
elif type == "Guardoserie":
|
||||
date = show.first_air_date
|
||||
date = date.split("-")[0]
|
||||
return showname,date
|
||||
|
||||
elif ismovie == 1:
|
||||
movie = Movie()
|
||||
@@ -63,20 +68,16 @@ def get_info_tmdb(tmbda,ismovie,type):
|
||||
showname= show.title
|
||||
#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
|
||||
return showname,date
|
||||
elif type == "StreamingCommunity":
|
||||
date = show.release_dates
|
||||
date = date.split("-")[0]
|
||||
return showname
|
||||
elif type == "StreamingCommunity":
|
||||
date = show.release_date
|
||||
date = date.split("-")[0]
|
||||
return showname,date
|
||||
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
|
||||
@@ -85,12 +86,10 @@ def get_info_tmdb(tmbda,ismovie,type):
|
||||
elif type == "LordChannel":
|
||||
date = show.release_date
|
||||
date = date.split("-")[0]
|
||||
print("Real date",date)
|
||||
return showname,date
|
||||
elif type == "StreamingWatch":
|
||||
date = show.release_date
|
||||
date = date.split("-")[0]
|
||||
print("Real date",date)
|
||||
return showname,date
|
||||
elif type == "DDLStream":
|
||||
return showname
|
||||
@@ -102,6 +101,14 @@ def get_info_tmdb(tmbda,ismovie,type):
|
||||
date = show.release_date
|
||||
date = date.split("-")[0]
|
||||
return showname,date
|
||||
elif type == "Guardoserie":
|
||||
date = show.release_date
|
||||
date = date.split("-")[0]
|
||||
return showname,date
|
||||
elif type == 'Guardaflix':
|
||||
date = show.release_date
|
||||
date = date.split("-")[0]
|
||||
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')
|
||||
@@ -109,10 +116,7 @@ async def get_info_imdb(imdb_id, ismovie, type,client):
|
||||
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
|
||||
return showname
|
||||
elif type == "StreamingCommunity":
|
||||
date = data['tv_results'][0]['first_air_date']
|
||||
date = date.split("-")[0]
|
||||
@@ -137,13 +141,26 @@ async def get_info_imdb(imdb_id, ismovie, type,client):
|
||||
date = data['tv_results'][0]['first_air_date']
|
||||
date = date.split("-")[0]
|
||||
return showname,date
|
||||
|
||||
elif type == "Onlineserietv":
|
||||
date = data['tv_results'][0]['first_air_date']
|
||||
date = date.split("-")[0]
|
||||
return showname,date
|
||||
elif type == "Guardaserie":
|
||||
date = data['tv_results'][0]['first_air_date']
|
||||
date = date.split("-")[0]
|
||||
return showname,date
|
||||
elif type == "Eurostreaming":
|
||||
date = data['tv_results'][0]['first_air_date']
|
||||
date = date.split("-")[0]
|
||||
return showname,date
|
||||
elif type == "Guardoserie":
|
||||
date = data['tv_results'][0]['first_air_date']
|
||||
date = date.split("-")[0]
|
||||
return showname,date
|
||||
elif ismovie == 1:
|
||||
showname= data['movie_results'][0]['title']
|
||||
if type == "Filmpertutti":
|
||||
date = data['movie_results'][0]['release_date']
|
||||
date = date.split("-")[0]
|
||||
return showname,date
|
||||
return showname
|
||||
elif type == "StreamingCommunity":
|
||||
date = data['movie_results'][0]['release_date']
|
||||
date = date.split("-")[0]
|
||||
@@ -166,12 +183,27 @@ async def get_info_imdb(imdb_id, ismovie, type,client):
|
||||
date = data['movie_results'][0]['release_date']
|
||||
date = date.split("-")[0]
|
||||
return showname,date
|
||||
elif type == "Onlineserietv":
|
||||
date = data['movie_results'][0]['release_date']
|
||||
date = date.split("-")[0]
|
||||
return showname,date
|
||||
elif type == "Guardoserie":
|
||||
date = data['movie_results'][0]['release_date']
|
||||
date = date.split("-")[0]
|
||||
return showname,date
|
||||
elif type == 'Guardaflix':
|
||||
date = data['movie_results'][0]['release_date']
|
||||
date = date.split("-")[0]
|
||||
return showname,date
|
||||
|
||||
|
||||
async def get_info_kitsu(kitsu_id,client):
|
||||
api_url = f'https://kitsu.io/api/edge/anime/{kitsu_id}'
|
||||
response = await client.get(api_url)
|
||||
data = json.loads(response.text)
|
||||
try:
|
||||
showname = data['data']['attributes']['titles']['en']
|
||||
except Exception as e:
|
||||
showname = data['data']['attributes']['canonicalTitle']
|
||||
date = data['data']['attributes']['startDate']
|
||||
return showname,date
|
||||
@@ -179,7 +211,7 @@ async def get_info_kitsu(kitsu_id,client):
|
||||
|
||||
|
||||
|
||||
def is_movie(imdb_id):
|
||||
async def is_movie(imdb_id):
|
||||
if "tmdb:" in imdb_id:
|
||||
imdb_id = imdb_id.replace("tmdb:","")
|
||||
if ":" in imdb_id:
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
import os
|
||||
import Src.Utilities.config as config
|
||||
MYSTERIUS = config.MYSTERIUS
|
||||
dotenv = config.dotenv
|
||||
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
|
||||
@@ -13,10 +10,7 @@ if dotenv == "1":
|
||||
def load_env():
|
||||
env_vars = {}
|
||||
env_vars['TMDB_KEY'] = os.getenv('TMDB_KEY')
|
||||
if MYSTERIUS == "1":
|
||||
env_vars['MYSTERIUS_KEY'] = os.getenv('MYSTERIUS_KEY')
|
||||
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')
|
||||
env_vars['ForwardProxy'] = os.getenv('FORWARDPROXY')
|
||||
env_vars['PORT_ENV'] = os.getenv('PORT')
|
||||
return env_vars
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
import logging
|
||||
import Src.Utilities.config as config
|
||||
from Src.Utilities.config import setup_logging
|
||||
import urllib.parse
|
||||
|
||||
level = config.LEVEL
|
||||
logger = setup_logging(level)
|
||||
|
||||
async def transform_mfp(mfp_stream_url,client):
|
||||
try:
|
||||
response = await client.get(mfp_stream_url)
|
||||
data = response.json()
|
||||
url = data['mediaflow_proxy_url'] + "?api_password=" + data['query_params']['api_password'] + "&d=" + urllib.parse.quote(data['destination_url'])
|
||||
for i in data['request_headers']:
|
||||
url += f"&h_{i}={urllib.parse.quote(data['request_headers'][i])}"
|
||||
return url
|
||||
except Exception as e:
|
||||
logger.warning(f"Converting MFP failed {e}")
|
||||
return None
|
||||
|
||||
async def build_mfp(MFP_CREDENTIALS,url,host,client):
|
||||
MFP_url = MFP_CREDENTIALS[0]
|
||||
MFP_password = MFP_CREDENTIALS[1]
|
||||
url_mfp = f'{MFP_url}/extractor/video?api_password={MFP_password}&d={url}&host={host}&redirect_stream=false'
|
||||
#To build pieces together
|
||||
url_mfp = await transform_mfp(url_mfp,client)
|
||||
return url_mfp
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"projectName": "MammaMia",
|
||||
"lastCommit": "d39bc34"
|
||||
}
|
||||
+58
-28
@@ -1,41 +1,71 @@
|
||||
{
|
||||
"Siti": {
|
||||
"StreamingCommunity": {
|
||||
"domain": "buzz"
|
||||
},
|
||||
"Filmpertutti": {
|
||||
"domain": "diy"
|
||||
},
|
||||
"Tantifilm":{
|
||||
"domain": "bond"
|
||||
},
|
||||
"Mysterius":{
|
||||
"enabled": "0"
|
||||
},
|
||||
"LordChannel":{
|
||||
"domain":"com"
|
||||
"url": "https://vixsrc.to",
|
||||
"SC_ForwardProxy": "0",
|
||||
"SC_PROXY": "0",
|
||||
"VX_ForwardProxy": "0",
|
||||
"VX_PROXY": "0",
|
||||
"enabled": "1"
|
||||
},
|
||||
"StreamingWatch":{
|
||||
"domain":"org"
|
||||
"url":"https://www.streamingwatch.org",
|
||||
"SW_PROXY": "0",
|
||||
"SW_ForwardProxy": "0",
|
||||
"enabled":"1"
|
||||
},
|
||||
"CB01":{
|
||||
"url":"https://cb01.uno",
|
||||
"CB_PROXY":"0",
|
||||
"CB_ForwardProxy":"0",
|
||||
"MX_ForwardProxy":"0",
|
||||
"MX_PROXY":"0",
|
||||
"enabled":"1"
|
||||
},
|
||||
"Guardaserie":{
|
||||
"url":"https://guardaserie.qpon",
|
||||
"enabled":"1",
|
||||
"GS_ForwardProxy":"0",
|
||||
"GS_PROXY":"0"
|
||||
},
|
||||
"GuardaHD":{
|
||||
"url":"https://mostraguarda.stream",
|
||||
"enabled":"1",
|
||||
"GH_ForwardProxy":"0",
|
||||
"GH_PROXY":"0"
|
||||
},
|
||||
"Eurostreaming":{
|
||||
"url": "https://eurostreaming.garden",
|
||||
"enabled": "1",
|
||||
"ES_ForwardProxy": "0",
|
||||
"ES_PROXY": "0"
|
||||
},
|
||||
"Guardaflix":{
|
||||
"url": "https://guardaflix.live",
|
||||
"enabled": "1",
|
||||
"GF_ForwardProxy": "0",
|
||||
"GF_PROXY": "0"
|
||||
},
|
||||
"Guardoserie":{
|
||||
"url": "https://guardoserie.live",
|
||||
"enabled": "1",
|
||||
"GO_ForwardProxy": "0",
|
||||
"GO_PROXY": "0"
|
||||
},
|
||||
"AnimeWorld":{
|
||||
"domain":"so"
|
||||
},
|
||||
"SkyStreaming":{
|
||||
"domain":"guru"
|
||||
},
|
||||
"DaddyLiveHD":{
|
||||
"enabled":"1"
|
||||
"url":"https://www.animeworld.so",
|
||||
"enabled":"1",
|
||||
"AW_ForwardProxy":"0",
|
||||
"AW_PROXY":"0"
|
||||
}
|
||||
},
|
||||
"General":{
|
||||
"load_env": "0",
|
||||
"HOST": "0.0.0.0",
|
||||
"PORT": "8080",
|
||||
"HF": "1",
|
||||
"Public_Instance": "0",
|
||||
"MediaProxy": ["Test"],
|
||||
"ForwardProxy": ["Test"],
|
||||
"Proxy": []
|
||||
"PORT": 8080,
|
||||
"Name": "MammaMia",
|
||||
"Icon": "🍕️",
|
||||
"level": "info",
|
||||
"Global_Proxy": "0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+6
-2
@@ -1,3 +1,7 @@
|
||||
# This env variable is mandatory
|
||||
# Questa variabile è obbligatoria
|
||||
TMDB_KEY= "INSERT YOUR API KEY HERE"
|
||||
MEDIAFLOW_PASS = "INSERT YOUR MEDIAFLOW PASS HERE"
|
||||
|
||||
# Those env variable are not mandatory
|
||||
# Queste variabili non sono obbligatoria
|
||||
PROXY = ["PROXY1","PROXY2"]
|
||||
FORWARDPROXY = "YOURFORWARDPROXY/"
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
services:
|
||||
- type: web
|
||||
name: MammaMia
|
||||
runtime: python
|
||||
buildCommand: pip install -r requirements.txt
|
||||
startCommand: python3 run.py
|
||||
plan: free
|
||||
region: frankfurt
|
||||
envVars:
|
||||
# Sets a hardcoded value
|
||||
# (DO NOT hardcode secrets in your Blueprint file!)
|
||||
- key: PORT
|
||||
value: 8080
|
||||
# Prompts for a value in the Render Dashboard on creation
|
||||
# (useful for secrets)
|
||||
- key: TMDB_KEY
|
||||
sync: false
|
||||
@@ -9,3 +9,5 @@ lxml
|
||||
slowapi
|
||||
curl_cffi
|
||||
fake-headers
|
||||
pycryptodome
|
||||
rich
|
||||
@@ -1,48 +1,78 @@
|
||||
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 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,skystreaming
|
||||
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,get_skystreaming
|
||||
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
|
||||
MYSTERIUS = config.MYSTERIUS
|
||||
DLHD = config.DLHD
|
||||
from static.configure import CONFIGURE
|
||||
|
||||
|
||||
from Src.API.streamingcommunity import streaming_community
|
||||
from Src.API.streamingwatch import streamingwatch
|
||||
from Src.API.cb01 import cb01
|
||||
from Src.API.guardaserie import guardaserie
|
||||
from Src.API.guardahd import guardahd
|
||||
from Src.API.animeworld import animeworld
|
||||
from Src.API.guardaflix import guardaflix
|
||||
from Src.API.guardoserie import guardoserie
|
||||
from Src.API.eurostreaming import eurostreaming
|
||||
|
||||
from Src.Utilities.dictionaries import STREAM,extra_sources,provider_map
|
||||
from Src.API.epg import tivu, tivu_get,epg_guide,convert_bho_1,convert_bho_2,convert_bho_3
|
||||
|
||||
import logging
|
||||
from urllib.parse import unquote
|
||||
from curl_cffi.requests import AsyncSession
|
||||
import base64
|
||||
import Src.Utilities.config as config
|
||||
from Src.Utilities.config import setup_logging
|
||||
level = config.LEVEL
|
||||
logger = setup_logging(level)
|
||||
from Src.Utilities.loadenv import load_env
|
||||
env_vars = load_env()
|
||||
|
||||
#Configure Env Vars
|
||||
Global_Proxy = config.Global_Proxy
|
||||
if Global_Proxy == "1":
|
||||
PROXY_CREDENTIALS = env_vars.get('PROXY_CREDENTIALS')
|
||||
|
||||
proxies = {
|
||||
"http": PROXY_CREDENTIALS,
|
||||
"https": PROXY_CREDENTIALS
|
||||
}
|
||||
else:
|
||||
proxies = {}
|
||||
# Configure config
|
||||
SC = config.SC
|
||||
SC_DOMAIN = config.SC_DOMAIN
|
||||
SW = config.SW
|
||||
AW = config.AW
|
||||
CB = config.CB
|
||||
GS = config.GS
|
||||
GHD = config.GHD
|
||||
ES = config.ES
|
||||
GF = config.GF
|
||||
GO = config.GO
|
||||
HOST = config.HOST
|
||||
PORT = int(config.PORT)
|
||||
HF = config.HF
|
||||
if HF == "1":
|
||||
HF = "🤗️"
|
||||
if env_vars.get('PORT_ENV'):
|
||||
PORT = int(env_vars.get('PORT_ENV'))
|
||||
Icon = config.Icon
|
||||
Name = config.Name
|
||||
#Cool code to set the hugging face if the service is hosted there.
|
||||
else:
|
||||
HF = ""
|
||||
if MYSTERIUS == "1":
|
||||
from Src.API.cool import cool
|
||||
|
||||
app = FastAPI()
|
||||
limiter = Limiter(key_func=get_remote_address)
|
||||
app.state.limiter = limiter
|
||||
app.add_middleware(SlowAPIMiddleware)
|
||||
User_Agent= "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36"
|
||||
MANIFEST = {
|
||||
"id": "org.stremio.mammamia",
|
||||
"version": "1.1.0",
|
||||
"version": "2.0.0",
|
||||
"catalogs": [
|
||||
{
|
||||
"type": "tv",
|
||||
"id": "tv_channels",
|
||||
"name": "TV Channels",
|
||||
"name": "MammaMia",
|
||||
"behaviorHints": {
|
||||
"configurable": True,
|
||||
"configurationRequired": True
|
||||
@@ -58,7 +88,7 @@ MANIFEST = {
|
||||
],
|
||||
"resources": ["stream", "catalog", "meta"],
|
||||
"types": ["movie", "series", "tv"],
|
||||
"name": "Mamma Mia",
|
||||
"name": Name,
|
||||
"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"
|
||||
}
|
||||
@@ -70,12 +100,27 @@ def respond_with(data):
|
||||
resp.headers['Access-Control-Allow-Headers'] = '*'
|
||||
return resp
|
||||
|
||||
@app.get('/config')
|
||||
def config():
|
||||
return RedirectResponse(url="/")
|
||||
@app.get('/{config}/manifest.json')
|
||||
def addon_manifest():
|
||||
return respond_with(MANIFEST)
|
||||
|
||||
|
||||
@app.get('/configure',response_class=HTMLResponse)
|
||||
def config(request: Request):
|
||||
forwarded_proto = request.headers.get("x-forwarded-proto")
|
||||
scheme = forwarded_proto if forwarded_proto else request.url.scheme
|
||||
instance_url = f"{scheme}://{request.url.netloc}"
|
||||
html_content = CONFIGURE.replace("{instance_url}", instance_url)
|
||||
return html_content
|
||||
@app.get('/{config:path}/manifest.json')
|
||||
def addon_manifest(config: str):
|
||||
manifest_copy = MANIFEST.copy()
|
||||
config = base64.b64decode(config).decode('utf-8')
|
||||
if "LIVETV" in config:
|
||||
return respond_with(manifest_copy)
|
||||
elif "LIVETV" not in config:
|
||||
manifest_copy["catalogs"] = []
|
||||
if "catalog" in manifest_copy["resources"]:
|
||||
manifest_copy["resources"].remove("catalog")
|
||||
return respond_with(manifest_copy)
|
||||
|
||||
@app.get('/manifest.json')
|
||||
def manifest():
|
||||
return RedirectResponse(url="/|SC|LC|SW|/manifest.json")
|
||||
@@ -88,7 +133,6 @@ def root(request: Request):
|
||||
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)
|
||||
|
||||
@@ -109,18 +153,18 @@ async def addon_catalog(type: str, id: str, genre: str = None):
|
||||
})
|
||||
|
||||
return catalogs
|
||||
@app.get('/{config}/catalog/{type}/{id}.json')
|
||||
@app.get('/{config:path}/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('/{config}/catalog/{type}/{id}/genre={genre}.json')
|
||||
@app.get('/{config:path}/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')
|
||||
@app.get('/{config:path}/meta/tv/{id}.json')
|
||||
@limiter.limit("20/second")
|
||||
async def addon_meta(request: Request,id: str):
|
||||
# Find the channel by ID
|
||||
@@ -128,12 +172,11 @@ async def addon_meta(request: Request,id: str):
|
||||
|
||||
if not channel:
|
||||
raise HTTPException(status_code=404, detail="Channel not found")
|
||||
async with AsyncSession() as client:
|
||||
async with AsyncSession(proxies = proxies) 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"]}'
|
||||
@@ -157,125 +200,77 @@ async def addon_meta(request: Request,id: str):
|
||||
return respond_with(meta)
|
||||
|
||||
|
||||
@app.get('/{config}/stream/{type}/{id}.json')
|
||||
@app.get('/{config:path}/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': []}
|
||||
config = base64.b64decode(config).decode('utf-8')
|
||||
if "|" in config:
|
||||
config_providers = config.split('|')
|
||||
elif "%7C" in config:
|
||||
config_providers = config.split('%7C')
|
||||
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"
|
||||
if "MFP[" in config:
|
||||
# Extract proxy data between "MFP(" and ")"
|
||||
mfp_data = config.split("MFP[")[1].split(")")[0]
|
||||
# Split the data by comma to get proxy URL and password
|
||||
MFP_url, MFP_password = mfp_data.split(",")
|
||||
MFP_password = MFP_password[:-2]
|
||||
#If mfp_url ends with a string we remove it
|
||||
if MFP_url.endswith('/'):
|
||||
MFP_url = MFP_url[:-1]
|
||||
# Store them in a list
|
||||
MFP_CREDENTIALS = [MFP_url, MFP_password]
|
||||
if MFP_url and MFP_password:
|
||||
MFP = "1"
|
||||
|
||||
async with AsyncSession() as client:
|
||||
else:
|
||||
MFP = "0"
|
||||
MFP_CREDENTIALS = ['','']
|
||||
async with AsyncSession(proxies = proxies) as client:
|
||||
if type == "tv":
|
||||
for channel in STREAM["channels"]:
|
||||
if channel["id"] == id:
|
||||
i = 0
|
||||
if 'url' in channel:
|
||||
i = i+1
|
||||
streams['streams'].append({
|
||||
'title': f"{HF}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': f"{HF}Server {i} " + channel['title'] + " OKRU",
|
||||
'url': channel_url
|
||||
})
|
||||
streams['streams'].append({'title': f"{Icon}Server {i} " + f" "+ channel['name'] + " " + channel['title'] ,'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"{HF}Server {i} " + channel['title'],'url': item})
|
||||
if id in skystreaming:
|
||||
|
||||
urls = await get_skystreaming(id,client)
|
||||
for url in urls:
|
||||
i = i+1
|
||||
Host = urls[url]
|
||||
print(url,Host)
|
||||
streams['streams'].append({'title': f'{HF}Server {i}', 'url': url, "behaviorHints": {"notWebReady": True, "proxyHeaders": {"request": {"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", "Origin": "https://skystreaming.guru", "DNT": "1", "Sec-GPC": "1", "Connection": "keep-alive", "Referer": "https://skystreaming.guru/", "Sec-Fetch-Dest": "empty", "Sec-Fetch-Mode": "cors", "Sec-Fetch-Site": "cross-site", "Pragma": "no-cache", "Cache-Control": "no-cache", "TE": "trailers","Host": Host}}}})
|
||||
|
||||
if id in webru_vary:
|
||||
i = i+1
|
||||
webru_url = await webru(id,"vary",client)
|
||||
streams['streams'].append({'title': f"{HF}Server {i} " + channel['title'],'url': webru_url})
|
||||
if id in webru_dlhd:
|
||||
if DLHD == "1":
|
||||
i = i+1
|
||||
webru_url_2 = await webru(id,"dlhd",client)
|
||||
streams['streams'].append({'title': f"{HF}Server {i} " + channel['title'],'url': webru_url_2})
|
||||
streams['streams'].append({'title':f"{Icon}Server {i} " + channel['title'],'url': item})
|
||||
if not streams['streams']:
|
||||
raise HTTPException(status_code=404)
|
||||
return respond_with(streams)
|
||||
elif "tt" in id or "tmdb" in id or "kitsu" in id:
|
||||
print(f"Handling movie or series: {id}")
|
||||
logger.info(f"Handling movie or series: {id}")
|
||||
if "kitsu" in id:
|
||||
if provider_maps['ANIMEWORLD'] == "1":
|
||||
animeworld_urls = await animeworld(id,client)
|
||||
if animeworld_urls:
|
||||
print(f"AnimeWorld Found Results for {id}")
|
||||
i = 0
|
||||
for url in animeworld_urls:
|
||||
if url:
|
||||
if i == 0:
|
||||
title = "Original"
|
||||
elif i == 1:
|
||||
title = "Italian"
|
||||
streams['streams'].append({'title': f'{HF}Animeworld {title}', 'url': url})
|
||||
i+=1
|
||||
if provider_maps['ANIMEWORLD'] == "1" and AW == "1":
|
||||
streams = await animeworld(streams,id,client)
|
||||
else:
|
||||
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})
|
||||
print(provider_maps['STREAMINGCOMMUNITY'])
|
||||
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 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 provider_maps['FILMPERTUTTI'] == "1":
|
||||
url_filmpertutti = await filmpertutti(id,client)
|
||||
if url_filmpertutti is not None:
|
||||
print(f"Filmpertutti Found Results for {id}")
|
||||
streams['streams'].append({'title': 'Filmpertutti', 'url': url_filmpertutti})
|
||||
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}})
|
||||
else:
|
||||
streams['streams'].append({'title': f'{HF}Tantifilm', 'url': url_tantifilm, 'behaviorHints': {'proxyHeaders': {"request": {"Referer": "https://d000d.com/"}}, 'notWebReady': True}})
|
||||
if provider_maps['STREAMINGWATCH'] == "1":
|
||||
url_streamingwatch = await streamingwatch(id,client)
|
||||
if url_streamingwatch:
|
||||
print(f"Streaming Watch Found Results for {id}")
|
||||
streams['streams'].append({'title': f'{HF}StreamingWatch 720p', 'url': url_streamingwatch})
|
||||
if provider_maps['STREAMINGCOMMUNITY'] == "1" and SC == "1":
|
||||
streams = await streaming_community(streams,id,client,MFP,MFP_CREDENTIALS)
|
||||
if provider_maps['STREAMINGWATCH'] == "1" and SW == "1":
|
||||
streams = await streamingwatch(streams,id,client)
|
||||
if provider_maps['CB01'] == "1" and CB == "1":
|
||||
streams = await cb01(streams,id,MFP,MFP_CREDENTIALS,client)
|
||||
if provider_maps['GUARDASERIE'] == "1" and GS == "1":
|
||||
streams = await guardaserie(streams,id,client)
|
||||
if provider_maps['GUARDAHD'] == "1" and GHD == "1":
|
||||
streams = await guardahd(streams,id,client)
|
||||
if provider_maps['EUROSTREAMING'] == "1" and ES == "1":
|
||||
streams = await eurostreaming(streams,id,client,MFP,MFP_CREDENTIALS)
|
||||
if provider_maps['GUARDAFLIX'] == "1" and GF == "1":
|
||||
streams = await guardaflix(streams,id,client,MFP,MFP_CREDENTIALS)
|
||||
if provider_maps['GUARDOSERIE'] == "1" and GO == "1":
|
||||
streams = await guardoserie(streams,id,client,MFP,MFP_CREDENTIALS)
|
||||
if not streams['streams']:
|
||||
raise HTTPException(status_code=404)
|
||||
|
||||
@@ -284,4 +279,5 @@ async def addon_stream(request: Request,config, type, id,):
|
||||
|
||||
if __name__ == '__main__':
|
||||
import uvicorn
|
||||
uvicorn.run("run:app", host=HOST, port=PORT, log_level="info")
|
||||
uvicorn.run("run:app", host=HOST, port=PORT, log_level=level)
|
||||
|
||||
|
||||
@@ -0,0 +1,321 @@
|
||||
# static.py
|
||||
|
||||
CONFIGURE = """
|
||||
<!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/ry3p76HY/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;
|
||||
}
|
||||
.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; /* Initially hidden */
|
||||
text-align: left;
|
||||
white-space: pre-wrap; /* Preserves whitespace and wraps text */
|
||||
overflow-wrap: break-word; /* Breaks long words to prevent overflow */
|
||||
word-wrap: break-word; /* For older browsers */
|
||||
max-width: 100%; /* Ensures it doesn't exceed the container width */
|
||||
border: 1px solid #ccc; /* Optional: Add a border for visibility */
|
||||
}
|
||||
#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">v2.0.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">🕵️♂️ = Mediaflowproxy might be needed</p>
|
||||
<h3 class="gives">Select Providers:</h3>
|
||||
<form class="pure-form" id="provider-form">
|
||||
<div class="provider-group">
|
||||
<label for="streamingwatch" class="provider-label">
|
||||
<input type="checkbox" id="streamingwatch"> StreamingWatch
|
||||
</label>
|
||||
</div>
|
||||
<div class="provider-group">
|
||||
<label for="guardoserie" class="provider-label">
|
||||
<input type="checkbox" id="guardoserie"> Guardoserie
|
||||
</label>
|
||||
</div>
|
||||
<div class="provider-group">
|
||||
<label for="guardaflix" class="provider-label">
|
||||
<input type="checkbox" id="guardaflix"> Guardaflix
|
||||
</label>
|
||||
</div>
|
||||
<div class="provider-group">
|
||||
<label for="animeworld" class="provider-label">
|
||||
<input type="checkbox" id="animeworld"> Animeworld
|
||||
</label>
|
||||
</div>
|
||||
<div class="provider-group">
|
||||
<label for="guardaserie" class="provider-label">
|
||||
<input type="checkbox" id="guardaserie"> Guardaserie
|
||||
</label>
|
||||
</div>
|
||||
<div class="provider-group">
|
||||
<label for="guardahd" class="provider-label">
|
||||
<input type="checkbox" id="guardahd"> GuardaHD
|
||||
</label>
|
||||
</div>
|
||||
<div>
|
||||
</div>
|
||||
<div class="provider-group">
|
||||
<label for="cb01" class="provider-label">
|
||||
<input type="checkbox" id="cb01"> CB01 🕵️♂️
|
||||
</label>
|
||||
</div>
|
||||
<div class="provider-group">
|
||||
<label for="streamingcommunity" class="provider-label">
|
||||
<input type="checkbox" id="streamingcommunity"> StreamingCommunity 🕵️♂️
|
||||
</label>
|
||||
</div>
|
||||
<div class="provider-group">
|
||||
<label for="eurostreaming" class="provider-label">
|
||||
<input type="checkbox" id="eurostreaming"> Eurostreaming 🕵️♂️
|
||||
</label>
|
||||
</div>
|
||||
<div class="provider-group">
|
||||
<label for="livetv" class="provider-label">
|
||||
<input type="checkbox" id="livetv"> LiveTV
|
||||
</label>
|
||||
</div>
|
||||
<div class="provider-group">
|
||||
<label for="mediaflowproxy" class="provider-label">
|
||||
<input type="checkbox" id="mediaflowproxy"> MediaFlow Proxy
|
||||
</label>
|
||||
<button type="button" id="mediaFlowProxyButton">Insert Proxy Info</button>
|
||||
</div>
|
||||
<div id="mediaFlowProxyInputContainer" style="display: none;">
|
||||
<input type="text" id="mediaFlowProxyInput" placeholder="Proxy URL">
|
||||
</div>
|
||||
<div id="mediaFlowProxyPasswordContainer" style="display: none;">
|
||||
<input type="password" id="mediaFlowProxyPassword" placeholder="Insert Password">
|
||||
</div>
|
||||
</form>
|
||||
<button id="generateManifestButton">Generate Manifest</button>
|
||||
<div id="manifestBox"></div>
|
||||
<button id="installButton">Install in Stremio</button>
|
||||
</div>
|
||||
<script>
|
||||
// Toggle visibility of proxy input fields
|
||||
document.getElementById('mediaFlowProxyButton').addEventListener('click', function() {
|
||||
const inputContainer = document.getElementById('mediaFlowProxyInputContainer');
|
||||
const passwordInputContainer = document.getElementById('mediaFlowProxyPasswordContainer');
|
||||
inputContainer.style.display = inputContainer.style.display === 'none' ? 'block' : 'none';
|
||||
passwordInputContainer.style.display = passwordInputContainer.style.display === 'none' ? 'block' : 'none';
|
||||
});
|
||||
|
||||
// Function to generate the manifest URL
|
||||
function generateManifest() {
|
||||
let manifest = "|";
|
||||
const providers = {
|
||||
"streamingcommunity": "SC",
|
||||
"streamingwatch": "SW",
|
||||
"animeworld": "AW",
|
||||
"livetv": "LIVETV",
|
||||
"cb01": "CB",
|
||||
"guardaserie": "GS",
|
||||
"guardahd": "GHD",
|
||||
"guardoserie": "GO",
|
||||
"guardaflix": "GF",
|
||||
"eurostreaming": "ES",
|
||||
"mediaflowproxy": "MFP"
|
||||
};
|
||||
|
||||
// Loop through providers and add selected ones to the manifest
|
||||
for (const id in providers) {
|
||||
if (document.getElementById(id).checked) {
|
||||
if (id === "mediaflowproxy") {
|
||||
// Add proxy details if MFP is selected
|
||||
const proxyUrl = document.getElementById("mediaFlowProxyInput").value.trim();
|
||||
const proxyPassword = document.getElementById("mediaFlowProxyPassword").value.trim();
|
||||
if (proxyUrl && proxyPassword) {
|
||||
manifest += `MFP[${proxyUrl},${proxyPassword}]|`;
|
||||
} else {
|
||||
manifest += providers[id] + "|"; // Fallback to just "MFP" if no details provided
|
||||
}
|
||||
} else {
|
||||
manifest += providers[id] + "|";
|
||||
}
|
||||
}
|
||||
}
|
||||
const encodedProviders = btoa(manifest);
|
||||
const instanceUrl = "{instance_url}"; // Replace with your instance URL
|
||||
const manifestUrl = instanceUrl + "/" + encodedProviders + "/" + "manifest.json";
|
||||
return manifestUrl;
|
||||
}
|
||||
|
||||
// Generate manifest URL and display it
|
||||
document.getElementById('generateManifestButton').addEventListener('click', function() {
|
||||
const manifestUrl = generateManifest();
|
||||
const manifestBox = document.getElementById("manifestBox");
|
||||
manifestBox.style.display = "block";
|
||||
manifestBox.innerText = manifestUrl;
|
||||
});
|
||||
|
||||
// Install the manifest in Stremio
|
||||
document.getElementById('installButton').addEventListener('click', function() {
|
||||
let manifestUrl = generateManifest();
|
||||
manifestUrl = manifestUrl.replace("http://", "");
|
||||
manifestUrl = manifestUrl.replace("https://", "");
|
||||
const stremioUrl = "stremio://" + manifestUrl;
|
||||
window.location.href = stremioUrl;
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
"""
|
||||
+99
-51
@@ -20,7 +20,7 @@ HTML = """
|
||||
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: url('https://i.postimg.cc/ry3p76HY/italian-seamless-free-vector-pattern3.png') center center repeat;
|
||||
background-size: cover;
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
@@ -85,16 +85,6 @@ HTML = """
|
||||
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;
|
||||
@@ -146,9 +136,13 @@ HTML = """
|
||||
padding: 2vh;
|
||||
background: rgba(255, 255, 255, 0.2);
|
||||
border-radius: 5px;
|
||||
display: none;
|
||||
display: none; /* Initially hidden */
|
||||
text-align: left;
|
||||
white-space: pre-wrap;
|
||||
white-space: pre-wrap; /* Preserves whitespace and wraps text */
|
||||
overflow-wrap: break-word; /* Breaks long words to prevent overflow */
|
||||
word-wrap: break-word; /* For older browsers */
|
||||
max-width: 100%; /* Ensures it doesn't exceed the container width */
|
||||
border: 1px solid #ccc; /* Optional: Add a border for visibility */
|
||||
}
|
||||
#generateManifestButton {
|
||||
background: #4CAF50;
|
||||
@@ -180,46 +174,26 @@ HTML = """
|
||||
<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>
|
||||
<h2 class="version">v2.0.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>
|
||||
<p class="description">🕵️♂️ = Mediaflowproxy might be needed</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 for="guardoserie" class="provider-label">
|
||||
<input type="checkbox" id="guardoserie"> Guardoserie
|
||||
</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 for="guardaflix" class="provider-label">
|
||||
<input type="checkbox" id="guardaflix"> Guardaflix
|
||||
</label>
|
||||
</div>
|
||||
<div class="provider-group">
|
||||
@@ -227,39 +201,113 @@ HTML = """
|
||||
<input type="checkbox" id="animeworld"> Animeworld
|
||||
</label>
|
||||
</div>
|
||||
<div class="provider-group">
|
||||
<label for="guardaserie" class="provider-label">
|
||||
<input type="checkbox" id="guardaserie"> Guardaserie
|
||||
</label>
|
||||
</div>
|
||||
<div class="provider-group">
|
||||
<label for="guardahd" class="provider-label">
|
||||
<input type="checkbox" id="guardahd"> GuardaHD
|
||||
</label>
|
||||
</div>
|
||||
<div>
|
||||
</div>
|
||||
<div class="provider-group">
|
||||
<label for="cb01" class="provider-label">
|
||||
<input type="checkbox" id="cb01"> CB01 🕵️♂️
|
||||
</label>
|
||||
</div>
|
||||
<div class="provider-group">
|
||||
<label for="streamingcommunity" class="provider-label">
|
||||
<input type="checkbox" id="streamingcommunity"> StreamingCommunity 🕵️♂️
|
||||
</label>
|
||||
</div>
|
||||
<div class="provider-group">
|
||||
<label for="eurostreaming" class="provider-label">
|
||||
<input type="checkbox" id="eurostreaming"> Eurostreaming 🕵️♂️
|
||||
</label>
|
||||
</div>
|
||||
<div class="provider-group">
|
||||
<label for="livetv" class="provider-label">
|
||||
<input type="checkbox" id="livetv"> LiveTV
|
||||
</label>
|
||||
</div>
|
||||
<div class="provider-group">
|
||||
<label for="mediaflowproxy" class="provider-label">
|
||||
<input type="checkbox" id="mediaflowproxy"> MediaFlow Proxy
|
||||
</label>
|
||||
<button type="button" id="mediaFlowProxyButton">Insert Proxy Info</button>
|
||||
</div>
|
||||
<div id="mediaFlowProxyInputContainer" style="display: none;">
|
||||
<input type="text" id="mediaFlowProxyInput" placeholder="Proxy URL">
|
||||
</div>
|
||||
<div id="mediaFlowProxyPasswordContainer" style="display: none;">
|
||||
<input type="password" id="mediaFlowProxyPassword" placeholder="Insert Password">
|
||||
</div>
|
||||
</form>
|
||||
<button id="generateManifestButton">Generate Link</button>
|
||||
<button id="installButton">INSTALL</button>
|
||||
<button id="generateManifestButton">Generate Manifest</button>
|
||||
<div id="manifestBox"></div>
|
||||
<button id="installButton">Install in Stremio</button>
|
||||
</div>
|
||||
<script>
|
||||
// Toggle visibility of proxy input fields
|
||||
document.getElementById('mediaFlowProxyButton').addEventListener('click', function() {
|
||||
const inputContainer = document.getElementById('mediaFlowProxyInputContainer');
|
||||
const passwordInputContainer = document.getElementById('mediaFlowProxyPasswordContainer');
|
||||
inputContainer.style.display = inputContainer.style.display === 'none' ? 'block' : 'none';
|
||||
passwordInputContainer.style.display = passwordInputContainer.style.display === 'none' ? 'block' : 'none';
|
||||
});
|
||||
|
||||
// Function to generate the manifest URL
|
||||
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"
|
||||
"animeworld": "AW",
|
||||
"livetv": "LIVETV",
|
||||
"cb01": "CB",
|
||||
"guardaserie": "GS",
|
||||
"guardahd": "GHD",
|
||||
"guardoserie": "GO",
|
||||
"guardaflix": "GF",
|
||||
"eurostreaming": "ES",
|
||||
"mediaflowproxy": "MFP"
|
||||
};
|
||||
|
||||
// Loop through providers and add selected ones to the manifest
|
||||
for (const id in providers) {
|
||||
if (document.getElementById(id).checked) {
|
||||
if (id === "mediaflowproxy") {
|
||||
// Add proxy details if MFP is selected
|
||||
const proxyUrl = document.getElementById("mediaFlowProxyInput").value.trim();
|
||||
const proxyPassword = document.getElementById("mediaFlowProxyPassword").value.trim();
|
||||
if (proxyUrl && proxyPassword) {
|
||||
manifest += `MFP[${proxyUrl},${proxyPassword}]|`;
|
||||
} else {
|
||||
manifest += providers[id] + "|"; // Fallback to just "MFP" if no details provided
|
||||
}
|
||||
} else {
|
||||
manifest += providers[id] + "|";
|
||||
}
|
||||
}
|
||||
const instanceUrl = "{instance_url}"; // Keep http in the URL
|
||||
const manifestUrl = instanceUrl + "/" + manifest + "/" + "manifest.json";
|
||||
}
|
||||
const encodedProviders = btoa(manifest);
|
||||
const instanceUrl = "{instance_url}"; // Replace with your instance URL
|
||||
const manifestUrl = instanceUrl + "/" + encodedProviders + "/" + "manifest.json";
|
||||
return manifestUrl;
|
||||
}
|
||||
|
||||
// Generate manifest URL and display it
|
||||
document.getElementById('generateManifestButton').addEventListener('click', function() {
|
||||
const manifestUrl = generateManifest();
|
||||
document.getElementById("manifestBox").style.display = "block";
|
||||
document.getElementById("manifestBox").innerText = manifestUrl;
|
||||
const manifestBox = document.getElementById("manifestBox");
|
||||
manifestBox.style.display = "block";
|
||||
manifestBox.innerText = manifestUrl;
|
||||
});
|
||||
|
||||
// Install the manifest in Stremio
|
||||
document.getElementById('installButton').addEventListener('click', function() {
|
||||
let manifestUrl = generateManifest();
|
||||
manifestUrl = manifestUrl.replace("http://", "");
|
||||
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"devCommand": "uvicorn run:app --host 0.0.0.0 --port 8080",
|
||||
"builds": [
|
||||
{
|
||||
"src": "run.py",
|
||||
"use": "@vercel/python"
|
||||
}
|
||||
],
|
||||
"routes": [
|
||||
{
|
||||
"src": "/(.*)",
|
||||
"dest": "run.py"
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user