Test for faster streams
This commit is contained in:
+3
-1
@@ -55,4 +55,6 @@ async def get_skystreaming(id,client):
|
||||
soup = BeautifulSoup(response.text, 'lxml', parse_only=SoupStrainer('source'))
|
||||
source_tag = soup.find('source')
|
||||
m3u8_url = source_tag.get('src')
|
||||
return m3u8_url
|
||||
Host = m3u8_url.replace("https://","").split("/")[0]
|
||||
print(Host)
|
||||
return m3u8_url,Host
|
||||
@@ -194,8 +194,8 @@ async def addon_stream(request: Request,config, type, id,):
|
||||
streams['streams'].append({'title':f"{HF}Server {i} " + channel['title'],'url': item})
|
||||
if id in skystreaming:
|
||||
i = i+1
|
||||
url = await get_skystreaming(id,client)
|
||||
streams['streams'].append({'title': f'{HF}Server {i}', 'url': url, "behaviorHints": {"notWebReady": True, "proxyHeaders": {"request": {"User-Agent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:127.0) Gecko/20100101 Firefox/127.0", "Accept": "*/*", "Accept-Language": "en-US,en;q=0.5", "Origin": "https://skystreaming.guru", "DNT": "1", "Sec-GPC": "1", "Connection": "keep-alive", "Referer": "https://skystreaming.guru/", "Sec-Fetch-Dest": "empty", "Sec-Fetch-Mode": "cors", "Sec-Fetch-Site": "cross-site", "Pragma": "no-cache", "Cache-Control": "no-cache", "TE": "trailers"}}}})
|
||||
url,Host = await get_skystreaming(id,client)
|
||||
streams['streams'].append({'title': f'{HF}Server {i}', 'url': url, "behaviorHints": {"notWebReady": True, "proxyHeaders": {"request": {"User-Agent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:127.0) Gecko/20100101 Firefox/127.0", "Accept": "*/*", "Accept-Language": "en-US,en;q=0.5", "Origin": "https://skystreaming.guru", "DNT": "1", "Sec-GPC": "1", "Connection": "keep-alive", "Referer": "https://skystreaming.guru/", "Sec-Fetch-Dest": "empty", "Sec-Fetch-Mode": "cors", "Sec-Fetch-Site": "cross-site", "Pragma": "no-cache", "Cache-Control": "no-cache", "TE": "trailers","Host": Host}}}})
|
||||
|
||||
if id in webru_vary:
|
||||
i = i+1
|
||||
|
||||
Reference in New Issue
Block a user