mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-21 20:46:36 -05:00
[tennistv] Correctly encode POST parameters
In python 3.x, the POST parameters must be bytes, not str.
This commit is contained in:
parent
f3672ac522
commit
e6e68069f6
2 changed files with 3 additions and 3 deletions
|
@ -2,7 +2,7 @@ version <unreleased>
|
|||
|
||||
Extractors
|
||||
+ [line] Add support for tv.line.me (#9427)
|
||||
|
||||
+ [tennistv] Add support for tennistv.com
|
||||
|
||||
version 2018.03.10
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ def _login(self):
|
|||
'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 @@ def _real_extract(self, url):
|
|||
'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)
|
||||
|
|
Loading…
Reference in a new issue