YoutubeIE: new algo for length 81 (fixes #1127)
[youtube-dl] / youtube_dl / extractor / youtube.py
index 491018d6cf10551ffb5da8a07127e81310ff7700..f86929e06f2591f569c77b166fd7e1769831a772 100644 (file)
@@ -296,7 +296,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
         elif len(s) == 82:
             return s[36] + s[79:67:-1] + s[81] + s[66:40:-1] + s[33] + s[39:36:-1] + s[40] + s[35] + s[0] + s[67] + s[32:0:-1] + s[34]
         elif len(s) == 81:
-            return s[6] + s[3:6] + s[33] + s[7:24] + s[0] + s[25:33] + s[2] + s[34:53] + s[24] + s[54:81]
+            return s[56] + s[79:56:-1] + s[41] + s[55:41:-1] + s[80] + s[40:34:-1] + s[0] + s[33:29:-1] + s[34] + s[28:9:-1] + s[29] + s[8:0:-1] + s[9]
 
         else:
             raise ExtractorError(u'Unable to decrypt signature, key length %d not supported; retrying might work' % (len(s)))