Fix for X server

This commit is contained in:
UrloMythus
2025-02-23 12:18:52 +01:00 Unverified
parent fc3e4ab89a
commit 726e443f4a
2 changed files with 12 additions and 3 deletions
+7 -1
View File
@@ -62,7 +62,13 @@ async def get_stream_link(id,site,client):
href = soup.find('a').get('href')
response = await client.get(href)
soup = BeautifulSoup(response.text, 'lxml', parse_only=SoupStrainer('button'))
webru_iframe = soup.find('button', {"data-type": "embed"}).get('data-url')
webru_iframe = soup.find_all('button', {"data-type": "embed"})
for i in webru_iframe:
webru_iframe = i.get('data-url')
if "php" not in webru_iframe:
continue
else:
break
webru_iframe = "https://" + webru_iframe.split("/")[2]
vary_id = webru_vary[id]
vary_link = f"{webru_iframe}/server_lookup.php?channel_id={vary_id}"