mirror of
https://github.com/UrloMythus/UnHided.git
synced 2026-04-11 03:40:54 +00:00
HF fixed
This commit is contained in:
@@ -142,15 +142,15 @@ class UnpackingError(Exception):
|
||||
|
||||
|
||||
|
||||
async def eval_solver(self, url: str, headers):
|
||||
async def eval_solver(self, url: str, headers, pattern: str) -> str:
|
||||
try:
|
||||
response = await self._make_request(url, headers = headers)
|
||||
response = await self._make_request(url, headers=headers)
|
||||
soup = BeautifulSoup(response.text, "lxml",parse_only=SoupStrainer("script"))
|
||||
script_all = soup.find_all("script")
|
||||
for i in script_all:
|
||||
if detect(i.text):
|
||||
unpacked_code = unpack(i.text)
|
||||
match = re.search( r'file:"(.*?)"', unpacked_code)
|
||||
match = re.search(pattern, unpacked_code)
|
||||
if match:
|
||||
m3u8_url = match.group(1)
|
||||
return m3u8_url
|
||||
|
||||
Reference in New Issue
Block a user