mirror of
https://github.com/Arrowar/StreamingCommunity.git
synced 2025-07-19 00:20:00 +00:00
Update mixdrop.py
This commit is contained in:
parent
ef1eb09da2
commit
adf4fb089b
@ -45,7 +45,7 @@ class VideoSource:
|
||||
def get_redirect_url(self) -> str:
|
||||
"""Extract the stayonline redirect URL from the initial page."""
|
||||
try:
|
||||
response = httpx.get(self.url, headers=self.headers, follow_redirects=True, timeout=MAX_TIMEOUT)
|
||||
response = httpx.get(self.url, headers=self.headers, follow_redirects=True, timeout=MAX_TIMEOUT, verify=REQUEST_VERIFY)
|
||||
response.raise_for_status()
|
||||
soup = BeautifulSoup(response.text, "html.parser")
|
||||
|
||||
@ -68,7 +68,7 @@ class VideoSource:
|
||||
raise ValueError("Redirect URL not set. Call get_redirect_url first.")
|
||||
|
||||
try:
|
||||
response = httpx.get(self.redirect_url, headers=self.headers, follow_redirects=True, timeout=MAX_TIMEOUT)
|
||||
response = httpx.get(self.redirect_url, headers=self.headers, follow_redirects=True, timeout=MAX_TIMEOUT, verify=REQUEST_VERIFY)
|
||||
response.raise_for_status()
|
||||
soup = BeautifulSoup(response.text, "html.parser")
|
||||
|
||||
@ -89,7 +89,7 @@ class VideoSource:
|
||||
self.headers['referer'] = f'{self.STAYONLINE_BASE_URL}/l/{link_id}/'
|
||||
data = {'id': link_id, 'ref': ''}
|
||||
|
||||
response = httpx.post(f'{self.STAYONLINE_BASE_URL}/ajax/linkView.php', headers=self.headers, data=data, timeout=MAX_TIMEOUT)
|
||||
response = httpx.post(f'{self.STAYONLINE_BASE_URL}/ajax/linkView.php', headers=self.headers, data=data, timeout=MAX_TIMEOUT, verify=REQUEST_VERIFY)
|
||||
response.raise_for_status()
|
||||
return response.json()['data']['value']
|
||||
|
||||
@ -128,7 +128,8 @@ class VideoSource:
|
||||
response = httpx.get(
|
||||
f'{self.MIXDROP_BASE_URL}/e/{video_id}',
|
||||
headers=self._get_mixdrop_headers(),
|
||||
timeout=MAX_TIMEOUT
|
||||
timeout=MAX_TIMEOUT,
|
||||
verify=REQUEST_VERIFY
|
||||
)
|
||||
response.raise_for_status()
|
||||
soup = BeautifulSoup(response.text, "html.parser")
|
||||
|
Loading…
x
Reference in New Issue
Block a user