Skip to content

A feature-rich command-line audio/video downloader

[curiositystream] Get `auth_token` from cookie (#3836)

monnefd2ff2c91bbac
diff --git a/yt_dlp/extractor/curiositystream.py b/yt_dlp/extractor/curiositystream.py
index 5b76b29ff4..e71b052897 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(