Skip to content
Snippets Groups Projects
Unverified Commit d2ff2c91 authored by monnef's avatar monnef Committed by GitHub
Browse files

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

Closes #3753
Authored by: mnn
parent 7879e79d
No related branches found
No related tags found
No related merge requests found
......@@ -23,6 +23,11 @@ def _handle_errors(self, result):
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(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment