mirror of
https://github.com/UrloMythus/UnHided.git
synced 2026-06-10 09:10:23 +00:00
New Version
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -30,6 +30,7 @@ class BaseExtractor(ABC):
|
||||
try:
|
||||
async with create_httpx_client() as client:
|
||||
request_headers = self.base_headers
|
||||
print(request_headers)
|
||||
request_headers.update(headers or {})
|
||||
response = await client.request(
|
||||
method,
|
||||
|
||||
@@ -11,7 +11,7 @@ from mediaflow_proxy.extractors.streamtape import StreamtapeExtractor
|
||||
from mediaflow_proxy.extractors.supervideo import SupervideoExtractor
|
||||
from mediaflow_proxy.extractors.uqload import UqloadExtractor
|
||||
from mediaflow_proxy.extractors.vixcloud import VixCloudExtractor
|
||||
|
||||
from mediaflow_proxy.extractors.fastream import FastreamExtractor
|
||||
|
||||
class ExtractorFactory:
|
||||
"""Factory for creating URL extractors."""
|
||||
@@ -27,6 +27,7 @@ class ExtractorFactory:
|
||||
"Maxstream": MaxstreamExtractor,
|
||||
"LiveTV": LiveTVExtractor,
|
||||
"DLHD": DLHDExtractor,
|
||||
"Fastream": FastreamExtractor
|
||||
}
|
||||
|
||||
@classmethod
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
import re
|
||||
from typing import Dict, Any
|
||||
|
||||
from mediaflow_proxy.extractors.base import BaseExtractor
|
||||
from mediaflow_proxy.utils.packed import eval_solver
|
||||
|
||||
|
||||
|
||||
|
||||
class FastreamExtractor(BaseExtractor):
|
||||
"""Fastream URL extractor."""
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
self.mediaflow_endpoint = "hls_manifest_proxy"
|
||||
|
||||
async def extract(self, url: str, **kwargs) -> Dict[str, Any]:
|
||||
#Init headers needed for the request.
|
||||
headers = {'Accept': '*/*', 'Connection': 'keep-alive','Accept-Language': 'en-US,en;q=0.5','Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'user-agent': 'Mozilla/5.0 (X11; Linux x86_64; rv:138.0) Gecko/20100101 Firefox/138.0'}
|
||||
"""Extract Fastream URL."""
|
||||
final_url = await eval_solver(self,url,headers)
|
||||
|
||||
self.base_headers["referer"] = f'https://{url.replace('https://','').split('/')[0]}/'
|
||||
self.base_headers["origin"] = f'https://{url.replace('https://','').split('/')[0]}'
|
||||
self.base_headers['Accept-Language'] = 'en-US,en;q=0.5'
|
||||
self.base_headers['Accept'] = '*/*'
|
||||
self.base_headers['user-agent'] = 'Mozilla/5.0 (X11; Linux x86_64; rv:138.0) Gecko/20100101 Firefox/138.0'
|
||||
|
||||
return {
|
||||
"destination_url": final_url,
|
||||
"request_headers": self.base_headers,
|
||||
"mediaflow_endpoint": self.mediaflow_endpoint,
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
import re
|
||||
from typing import Dict, Any
|
||||
|
||||
from mediaflow_proxy.extractors.base import BaseExtractor, ExtractorError
|
||||
|
||||
|
||||
@@ -15,14 +14,10 @@ class StreamtapeExtractor(BaseExtractor):
|
||||
matches = re.findall(r"id=.*?(?=')", response.text)
|
||||
if not matches:
|
||||
raise ExtractorError("Failed to extract URL components")
|
||||
final_url = next(
|
||||
(
|
||||
f"https://streamtape.com/get_video?{matches[i + 1]}"
|
||||
for i in range(len(matches) - 1)
|
||||
if matches[i] == matches[i + 1]
|
||||
),
|
||||
None,
|
||||
)
|
||||
i = 0
|
||||
for i in range(len(matches)):
|
||||
if matches[i-1] == matches[i] and "ip=" in matches[i]:
|
||||
final_url = f"https://streamtape.com/get_video?{matches[i]}"
|
||||
|
||||
self.base_headers["referer"] = url
|
||||
return {
|
||||
|
||||
@@ -2,22 +2,24 @@ import re
|
||||
from typing import Dict, Any
|
||||
|
||||
from mediaflow_proxy.extractors.base import BaseExtractor
|
||||
from mediaflow_proxy.utils.packed import eval_solver
|
||||
|
||||
|
||||
|
||||
|
||||
class SupervideoExtractor(BaseExtractor):
|
||||
"""Supervideo URL extractor."""
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
self.mediaflow_endpoint = "hls_manifest_proxy"
|
||||
|
||||
async def extract(self, url: str, **kwargs) -> Dict[str, Any]:
|
||||
"""Extract Supervideo URL."""
|
||||
response = await self._make_request(url)
|
||||
# Extract and decode URL
|
||||
s2 = re.search(r"\}\('(.+)',.+,'(.+)'\.split", response.text).group(2)
|
||||
terms = s2.split("|")
|
||||
hfs = next(terms[i] for i in range(terms.index("file"), len(terms)) if "hfs" in terms[i])
|
||||
result = terms[terms.index("urlset") + 1 : terms.index("hls")]
|
||||
#Init headers needed for the request.
|
||||
headers = {'Accept': '*/*', 'Connection': 'keep-alive', 'User-Agent': 'Mozilla/5.0 (Linux; Android 12) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.5060.71 Mobile Safari/537.36', 'user-agent': 'Mozilla/5.0 (Linux; Android 12) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.5060.71 Mobile Safari/537.36'}
|
||||
|
||||
base_url = f"https://{hfs}.serversicuro.cc/hls/"
|
||||
final_url = base_url + ",".join(reversed(result)) + (".urlset/master.m3u8" if result else "")
|
||||
|
||||
"""Extract Supervideo URL."""
|
||||
final_url = await eval_solver(self,url,headers)
|
||||
|
||||
self.base_headers["referer"] = url
|
||||
return {
|
||||
|
||||
@@ -17,7 +17,7 @@ class VixCloudExtractor(BaseExtractor):
|
||||
|
||||
async def version(self, site_url: str) -> str:
|
||||
"""Get version of VixCloud Parent Site."""
|
||||
base_url = f"{site_url}/richiedi-un-titolo"
|
||||
base_url = f"{site_url}/request-a-title"
|
||||
response = await self._make_request(
|
||||
base_url,
|
||||
headers={
|
||||
|
||||
Reference in New Issue
Block a user