This commit is contained in:
UrloMythus
2025-07-18 09:51:51 +02:00
parent e1b7376b8b
commit abf282c770
10 changed files with 16 additions and 167 deletions

View File

@@ -1,4 +1,3 @@
import re
from typing import Dict, Any
from mediaflow_proxy.extractors.base import BaseExtractor
@@ -17,10 +16,10 @@ class FastreamExtractor(BaseExtractor):
#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)
final_url = await eval_solver(self,url,headers, r'file:"(.*?)"')
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["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'
@@ -29,4 +28,4 @@ class FastreamExtractor(BaseExtractor):
"destination_url": final_url,
"request_headers": self.base_headers,
"mediaflow_endpoint": self.mediaflow_endpoint,
}
}