Fixed Sports

This commit is contained in:
UrloMythus
2024-09-19 19:04:26 +02:00 Unverified
parent 5350721e9a
commit 5f53c9ec82
2 changed files with 5 additions and 8 deletions
+3 -6
View File
@@ -42,7 +42,6 @@ async def webru(id,site,client):
mediaproxy = config.MediaProxy
medialink = random.choice(mediaproxy)
new_stream_url = f'{medialink}proxy/hls?key_url=https%3A%2F%2Fkey.mizhls.ru%2F&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'
print(new_stream_url)
return new_stream_url
except Exception as e:
print("WebRu failed",e)
@@ -54,8 +53,6 @@ async def get_skystreaming(id,client):
skystreaming_link = skystreaming[id]
response = await client.get(skystreaming_link, headers=headers, allow_redirects=True, impersonate = "chrome120")
soup = BeautifulSoup(response.text, 'lxml', parse_only=SoupStrainer('source'))
m3u8_url = soup.get('src')
start = m3u8_url.find('//') + 2
end = m3u8_url.find('/', start)
Host = m3u8_url[start:end]
return m3u8_url,Host
source_tag = soup.find('source')
m3u8_url = source_tag.get('src')
return m3u8_url