[safari] Fix kaltura session extraction (closes #23679) (#23670)
authorcdarlint <cdarlint@users.noreply.github.com>
Fri, 10 Jan 2020 18:34:26 +0000 (02:34 +0800)
committerSergey M <dstftw@gmail.com>
Fri, 10 Jan 2020 18:34:26 +0000 (01:34 +0700)
youtube_dl/extractor/safari.py

index bd9ee1647d47d47bfc8d8341139c2bf953ecf158..4942437c7dbe918bd408bf805f8b76cc1d7967e4 100644 (file)
@@ -165,7 +165,8 @@ class SafariIE(SafariBaseIE):
             kaltura_session = self._download_json(
                 '%s/player/kaltura_session/?reference_id=%s' % (self._API_BASE, reference_id),
                 video_id, 'Downloading kaltura session JSON',
-                'Unable to download kaltura session JSON', fatal=False)
+                'Unable to download kaltura session JSON', fatal=False,
+                headers={'Accept': 'application/json'})
             if kaltura_session:
                 session = kaltura_session.get('session')
                 if session: