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