Sending correct content-type

Added content-type from https://github.com/pietje666/plugin.video.vrt.nu/issues/21.
This commit is contained in:
Maocx 2018-08-28 17:27:48 +02:00 committed by GitHub
parent f743511503
commit b12bfd5bb2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -197,8 +197,8 @@ class SporzaIE(InfoExtractor):
# Get a player token # Get a player token
vrtPlayerToken = self._download_json( vrtPlayerToken = self._download_json(
"https://media-services-public.vrt.be/vualto-video-aggregator-web/rest/external/v1/tokens", "https://media-services-public.vrt.be/vualto-video-aggregator-web/rest/external/v1/tokens",
video_id, headers={"content-type": ""}, data={}).get( video_id, headers={"content-type": "application/json"}, data={}).get(
"vrtPlayerToken") # Default content type results in 415 "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 src = api_url + "/videos/" + publication_id + "$" + video_id + "/?vrtPlayerToken=" + vrtPlayerToken + "&client=" + video_client
meta = self._download_json(src, video_id) meta = self._download_json(src, video_id)