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:
|
def get_redirect_url(self) -> str:
|
||||||
"""Extract the stayonline redirect URL from the initial page."""
|
"""Extract the stayonline redirect URL from the initial page."""
|
||||||
try:
|
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()
|
response.raise_for_status()
|
||||||
soup = BeautifulSoup(response.text, "html.parser")
|
soup = BeautifulSoup(response.text, "html.parser")
|
||||||
|
|
||||||
@ -68,7 +68,7 @@ class VideoSource:
|
|||||||
raise ValueError("Redirect URL not set. Call get_redirect_url first.")
|
raise ValueError("Redirect URL not set. Call get_redirect_url first.")
|
||||||
|
|
||||||
try:
|
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()
|
response.raise_for_status()
|
||||||
soup = BeautifulSoup(response.text, "html.parser")
|
soup = BeautifulSoup(response.text, "html.parser")
|
||||||
|
|
||||||
@ -89,7 +89,7 @@ class VideoSource:
|
|||||||
self.headers['referer'] = f'{self.STAYONLINE_BASE_URL}/l/{link_id}/'
|
self.headers['referer'] = f'{self.STAYONLINE_BASE_URL}/l/{link_id}/'
|
||||||
data = {'id': link_id, 'ref': ''}
|
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()
|
response.raise_for_status()
|
||||||
return response.json()['data']['value']
|
return response.json()['data']['value']
|
||||||
|
|
||||||
@ -128,7 +128,8 @@ class VideoSource:
|
|||||||
response = httpx.get(
|
response = httpx.get(
|
||||||
f'{self.MIXDROP_BASE_URL}/e/{video_id}',
|
f'{self.MIXDROP_BASE_URL}/e/{video_id}',
|
||||||
headers=self._get_mixdrop_headers(),
|
headers=self._get_mixdrop_headers(),
|
||||||
timeout=MAX_TIMEOUT
|
timeout=MAX_TIMEOUT,
|
||||||
|
verify=REQUEST_VERIFY
|
||||||
)
|
)
|
||||||
response.raise_for_status()
|
response.raise_for_status()
|
||||||
soup = BeautifulSoup(response.text, "html.parser")
|
soup = BeautifulSoup(response.text, "html.parser")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user