diff options
author | monnef <1975567+mnn@users.noreply.github.com> | 2022-05-27 01:02:20 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-26 16:02:20 -0700 |
commit | d2ff2c91bbac42e4d84131d7cf23d79c910d5309 (patch) | |
tree | 58401589b421f74b5baa4c0b6c6d8ee901c0a28b | |
parent | 7879e79d11a2e5855167820518df49caf623fe48 (diff) | |
download | hypervideo-pre-d2ff2c91bbac42e4d84131d7cf23d79c910d5309.tar.lz hypervideo-pre-d2ff2c91bbac42e4d84131d7cf23d79c910d5309.tar.xz hypervideo-pre-d2ff2c91bbac42e4d84131d7cf23d79c910d5309.zip |
[curiositystream] Get `auth_token` from cookie (#3836)
Closes #3753
Authored by: mnn
-rw-r--r-- | yt_dlp/extractor/curiositystream.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/yt_dlp/extractor/curiositystream.py b/yt_dlp/extractor/curiositystream.py index 5b76b29ff..e71b05289 100644 --- a/yt_dlp/extractor/curiositystream.py +++ b/yt_dlp/extractor/curiositystream.py @@ -23,6 +23,11 @@ class CuriosityStreamBaseIE(InfoExtractor): def _call_api(self, path, video_id, query=None): headers = {} + if not self._auth_token: + auth_cookie = self._get_cookies('https://curiositystream.com').get('auth_token') + if auth_cookie: + self.write_debug('Obtained auth_token cookie') + self._auth_token = cookie.value if self._auth_token: headers['X-Auth-Token'] = self._auth_token result = self._download_json( |