mirror of
https://github.com/Arrowar/StreamingCommunity.git
synced 2025-07-19 00:20:00 +00:00
Update sweetpixel.py
This commit is contained in:
parent
58bdadd92c
commit
18fb8a1748
@ -14,7 +14,7 @@ from StreamingCommunity.Util.headers import get_userAgent
|
|||||||
|
|
||||||
# Variable
|
# Variable
|
||||||
MAX_TIMEOUT = config_manager.get_int("REQUESTS", "timeout")
|
MAX_TIMEOUT = config_manager.get_int("REQUESTS", "timeout")
|
||||||
|
REQUEST_VERIFY = config_manager.get_bool('REQUESTS', 'verify')
|
||||||
|
|
||||||
class VideoSource:
|
class VideoSource:
|
||||||
def __init__(self, full_url, episode_data, session_id, csrf_token):
|
def __init__(self, full_url, episode_data, session_id, csrf_token):
|
||||||
@ -30,7 +30,8 @@ class VideoSource:
|
|||||||
cookies={"sessionId": session_id},
|
cookies={"sessionId": session_id},
|
||||||
headers={"User-Agent": get_userAgent(), "csrf-token": csrf_token},
|
headers={"User-Agent": get_userAgent(), "csrf-token": csrf_token},
|
||||||
base_url=full_url,
|
base_url=full_url,
|
||||||
timeout=MAX_TIMEOUT
|
timeout=MAX_TIMEOUT,
|
||||||
|
verify=REQUEST_VERIFY
|
||||||
)
|
)
|
||||||
|
|
||||||
def get_playlist(self):
|
def get_playlist(self):
|
||||||
@ -46,4 +47,4 @@ class VideoSource:
|
|||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logging.error(f"Error in new API system: {e}")
|
logging.error(f"Error in new API system: {e}")
|
||||||
return None
|
return None
|
||||||
|
Loading…
x
Reference in New Issue
Block a user