]> git.bitcoin.ninja Git - youtube-dl/commitdiff
Unable to decrypt signature length 93 (fixes #1461)
authorpatrickslin <patrickslin@gmail.com>
Fri, 20 Sep 2013 04:49:06 +0000 (21:49 -0700)
committerpatrickslin <patrickslin@gmail.com>
Fri, 20 Sep 2013 04:49:06 +0000 (21:49 -0700)
youtube_dl/extractor/youtube.py

index 23a8097c5a91f3409688d26006cf4b26b785139e..e5f536e6f4f64bd45688b3515899fd6802886f21 100644 (file)
@@ -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]