mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-11-11 03:51:20 +00:00
Fix flake8
This commit is contained in:
parent
fb2b4e2894
commit
9e1acb2527
1 changed files with 6 additions and 2 deletions
|
@ -200,7 +200,9 @@ class NPOIE(NPOBaseIE):
|
||||||
player = self._download_json(
|
player = self._download_json(
|
||||||
'https://www.npostart.nl/player/%s' % video_id, video_id,
|
'https://www.npostart.nl/player/%s' % video_id, video_id,
|
||||||
'Downloading player JSON',
|
'Downloading player JSON',
|
||||||
headers={"x-xsrf-token": compat_urllib_parse_unquote_plus(xsrf_token)},
|
headers={
|
||||||
|
"x-xsrf-token": compat_urllib_parse_unquote_plus(xsrf_token)
|
||||||
|
},
|
||||||
data=urlencode_postdata({
|
data=urlencode_postdata({
|
||||||
'autoplay': 0,
|
'autoplay': 0,
|
||||||
'share': 1,
|
'share': 1,
|
||||||
|
@ -224,7 +226,9 @@ class NPOIE(NPOBaseIE):
|
||||||
'tokenId': player_token,
|
'tokenId': player_token,
|
||||||
'streamType': 'broadcast',
|
'streamType': 'broadcast',
|
||||||
},
|
},
|
||||||
data=b"") # empty byte string to force a POST request instead of GET, without it HTTP 405 will happen
|
data=b"")
|
||||||
|
# Empty byte string in the call above to force a POST request
|
||||||
|
# Without it HTTP 405 will happen
|
||||||
if not streams:
|
if not streams:
|
||||||
continue
|
continue
|
||||||
stream = streams.get('stream')
|
stream = streams.get('stream')
|
||||||
|
|
Loading…
Reference in a new issue