Update streamhg
This commit is contained in:
@@ -2,6 +2,7 @@ import Src.Utilities.config as config
|
||||
from Src.Utilities.eval import eval_solver
|
||||
import logging
|
||||
from Src.Utilities.config import setup_logging
|
||||
from Src.Utilities.mfp import build_mfp
|
||||
level = config.LEVEL
|
||||
logger = setup_logging(level)
|
||||
Icon = config.Icon
|
||||
@@ -10,8 +11,17 @@ Name = config.Name
|
||||
|
||||
|
||||
|
||||
async def streamhg(link,client,streams, site_name, proxies,ForwardProxy):
|
||||
async def streamhg(link,client,MFP,MFP_CREDENTIALS,streams, site_name, proxies,ForwardProxy):
|
||||
link = 'https://audinifer.com/e/' + link.split('/e/')[1]
|
||||
if MFP == '1':
|
||||
url = await build_mfp(MFP_CREDENTIALS,link,"StreamHG",client)
|
||||
logger.info(f"{site_name} on StreamHG found results for the current ID")
|
||||
if url:
|
||||
status = True
|
||||
streams['streams'].append({'name': f"{Name} 🕵️♂️",'title': f'{Icon}{site_name}\n▶️ StreamHG', 'url': url, 'behaviorHints':{'bingeGroup': f'{site_name.lower()}'}})
|
||||
else:
|
||||
status = False
|
||||
else:
|
||||
url = await eval_solver(link,proxies, ForwardProxy, client,r'"hls2":"([^"]+)"')
|
||||
if url:
|
||||
streams['streams'].append({'name': f"{Name}",'title': f'{Icon}{site_name}\n▶️ StreamHG', 'url': url, 'behaviorHints': {'bingeGroup': f'{site_name.lower()}'}})
|
||||
@@ -27,7 +37,7 @@ async def streamhg(link,client,streams, site_name, proxies,ForwardProxy):
|
||||
async def test_streamhg():
|
||||
from curl_cffi.requests import AsyncSession
|
||||
async with AsyncSession() as client:
|
||||
results = await streamhg("https://dhcplay.com/e/zctlgpn3zoll",client,{'streams': []}, "StreamHG", {},"")
|
||||
results = await streamhg("https://dhcplay.com/e/zctlgpn3zoll",client,"1",['',''],{'streams': []}, "StreamHG", {},"")
|
||||
print(results)
|
||||
if __name__ == "__main__":
|
||||
import asyncio
|
||||
|
||||
+1
-1
@@ -60,7 +60,7 @@ async def guardahd(streams,id,client,MFP,MFP_CREDENTIALS):
|
||||
results = await search(clean_id,client)
|
||||
status = False
|
||||
if 'streamhg' in results:
|
||||
streams,status = await streamhg(results['streamhg'], client,streams,"GuardaHD",proxies, ForwardProxy)
|
||||
streams,status = await streamhg(results['streamhg'], client,MFP,MFP_CREDENTIALS,streams,"GuardaHD",proxies, ForwardProxy)
|
||||
if 'mixdrop' in results and not status:
|
||||
streams,status = await mixdrop(results['mixdrop'],client,MFP,MFP_CREDENTIALS,streams,"GuardaHD",proxies,ForwardProxy,'')
|
||||
return streams
|
||||
|
||||
Reference in New Issue
Block a user