mirror of
https://github.com/UrloMythus/UnHided.git
synced 2026-04-11 11:50:51 +00:00
HF fixed
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
import re
|
||||
import string
|
||||
from typing import Dict, Any
|
||||
|
||||
from mediaflow_proxy.extractors.base import BaseExtractor, ExtractorError
|
||||
from mediaflow_proxy.utils.packed import eval_solver
|
||||
|
||||
|
||||
class MixdropExtractor(BaseExtractor):
|
||||
@@ -12,23 +11,10 @@ class MixdropExtractor(BaseExtractor):
|
||||
"""Extract Mixdrop URL."""
|
||||
if "club" in url:
|
||||
url = url.replace("club", "ps").split("/2")[0]
|
||||
response = await self._make_request(url, headers={"accept-language": "en-US,en;q=0.5"})
|
||||
|
||||
# Extract and decode URL
|
||||
match = re.search(r"}\('(.+)',.+,'(.+)'\.split", response.text)
|
||||
if not match:
|
||||
raise ExtractorError("Failed to extract URL components")
|
||||
headers = {"accept-language": "en-US,en;q=0.5"}
|
||||
|
||||
s1, s2 = match.group(1, 2)
|
||||
schema = s1.split(";")[2][5:-1]
|
||||
terms = s2.split("|")
|
||||
|
||||
# Build character mapping
|
||||
charset = string.digits + string.ascii_letters
|
||||
char_map = {charset[i]: terms[i] or charset[i] for i in range(len(terms))}
|
||||
|
||||
# Construct final URL
|
||||
final_url = "https:" + "".join(char_map.get(c, c) for c in schema)
|
||||
final_url = f"https:{await eval_solver(self, url, headers, r'MDCore.wurl ?= ?"(.*?)"')}"
|
||||
|
||||
self.base_headers["referer"] = url
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user