aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2018-03-14 11:23:09 +0100
committerPhilipp Hagemeister <phihag@phihag.de>2018-03-14 11:23:10 +0100
commite6e68069f6fe25fe4a2b72487be840ba2ec3c5c6 (patch)
tree89a121dbad3f048f35607f90fd355109f6854b8a /youtube_dl
parentf3672ac522e85b3eae339a95d34f46e92d8ebaa3 (diff)
[tennistv] Correctly encode POST parameters
In python 3.x, the POST parameters must be bytes, not str.
Diffstat (limited to 'youtube_dl')
-rw-r--r--youtube_dl/extractor/tennistv.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/youtube_dl/extractor/tennistv.py b/youtube_dl/extractor/tennistv.py
index 601a17e57..def29b6fa 100644
--- a/youtube_dl/extractor/tennistv.py
+++ b/youtube_dl/extractor/tennistv.py
@@ -40,7 +40,7 @@ class TennisTVIE(InfoExtractor):
'Email': username,
'Password': password,
}
- login_json = json.dumps(login_form)
+ login_json = json.dumps(login_form).encode('utf-8')
headers = {
'content-type': 'application/json',
'Referer': 'https://www.tennistv.com/login',
@@ -81,7 +81,7 @@ class TennisTVIE(InfoExtractor):
'videoID': internal_id,
'VideoUrlType': 'HLSV3',
}
- check_json = json.dumps(check_data)
+ check_json = json.dumps(check_data).encode('utf-8')
check_result = self._download_json(
'https://www.tennistv.com/api/users/v1/entitlementchecknondiva',
video_id, note='Checking video authorization', headers=headers, data=check_json)