Skip to content

Commit

Permalink
[youtube] Add code for signature 92 (Closes #1060)
Browse files Browse the repository at this point in the history
  • Loading branch information
phihag committed Jul 17, 2013
1 parent 51fb64b commit 88d4111
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions youtube_dl/extractor/youtube.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,8 @@ def _decrypt_signature(self, s):
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]
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];

else:
raise ExtractorError(u'Unable to decrypt signature, key length %d not supported; retrying might work' % (len(s)))
Expand Down

0 comments on commit 88d4111

Please sign in to comment.