Added Support for DLHD channels without MFP

This commit is contained in:
UrloMythus
2025-02-16 21:25:20 +01:00 Unverified
parent 2a959da071
commit 9710a6f437
2 changed files with 14 additions and 11 deletions
+5 -8
View File
@@ -29,7 +29,7 @@ headers = {
"Cache-Control": "no-cache",
}
async def get_stream_link(id,site,MFP_CREDENTIALS,client):
async def get_stream_link(id,site,client):
try:
if site == "dlhd":
dlhd_id = webru_dlhd[id]
@@ -71,16 +71,13 @@ async def get_stream_link(id,site,MFP_CREDENTIALS,client):
else:
print("No .m3u8 URL found.")
stream_url = f"https://{domain}/lb/"+ webru_vary[id] + "/index.m3u8"
mfp_url = MFP_CREDENTIALS[0]
mfp_pass = MFP_CREDENTIALS[1]
new_stream_url = f'{mfp_url}/proxy/hls/manifest.m3u8?api_password={mfp_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'
return new_stream_url
return stream_url,Referer,Origin
except Exception as e:
return None
async def webru(id,site,client,MFP_CREDENTIALS):
async def webru(id,site,client):
try:
new_stream_url = await get_stream_link(id,site,MFP_CREDENTIALS,client)
return new_stream_url
new_stream_url,Referer,Origin = await get_stream_link(id,site,client)
return new_stream_url,Referer,Origin
except Exception as e:
print("WebRu failed",e)
return None