Fix for WebRU
This commit is contained in:
@@ -16,6 +16,7 @@ async def okru_get_url(id,client):
|
|||||||
metadata = json.loads(data['flashvars']['metadata'])
|
metadata = json.loads(data['flashvars']['metadata'])
|
||||||
m3u8_link = metadata['hlsMasterPlaylistUrl']
|
m3u8_link = metadata['hlsMasterPlaylistUrl']
|
||||||
print("MammaMia: Found results for Okru")
|
print("MammaMia: Found results for Okru")
|
||||||
|
print(m3u8_link)
|
||||||
return m3u8_link
|
return m3u8_link
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print("MammaMia: No results found for Okru")
|
print("MammaMia: No results found for Okru")
|
||||||
|
|||||||
+13
-4
@@ -52,16 +52,17 @@ async def webru(id,site,client):
|
|||||||
async def get_skystreaming(id,client):
|
async def get_skystreaming(id,client):
|
||||||
try:
|
try:
|
||||||
skystreaming_link = skystreaming[id]
|
skystreaming_link = skystreaming[id]
|
||||||
m3u8_urls = []
|
m3u8_urls = {}
|
||||||
if type(skystreaming_link) == list:
|
if type(skystreaming_link) == list:
|
||||||
|
|
||||||
for link in skystreaming_link:
|
for link in skystreaming_link:
|
||||||
m3u8_url,Host = await get_skystreaming_url(link,client)
|
m3u8_url,Host = await get_skystreaming_url(link,client)
|
||||||
m3u8_urls.append(m3u8_url)
|
m3u8_urls[m3u8_url] = Host
|
||||||
|
print(m3u8_urls)
|
||||||
else:
|
else:
|
||||||
m3u8_url,Host = await get_skystreaming_url(skystreaming_link,client)
|
m3u8_url,Host = await get_skystreaming_url(skystreaming_link,client)
|
||||||
m3u8_urls.append(m3u8_url)
|
m3u8_urls[m3u8_url] = Host
|
||||||
return m3u8_urls,Host
|
return m3u8_urls
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print("SkyStreaming failed",e)
|
print("SkyStreaming failed",e)
|
||||||
@@ -72,6 +73,11 @@ async def get_skystreaming(id,client):
|
|||||||
|
|
||||||
|
|
||||||
async def get_skystreaming_url(skystreaming_link,client):
|
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")
|
response = await client.get(skystreaming_link, headers=headers, allow_redirects=True, impersonate = "chrome120")
|
||||||
soup = BeautifulSoup(response.text, 'lxml', parse_only=SoupStrainer('source'))
|
soup = BeautifulSoup(response.text, 'lxml', parse_only=SoupStrainer('source'))
|
||||||
source_tag = soup.find('source')
|
source_tag = soup.find('source')
|
||||||
@@ -79,3 +85,6 @@ async def get_skystreaming_url(skystreaming_link,client):
|
|||||||
Host = m3u8_url.replace("https://","").split("/")[0]
|
Host = m3u8_url.replace("https://","").split("/")[0]
|
||||||
print(Host)
|
print(Host)
|
||||||
return m3u8_url,Host
|
return m3u8_url,Host
|
||||||
|
except Exception as e:
|
||||||
|
print("SkyStreaming failed",e)
|
||||||
|
return None,None
|
||||||
@@ -575,7 +575,7 @@ STREAM = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "sportitalia",
|
"id": "sportitalia",
|
||||||
"title": ["Sportitalia"],
|
"title": "Sportitalia",
|
||||||
"name": "",
|
"name": "",
|
||||||
"genres": ["Sportitalia"],
|
"genres": ["Sportitalia"],
|
||||||
"poster": "https://upload.wikimedia.org/wikipedia/en/5/55/Sportitalia.jpg",
|
"poster": "https://upload.wikimedia.org/wikipedia/en/5/55/Sportitalia.jpg",
|
||||||
@@ -860,7 +860,8 @@ skystreaming ={
|
|||||||
"sky-sport-golf": "https://skystreaming.guru/embed/s9L5f",
|
"sky-sport-golf": "https://skystreaming.guru/embed/s9L5f",
|
||||||
"eurosport-1": "https://skystreaming.guru/embed/Vyv99",
|
"eurosport-1": "https://skystreaming.guru/embed/Vyv99",
|
||||||
"eurosport-2": "https://skystreaming.guru/embed/um8E5",
|
"eurosport-2": "https://skystreaming.guru/embed/um8E5",
|
||||||
"dazn-zona-a": ["https://skystreaming.guru/embed/tIswJ","https://skystreaming.guru/embed/16U0s"],
|
"dazn-zona-a": ["https://skystreaming.guru/embed/tIswJ","https://hls.cls.autos/hls/serie/index.m3u8"],
|
||||||
|
"sportitalia": "https://skystreaming.guru/embed/zA9LP",
|
||||||
}
|
}
|
||||||
huhu = {
|
huhu = {
|
||||||
"canale-5": "1101559666",
|
"canale-5": "1101559666",
|
||||||
|
|||||||
+2
-2
@@ -23,10 +23,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"General":{
|
"General":{
|
||||||
"load_env": "1",
|
"load_env": "0",
|
||||||
"HOST": "0.0.0.0",
|
"HOST": "0.0.0.0",
|
||||||
"PORT": "8080",
|
"PORT": "8080",
|
||||||
"HF": "0",
|
"HF": "1",
|
||||||
"Public_Instance": "0",
|
"Public_Instance": "0",
|
||||||
"MediaProxy": ["test"]
|
"MediaProxy": ["test"]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -194,9 +194,11 @@ async def addon_stream(request: Request,config, type, id,):
|
|||||||
streams['streams'].append({'title':f"{HF}Server {i} " + channel['title'],'url': item})
|
streams['streams'].append({'title':f"{HF}Server {i} " + channel['title'],'url': item})
|
||||||
if id in skystreaming:
|
if id in skystreaming:
|
||||||
|
|
||||||
urls,Host = await get_skystreaming(id,client)
|
urls = await get_skystreaming(id,client)
|
||||||
for url in urls:
|
for url in urls:
|
||||||
i = i+1
|
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}}}})
|
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:
|
if id in webru_vary:
|
||||||
|
|||||||
Reference in New Issue
Block a user