]> jfr.im git - yt-dlp.git/commitdiff
[extractor/curiositystream] Fix auth (#5730)
authormonnef <redacted>
Thu, 29 Dec 2022 07:47:23 +0000 (08:47 +0100)
committerGitHub <redacted>
Thu, 29 Dec 2022 07:47:23 +0000 (13:17 +0530)
Authored by: mnn

yt_dlp/extractor/curiositystream.py

index 26cf24fbbd290ae85cfaaa950a0aed81b9478cd7..941cf4e79c9549e4adef4ababae2a576809cdee4 100644 (file)
@@ -1,4 +1,5 @@
 import re
+import urllib.parse
 
 from .common import InfoExtractor
 from ..compat import compat_str
@@ -23,7 +24,7 @@ def _call_api(self, path, video_id, query=None):
             auth_cookie = self._get_cookies('https://curiositystream.com').get('auth_token')
             if auth_cookie:
                 self.write_debug('Obtained auth_token cookie')
-                self._auth_token = auth_cookie.value
+                self._auth_token = urllib.parse.unquote(auth_cookie.value)
         if self._auth_token:
             headers['X-Auth-Token'] = self._auth_token
         result = self._download_json(
@@ -54,8 +55,11 @@ class CuriosityStreamIE(CuriosityStreamBaseIE):
             'description': 'Vint Cerf, Google\'s Chief Internet Evangelist, describes how he and Bob Kahn created the internet.',
             'channel': 'Curiosity Stream',
             'categories': ['Technology', 'Interview'],
-            'average_rating': 96.79,
+            'average_rating': float,
             'series_id': '2',
+            'thumbnail': r're:https://img.curiositystream.com/.+\.jpg',
+            'tags': [],
+            'duration': 158
         },
         'params': {
             # m3u8 download