From b12bfd5bb285e4d812eebb22c0db52f4c8c742a6 Mon Sep 17 00:00:00 2001 From: Maocx Date: Tue, 28 Aug 2018 17:27:48 +0200 Subject: [PATCH] Sending correct content-type Added content-type from https://github.com/pietje666/plugin.video.vrt.nu/issues/21. --- youtube_dl/extractor/vrt.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/youtube_dl/extractor/vrt.py b/youtube_dl/extractor/vrt.py index 0e08660da..829617286 100644 --- a/youtube_dl/extractor/vrt.py +++ b/youtube_dl/extractor/vrt.py @@ -197,8 +197,8 @@ class SporzaIE(InfoExtractor): # Get a player token vrtPlayerToken = self._download_json( "https://media-services-public.vrt.be/vualto-video-aggregator-web/rest/external/v1/tokens", - video_id, headers={"content-type": ""}, data={}).get( - "vrtPlayerToken") # Default content type results in 415 + video_id, headers={"content-type": "application/json"}, data={}).get( + "vrtPlayerToken") # Default content type results in 415, correct content-type from: https://github.com/pietje666/plugin.video.vrt.nu/issues/21 src = api_url + "/videos/" + publication_id + "$" + video_id + "/?vrtPlayerToken=" + vrtPlayerToken + "&client=" + video_client meta = self._download_json(src, video_id)