summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorpatrickslin <[email protected]>2013-09-19 21:49:06 -0700
committerpatrickslin <[email protected]>2013-09-19 21:49:06 -0700
commitbc4b9008981096184739666941e73c8d09623502 (patch)
tree11ba8f0fa4c3548eb1262af4bbda1358b4171697
parentc5e743f66f5637fe02fe0b5167fab99a06b903e6 (diff)
downloadyoutube-dl-bc4b9008981096184739666941e73c8d09623502.tar.gz
youtube-dl-bc4b9008981096184739666941e73c8d09623502.zip
Unable to decrypt signature length 93 (fixes #1461)
-rw-r--r--youtube_dl/extractor/youtube.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py
index 23a8097c5..e5f536e6f 100644
--- a/youtube_dl/extractor/youtube.py
+++ b/youtube_dl/extractor/youtube.py
@@ -416,7 +416,9 @@ class YoutubeIE(YoutubeBaseInfoExtractor, SubtitlesInfoExtractor):
def _decrypt_signature(self, s):
"""Turn the encrypted s field into a working signature"""
- if len(s) == 92:
+ if len(s) == 93:
+ return s[86:29:-1] + s[88] + s[28:5:-1]
+ elif len(s) == 92:
return s[25] + s[3:25] + s[0] + s[26:42] + s[79] + s[43:79] + s[91] + s[80:83]
elif len(s) == 90:
return s[25] + s[3:25] + s[2] + s[26:40] + s[77] + s[41:77] + s[89] + s[78:81]