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",
|
||||
|
||||
Reference in New Issue
Block a user