Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Backups
youtube-dl
Commits
e6e68069
Commit
e6e68069
authored
Mar 14, 2018
by
Philipp Hagemeister
Browse files
[tennistv] Correctly encode POST parameters
In python 3.x, the POST parameters must be bytes, not str.
parent
f3672ac5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
ChangeLog
ChangeLog
+1
-1
youtube_dl/extractor/tennistv.py
youtube_dl/extractor/tennistv.py
+2
-2
No files found.
ChangeLog
View file @
e6e68069
...
...
@@ -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
...
...
youtube_dl/extractor/tennistv.py
View file @
e6e68069
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment