Modified Config.json, now it uses full url instead of domains
This commit is contained in:
@@ -59,7 +59,7 @@ async def get_mp4(anime_url,ismovie,episode,client):
|
||||
cookies = {}
|
||||
if ForwardProxy != "":
|
||||
response = await client.get(ForwardProxy + anime_url,allow_redirects=True,impersonate = "chrome124",proxies=proxies)
|
||||
anime_url = f'https://animeworld.{AW_DOMAIN}/{response.url.replace(ForwardProxy,"")}?d=1'
|
||||
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)
|
||||
@@ -70,7 +70,7 @@ async def get_mp4(anime_url,ismovie,episode,client):
|
||||
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"]}'
|
||||
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)
|
||||
@@ -90,7 +90,7 @@ async def get_mp4(anime_url,ismovie,episode,client):
|
||||
async def search(showname,date,ismovie,episode,client):
|
||||
search_year = date[:4]
|
||||
headers = random_headers.generate()
|
||||
link = f'https://www.animeworld.so/filter?year={search_year}&sort=2&keyword={showname}'
|
||||
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)
|
||||
@@ -101,7 +101,7 @@ async def search(showname,date,ismovie,episode,client):
|
||||
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"]}'
|
||||
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)
|
||||
@@ -117,7 +117,7 @@ async def search(showname,date,ismovie,episode,client):
|
||||
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'https://www.animeworld.{AW_DOMAIN}{anime["href"]}'
|
||||
anime_url = f'{AW_DOMAIN}{anime["href"]}'
|
||||
final_url = await get_mp4(anime_url,ismovie,episode,client)
|
||||
if final_url:
|
||||
final_urls.append(final_url)
|
||||
|
||||
+20
-11
@@ -140,8 +140,8 @@ async def search_movie(showname,date,client):
|
||||
try:
|
||||
showname = showname.replace(" ","+").replace("ò","o").replace("è","e").replace("à","a").replace("ù","u").replace("ì","i")
|
||||
headers = fake_headers.generate()
|
||||
headers['Referer'] = f'https://cb01new.{CB_DOMAIN}/'
|
||||
query = f'https://cb01new.{CB_DOMAIN}/?s={showname}'
|
||||
headers['Referer'] = f'{CB_DOMAIN}/'
|
||||
query = f'{CB_DOMAIN}/?s={showname}'
|
||||
response = await client.get(ForwardProxy + query,headers=headers, impersonate = "chrome124", proxies = proxies)
|
||||
if response.status_code != 200:
|
||||
print(f"CB01 Failed to fetch search results: {response.status_code}")
|
||||
@@ -169,8 +169,8 @@ async def search_series(showname,date,client):
|
||||
try:
|
||||
showname = showname.replace(" ","+")
|
||||
headers = fake_headers.generate()
|
||||
headers['Referer'] = f'https://cb01new.{CB_DOMAIN}/serietv/'
|
||||
query = f'https://cb01new.{CB_DOMAIN}/serietv/?s={showname}'
|
||||
headers['Referer'] = f'{CB_DOMAIN}/serietv/'
|
||||
query = f'{CB_DOMAIN}/serietv/?s={showname}'
|
||||
response = await client.get(ForwardProxy + query,headers=headers,impersonate = "chrome124", proxies = proxies)
|
||||
if response.status_code != 200:
|
||||
print(f"CB01 Failed to fetch search results: {response.status_code}")
|
||||
@@ -201,15 +201,24 @@ async def movie_redirect_url(link,client,MFP):
|
||||
# Extract the redirect URL from the HTML
|
||||
soup = BeautifulSoup(response.text, "lxml",parse_only=SoupStrainer('div'))
|
||||
redirect_url = soup.find("div", id="iframen2").get("data-src")
|
||||
try:
|
||||
if "stayonline" in redirect_url:
|
||||
mixdrop_real_link = await get_stayonline(redirect_url,client)
|
||||
final_url = await get_true_link_mixdrop(mixdrop_real_link,client,MFP)
|
||||
print(redirect_url)
|
||||
if "stayonline" in redirect_url:
|
||||
mixdrop_real_link = await get_stayonline(redirect_url,client)
|
||||
final_url = await get_true_link_mixdrop(mixdrop_real_link,client,MFP)
|
||||
if final_url != None:
|
||||
return final_url
|
||||
except Exception as e:
|
||||
else:
|
||||
redirect_url = soup.find("div", id="iframen1").get("data-src")
|
||||
if "stayonline" in redirect_url:
|
||||
redirect_url =await get_stayonline(redirect_url,client)
|
||||
maxstream_real_link = await get_uprot(redirect_url,client)
|
||||
final_url = await get_true_link_maxstream(maxstream_real_link,client)
|
||||
return(final_url)
|
||||
|
||||
else:
|
||||
redirect_url = soup.find("div", id="iframen1").get("data-src")
|
||||
if "stayonline" in redirect_url:
|
||||
redirect_url =await get_stayonline(redirect_url,client)
|
||||
redirect_url =await get_stayonline(redirect_url,client)
|
||||
maxstream_real_link = await get_uprot(redirect_url,client)
|
||||
final_url = await get_true_link_maxstream(maxstream_real_link,client)
|
||||
return(final_url)
|
||||
@@ -316,7 +325,7 @@ async def test_animeworld():
|
||||
async with AsyncSession() as client:
|
||||
# Replace with actual id, for example 'anime_id:episode' format
|
||||
test_id = "tt0045247" # This is an example ID format
|
||||
MFP = "1"
|
||||
MFP = "0"
|
||||
results = await cb01(test_id, client,MFP)
|
||||
print(results)
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ cookies = {
|
||||
|
||||
async def search_series(client,id,season,episode,showname):
|
||||
showname = showname.replace(" ", "%20").replace("–", "+").replace("—","+")
|
||||
response = await client.get(f"https://ddlstreamitaly.{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")
|
||||
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")
|
||||
soup = BeautifulSoup(response.text, 'lxml',parse_only=SoupStrainer('a'))
|
||||
a_tags = soup.find_all('a', {'data-linktype': 'link'})
|
||||
for a in a_tags:
|
||||
@@ -77,7 +77,7 @@ async def get_episode(client,link,episode):
|
||||
async def search_movie(client,showname,id):
|
||||
showname = showname.replace("–", "+").replace("—","+")
|
||||
showname = urllib.parse.quote(showname)
|
||||
link = f"https://ddlstreamitaly.{DDL_DOMAIN}/search/?&q={showname}%20Streaming&quick=1&nodes=11&search_and_or=and&search_in=titles&sortby=relevancy"
|
||||
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'})
|
||||
|
||||
@@ -46,6 +46,7 @@ async def search(query,imdb_id,client,season,ismovie):
|
||||
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
|
||||
@@ -80,6 +81,7 @@ def get_film(url):
|
||||
|
||||
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'))
|
||||
@@ -134,7 +136,7 @@ async def filmpertutti(imdb,client,MFP):
|
||||
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'
|
||||
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:
|
||||
@@ -183,7 +185,7 @@ async def test_animeworld():
|
||||
async with AsyncSession() as client:
|
||||
MFP = "1"
|
||||
# Replace with actual id, for example 'anime_id:episode' format
|
||||
test_id = "tt0413573:19:1" # This is an example ID format
|
||||
test_id = "tt1190634:1:1" # This is an example ID format
|
||||
results = await filmpertutti(test_id, client,MFP)
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
+1
-1
@@ -64,7 +64,7 @@ async def get_supervideo_link(link,client):
|
||||
|
||||
async def search(clean_id,client):
|
||||
headers = random_headers.generate()
|
||||
response = await client.get(ForwardProxy + f"https://mostraguarda.{GHD_DOMAIN}/set-movie-a/{clean_id}", allow_redirects=True, impersonate = "chrome124", headers = headers, proxies = proxies)
|
||||
response = await client.get(ForwardProxy + f"{GHD_DOMAIN}/set-movie-a/{clean_id}", allow_redirects=True, impersonate = "chrome124", headers = headers, proxies = proxies)
|
||||
if response.status_code != 200:
|
||||
print(f"GuardaHD Failed to fetch search results: {response.status_code}")
|
||||
soup = BeautifulSoup(response.text,'lxml',parse_only=SoupStrainer('li'))
|
||||
|
||||
@@ -68,7 +68,7 @@ async def get_supervideo_link(link,client):
|
||||
async def search(clean_id,client):
|
||||
try:
|
||||
headers = random_headers.generate()
|
||||
response = await client.get(ForwardProxy + f'https://guardaserietv.{GS_DOMAIN}/?story={clean_id}&do=search&subaction=search', allow_redirects=True, impersonate = "chrome124", headers = headers, proxies = proxies)
|
||||
response = await client.get(ForwardProxy + f'{GS_DOMAIN}/?story={clean_id}&do=search&subaction=search', allow_redirects=True, impersonate = "chrome124", headers = headers, proxies = proxies)
|
||||
if response.status_code != 200:
|
||||
print(f"Guardaserie Failed to fetch search results: {response.status_code}")
|
||||
soup = BeautifulSoup(response.text,'lxml',parse_only=SoupStrainer('div',class_="mlnh-2"))
|
||||
@@ -87,7 +87,7 @@ async def player_url(page_url, season, episode,client):
|
||||
headers = random_headers.generate()
|
||||
if GS_ForwardProxy == "1":
|
||||
response = await client.get(ForwardProxy + page_url, allow_redirects=True, impersonate = "chrome124", headers = headers)
|
||||
page_url = response.url.replace(ForwardProxy,f'https://guardaserietv.{GS_DOMAIN}/')
|
||||
page_url = response.url.replace(ForwardProxy,f'{GS_DOMAIN}/')
|
||||
response = await client.get(ForwardProxy + page_url, allow_redirects=True, impersonate = "chrome124", headers = headers, proxies = proxies)
|
||||
soup = BeautifulSoup(response.text,'lxml',parse_only=SoupStrainer('a'))
|
||||
a_tag = soup.find('a', id = f"serie-{season}_{episode}")
|
||||
|
||||
@@ -16,7 +16,7 @@ async def search(showname,date,season,episode,ismovie,client):
|
||||
'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 = "chrome120")
|
||||
data = json.loads(response.text)
|
||||
for entry in data['data']:
|
||||
if entry is not None: # check if the a_tag exists
|
||||
href = entry['url']
|
||||
quality = entry['qualit\u00e0_video']
|
||||
link = f'https://lordchannel.{LC_DOMAIN}{href}'
|
||||
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)")
|
||||
|
||||
@@ -61,9 +61,9 @@ async def get_version(client):
|
||||
|
||||
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'
|
||||
random_headers['Referer'] = f"{SC_DOMAIN}/"
|
||||
random_headers['Origin'] = f"{SC_DOMAIN}"
|
||||
base_url = f'{SC_DOMAIN}/richiedi-un-titolo'
|
||||
response = await client.get(ForwardProxy + base_url, headers=random_headers, allow_redirects = True, impersonate="chrome124", proxies = proxies)
|
||||
#Soup the response
|
||||
soup = BeautifulSoup(response.text, "lxml")
|
||||
@@ -78,8 +78,8 @@ async def get_version(client):
|
||||
|
||||
async def search(query,date,ismovie, client,SC_FAST_SEARCH,movie_id):
|
||||
random_headers = headers.generate()
|
||||
random_headers['Referer'] = "https://streamingcommunity.buzz/"
|
||||
random_headers['Origin'] = "https://streamingcommunity.buzz"
|
||||
random_headers['Referer'] = f"{SC_DOMAIN}/"
|
||||
random_headers['Origin'] = f"{SC_DOMAIN}"
|
||||
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
|
||||
@@ -99,9 +99,9 @@ async def search(query,date,ismovie, client,SC_FAST_SEARCH,movie_id):
|
||||
#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 ( ForwardProxy + f'https://streamingcommunity.{SC_DOMAIN}/titles/{tid}-{slug}', headers = random_headers, allow_redirects=True,impersonate = "chrome124", proxies = proxies)
|
||||
random_headers['Referer'] = f"{SC_DOMAIN}/"
|
||||
random_headers['Origin'] = f"{SC_DOMAIN}"
|
||||
response = await client.get ( ForwardProxy + f'{SC_DOMAIN}/titles/{tid}-{slug}', headers = random_headers, allow_redirects=True,impersonate = "chrome124", proxies = proxies)
|
||||
soup = BeautifulSoup(response.text, "lxml")
|
||||
data = json.loads(soup.find("div", {"id": "app"}).get("data-page"))
|
||||
version = data['version']
|
||||
@@ -120,16 +120,16 @@ async def search(query,date,ismovie, client,SC_FAST_SEARCH,movie_id):
|
||||
|
||||
async def get_film(tid,version,client,MFP):
|
||||
random_headers = headers.generate()
|
||||
random_headers['Referer'] = "https://streamingcommunity.buzz/"
|
||||
random_headers['Origin'] = "https://streamingcommunity.buzz"
|
||||
random_headers['Referer'] = f"{SC_DOMAIN}/"
|
||||
random_headers['Origin'] = f"{SC_DOMAIN}"
|
||||
random_headers['x-inertia'] = "true"
|
||||
random_headers['x-inertia-version'] = version
|
||||
random_headers['User-Agent'] = User_Agent
|
||||
random_headers['user-agent'] = User_Agent
|
||||
#Access the iframe
|
||||
url = f'https://streamingcommunity.{SC_DOMAIN}/iframe/{tid}'
|
||||
url = f'{SC_DOMAIN}/iframe/{tid}'
|
||||
if MFP == "1":
|
||||
url = f'https://streamingcommunity.{SC_DOMAIN}/iframe/{tid}'
|
||||
url = f'{SC_DOMAIN}/iframe/{tid}'
|
||||
quality = "Unknown"
|
||||
return url,quality
|
||||
response = await client.get(ForwardProxy + url, headers=random_headers, allow_redirects=True,impersonate = "chrome124", proxies = proxies)
|
||||
@@ -141,8 +141,8 @@ async def get_film(tid,version,client,MFP):
|
||||
parsed_url = urlparse(iframe)
|
||||
query_params = parse_qs(parsed_url.query)
|
||||
random_headers = headers.generate()
|
||||
random_headers['Referer'] = f"https://streamingcommunity.{SC_DOMAIN}/"
|
||||
random_headers['Origin'] = f"https://streamingcommunity.{SC_DOMAIN}"
|
||||
random_headers['Referer'] = f"{SC_DOMAIN}/"
|
||||
random_headers['Origin'] = f"{SC_DOMAIN}"
|
||||
random_headers['x-inertia'] = "true"
|
||||
random_headers['x-inertia-version'] = version
|
||||
random_headers['User-Agent'] = User_Agent
|
||||
@@ -182,14 +182,14 @@ async def get_film(tid,version,client,MFP):
|
||||
|
||||
async def get_season_episode_id(tid,slug,season,episode,version,client):
|
||||
random_headers = headers.generate()
|
||||
random_headers['Referer'] = f"https://streamingcommunity.{SC_DOMAIN}/"
|
||||
random_headers['Origin'] = f"https://streamingcommunity.{SC_DOMAIN}"
|
||||
random_headers['Referer'] = f"{SC_DOMAIN}/"
|
||||
random_headers['Origin'] = f"{SC_DOMAIN}"
|
||||
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(ForwardProxy + f'https://streamingcommunity.{SC_DOMAIN}/titles/{tid}-{slug}/stagione-{season}', headers=random_headers, allow_redirects=True, impersonate = "chrome124", proxies = proxies)
|
||||
response = await client.get(ForwardProxy + f'{SC_DOMAIN}/titles/{tid}-{slug}/stagione-{season}', headers=random_headers, allow_redirects=True, impersonate = "chrome124", proxies = proxies)
|
||||
# Print the json got
|
||||
json_response = response.json().get('props', {}).get('loadedSeason', {}).get('episodes', [])
|
||||
for dict_episode in json_response:
|
||||
@@ -199,8 +199,8 @@ async def get_season_episode_id(tid,slug,season,episode,version,client):
|
||||
async def get_episode_link(episode_id,tid,version,client,MFP):
|
||||
#The parameters for the request
|
||||
random_headers = headers.generate()
|
||||
random_headers['Referer'] = f"https://streamingcommunity.{SC_DOMAIN}/"
|
||||
random_headers['Origin'] = f"https://streamingcommunity.{SC_DOMAIN}"
|
||||
random_headers['Referer'] = f"{SC_DOMAIN}/"
|
||||
random_headers['Origin'] = f"{SC_DOMAIN}"
|
||||
random_headers['User-Agent'] = User_Agent
|
||||
random_headers['user-agent'] = User_Agent
|
||||
params = {
|
||||
@@ -210,18 +210,18 @@ async def get_episode_link(episode_id,tid,version,client,MFP):
|
||||
#Let's try to get the link from iframe source
|
||||
# Make a request to get iframe source
|
||||
if MFP == "1":
|
||||
url = f'https://streamingcommunity.{SC_DOMAIN}/iframe/{tid}?episode_id={episode_id}&next_episode=1'
|
||||
url = f'{SC_DOMAIN}/iframe/{tid}?episode_id={episode_id}&next_episode=1'
|
||||
quality = "Unknown"
|
||||
return url,quality
|
||||
response = await client.get(ForwardProxy + f"https://streamingcommunity.{SC_DOMAIN}/iframe/{tid}", params=params, headers = random_headers, allow_redirects=True, impersonate = "chrome124", proxies = proxies)
|
||||
response = await client.get(ForwardProxy + f"{SC_DOMAIN}/iframe/{tid}", params=params, headers = random_headers, allow_redirects=True, impersonate = "chrome124", proxies = proxies)
|
||||
|
||||
# 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'] = f"https://streamingcommunity.{SC_DOMAIN}/"
|
||||
random_headers['Origin'] = f"https://streamingcommunity.{SC_DOMAIN}"
|
||||
random_headers['Referer'] = f"{SC_DOMAIN}/"
|
||||
random_headers['Origin'] = f"{SC_DOMAIN}"
|
||||
random_headers['x-inertia'] = "true"
|
||||
random_headers['x-inertia-version'] = version
|
||||
random_headers['User-Agent'] = User_Agent
|
||||
@@ -320,7 +320,7 @@ async def streaming_community(imdb,client,SC_FAST_SEARCH,MFP):
|
||||
|
||||
showname = showname.replace(" ", "+").replace("–", "+").replace("—","+")
|
||||
showname = urllib.parse.quote_plus(showname)
|
||||
query = f'https://streamingcommunity.{SC_DOMAIN}/api/search?q={showname}'
|
||||
query = f'{SC_DOMAIN}/api/search?q={showname}'
|
||||
tid,slug,version = await search(query,date,ismovie,client,SC_FAST_SEARCH,imdb_id)
|
||||
if ismovie == 1:
|
||||
#TID means temporaly ID
|
||||
|
||||
@@ -6,7 +6,7 @@ import re
|
||||
import json
|
||||
SW_DOMAIN = config.SW_DOMAIN
|
||||
async def wponce_get(client):
|
||||
response = await client.get(f"https://www.streamingwatch.{SW_DOMAIN}/contatto/")
|
||||
response = await client.get(f"{SW_DOMAIN}/contatto/")
|
||||
pattern = r'"admin_ajax_nonce":"(\w+)"'
|
||||
matches = re.findall(pattern, response.text)
|
||||
wponce = matches[1]
|
||||
@@ -15,15 +15,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"',
|
||||
@@ -58,10 +58,10 @@ 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(f'{SW_DOMAIN}/wp-json/wp/v2/categories?search={showname}&_fields=id', allow_redirects=True, impersonate = "chrome120")
|
||||
data = json.loads(id_response.text)
|
||||
category_id = data[0]['id']
|
||||
query = f'https://streamingwatch.{SW_DOMAIN}/wp-json/wp/v2/posts?categories={category_id}&per_page=100'
|
||||
query = f'{SW_DOMAIN}/wp-json/wp/v2/posts?categories={category_id}&per_page=100'
|
||||
response = await client.get(query, allow_redirects=True, impersonate = "chrome120")
|
||||
data_json = response.text
|
||||
data = json.loads(data_json)
|
||||
|
||||
@@ -17,7 +17,7 @@ TF_DOMAIN = config.TF_DOMAIN
|
||||
import urllib.parse
|
||||
async def search(showname,ismovie,date,client):
|
||||
showname = showname.replace(" ","+")
|
||||
url = f'https://www.tanti.bond/ajax/posts?q={showname}'
|
||||
url = f'{TF_DOMAIN}/ajax/posts?q={showname}'
|
||||
response = await client.get(url, allow_redirects=True)
|
||||
response = response.json()['data']
|
||||
if ismovie == 1:
|
||||
@@ -50,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:
|
||||
@@ -91,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")
|
||||
@@ -125,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")
|
||||
@@ -288,7 +288,7 @@ 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 = "tt9165438:9:1" # This is an example ID format
|
||||
test_id = "tt1839578:1:1" # This is an example ID format
|
||||
results = await tantifilm(test_id, client,"0")
|
||||
print(results)
|
||||
|
||||
|
||||
+6
-4
@@ -33,7 +33,7 @@ async def get_stream_link(id,site,client):
|
||||
try:
|
||||
if site == "dlhd":
|
||||
dlhd_id = webru_dlhd[id]
|
||||
response = await client.get(f"https://thedaddy.{DLHD_DOMAIN}/embed/stream-853.php", impersonate = "chrome124", headers = headers)
|
||||
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')
|
||||
@@ -57,7 +57,7 @@ async def get_stream_link(id,site,client):
|
||||
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")
|
||||
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)
|
||||
@@ -71,10 +71,13 @@ async def get_stream_link(id,site,client):
|
||||
stream_url = f"https://{server_key}new.iosplayer.ru/{server_key}/{vary_id}" + "/mono.m3u8"
|
||||
return stream_url,Referer,Origin
|
||||
except Exception as e:
|
||||
return None
|
||||
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)
|
||||
@@ -85,7 +88,6 @@ async def webru(id,site,client):
|
||||
async def get_skystreaming(id,client):
|
||||
try:
|
||||
skystreaming_link = skystreaming[id]
|
||||
m3u8_urls = {}
|
||||
if type(skystreaming_link) == list:
|
||||
|
||||
for link in skystreaming_link:
|
||||
|
||||
Reference in New Issue
Block a user