aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2019-05-10 08:36:10 +0700
committerSergey M․ <dstftw@gmail.com>2019-05-10 08:38:05 +0700
commit027ffdca0d3174963a4269ce8de8519cfed7a12c (patch)
treee3a7a60fdee2aba5a8c194aa6b28d18510b6b101 /youtube_dl/extractor
parenta5b92d3590def85aee73d2968875e9a9cc916f26 (diff)
[youtube] Use sp field value for signature field name (closes #18841, closes #18927, closes #21028)
Diffstat (limited to 'youtube_dl/extractor')
-rw-r--r--youtube_dl/extractor/youtube.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py
index da202b9bc..8619f3838 100644
--- a/youtube_dl/extractor/youtube.py
+++ b/youtube_dl/extractor/youtube.py
@@ -1987,7 +1987,8 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
signature = self._decrypt_signature(
encrypted_sig, video_id, player_url, age_gate)
- url += '&signature=' + signature
+ sp = try_get(url_data, lambda x: x['sp'][0], compat_str) or 'signature'
+ url += '&%s=%s' % (sp, signature)
if 'ratebypass' not in url:
url += '&ratebypass=yes'