A feature-rich command-line audio/video downloader
[youtube]: new algo for length 83 (fixes #1164)
Jaime Marquínez Ferrándiz04bca64bded9
diff --git a/devscripts/youtube_genalgo.py b/devscripts/youtube_genalgo.pyindex fd01206506..31d6ec9529 100644--- a/devscripts/youtube_genalgo.py+++ b/devscripts/youtube_genalgo.py@@ -26,9 +26,9 @@ tests = [# 84("qwertyuioplkjhgfdsazxcvbnm1234567890QWERTYUIOPLKJHGFDSAZXCVBNM!@#$%^&*()_-+={[};?>.<","<.>?;}[{=+-_)(*&^%$#@!MNBVCXZASDFGHJKLPOIUYTREWe098765432rmnbvcxzasdfghjklpoiuyt1"),- # 83 - vflcaqGO8 2013/07/11+ # 83 - vflTWC9KW 2013/08/01("qwertyuioplkjhgfdsazxcvbnm1234567890QWERTYUIOPLKJHGFDSAZXCVBNM!#$%^&*()_+={[};?/>.<",- "urty8ioplkjhgfdsazxcvbqm1234567S90QWERTYUIOPLKJHGFDnAZXCVBNM!#$%^&*()_+={[};?/>.<"),+ "qwertyuioplkjhg>dsazxcvbnm1234567890QWERTYUIOPLKJHGFDSAZXCVBNM!#$%^&*()_+={[};?/f"),# 82("qwertyuioplkjhgfdsazxcvbnm1234567890QWERTYUIOPLKHGFDSAZXCVBNM!@#$%^&*(-+={[};?/>.<","Q>/?;}[{=+-(*<^%$#@!MNBVCXZASDFGHKLPOIUY8REWT0q&7654321mnbvcxzasdfghjklpoiuytrew9"),diff --git a/test/test_youtube_sig.py b/test/test_youtube_sig.pyindex d06f3c8aa5..d645c08fb7 100644--- a/test/test_youtube_sig.py+++ b/test/test_youtube_sig.py@@ -52,7 +52,7 @@ class TestYoutubeSig(unittest.TestCase):def test_83(self):wrong = "qwertyuioplkjhgfdsazxcvbnm1234567890QWERTYUIOPLKJHGFDSAZXCVBNM!#$%^&*()_+={[};?/>.<"- right = "urty8ioplkjhgfdsazxcvbqm1234567S90QWERTYUIOPLKJHGFDnAZXCVBNM!#$%^&*()_+={[};?/>.<"+ right = "qwertyuioplkjhg>dsazxcvbnm1234567890QWERTYUIOPLKJHGFDSAZXCVBNM!#$%^&*()_+={[};?/f"self.assertEqual(sig(wrong), right)def test_82(self):diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.pyindex 31c5bebdc7..bc89a14ffc 100644--- a/youtube_dl/extractor/youtube.py+++ b/youtube_dl/extractor/youtube.py@@ -346,7 +346,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor):elif len(s) == 84:return s[83:36:-1] + s[2] + s[35:26:-1] + s[3] + s[25:3:-1] + s[26]elif len(s) == 83:- return s[6] + s[3:6] + s[33] + s[7:24] + s[0] + s[25:33] + s[53] + s[34:53] + s[24] + s[54:]+ return s[:15] + s[80] + s[16:80] + s[15]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: