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'])
|
||||
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")
|
||||
|
||||
+20
-11
@@ -52,16 +52,17 @@ async def webru(id,site,client):
|
||||
async def get_skystreaming(id,client):
|
||||
try:
|
||||
skystreaming_link = skystreaming[id]
|
||||
m3u8_urls = []
|
||||
m3u8_urls = {}
|
||||
if type(skystreaming_link) == list:
|
||||
|
||||
for link in skystreaming_link:
|
||||
m3u8_url,Host = await get_skystreaming_url(link,client)
|
||||
m3u8_urls.append(m3u8_url)
|
||||
m3u8_urls[m3u8_url] = Host
|
||||
print(m3u8_urls)
|
||||
else:
|
||||
m3u8_url,Host = await get_skystreaming_url(skystreaming_link,client)
|
||||
m3u8_urls.append(m3u8_url)
|
||||
return m3u8_urls,Host
|
||||
m3u8_urls[m3u8_url] = Host
|
||||
return m3u8_urls
|
||||
|
||||
except Exception as e:
|
||||
print("SkyStreaming failed",e)
|
||||
@@ -72,10 +73,18 @@ async def get_skystreaming(id,client):
|
||||
|
||||
|
||||
async def get_skystreaming_url(skystreaming_link,client):
|
||||
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
|
||||
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
|
||||
@@ -575,7 +575,7 @@ STREAM = {
|
||||
},
|
||||
{
|
||||
"id": "sportitalia",
|
||||
"title": ["Sportitalia"],
|
||||
"title": "Sportitalia",
|
||||
"name": "",
|
||||
"genres": ["Sportitalia"],
|
||||
"poster": "https://upload.wikimedia.org/wikipedia/en/5/55/Sportitalia.jpg",
|
||||
@@ -860,7 +860,8 @@ skystreaming ={
|
||||
"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://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 = {
|
||||
"canale-5": "1101559666",
|
||||
|
||||
+2
-2
@@ -23,10 +23,10 @@
|
||||
}
|
||||
},
|
||||
"General":{
|
||||
"load_env": "1",
|
||||
"load_env": "0",
|
||||
"HOST": "0.0.0.0",
|
||||
"PORT": "8080",
|
||||
"HF": "0",
|
||||
"HF": "1",
|
||||
"Public_Instance": "0",
|
||||
"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})
|
||||
if id in skystreaming:
|
||||
|
||||
urls,Host = await get_skystreaming(id,client)
|
||||
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:
|
||||
|
||||
Reference in New Issue
Block a user