A feature-rich command-line audio/video downloader
YoutubeIE: new algo for length 85 (closes #1080), thanks to @patrickslin
Jaime Marquínez Ferrándiza4358cbabd6b
diff --git a/devscripts/youtube_genalgo.py b/devscripts/youtube_genalgo.pyindex 6a33cf4039..2b3879f0a5 100644--- a/devscripts/youtube_genalgo.py+++ b/devscripts/youtube_genalgo.py@@ -20,9 +20,9 @@ tests = [# 86 - vfl_ymO4Z 2013/06/27("qwertyuioplkjhgfdsazxcvbnm1234567890QWERTYUIOPLKJHGFDSAZXCVBNM!@#$%^&*()_-+={[|};?/>.<","ertyuioplkjhgfdsazxcvbnm1234567890QWERTYUIOPLKJHGFDSAZXCVBNM!/#$%^&*()_-+={[|};?@"),- # 85+ # 85 - vflSAFCP9 2013/07/19("qwertyuioplkjhgfdsazxcvbnm1234567890QWERTYUIOPLKJHGFDSAZXCVBNM!@#$%^&*()_-+={[};?/>.<",- "{>/?;}[.=+-_)(*&^%$#@!MqBVCXZASDFwHJKLPOIUYTREWQ0987654321mnbvcxzasdfghjklpoiuytr"),+ "ertyuiqplkjhgfdsazx$vbnm1234567890QWERTYUIOPLKJHGFDSAZXCVBNM!@#<%^&*()_-+={[};?/c"),# 84("qwertyuioplkjhgfdsazxcvbnm1234567890QWERTYUIOPLKJHGFDSAZXCVBNM!@#$%^&*()_-+={[};?>.<","<.>?;}[{=+-_)(*&^%$#@!MNBVCXZASDFGHJKLPOIUYTREWe098765432rmnbvcxzasdfghjklpoiuyt1"),diff --git a/test/test_youtube_sig.py b/test/test_youtube_sig.pyindex 817ca148c5..51b300532d 100644--- a/test/test_youtube_sig.py+++ b/test/test_youtube_sig.py@@ -40,7 +40,7 @@ class TestYoutubeSig(unittest.TestCase):def test_85(self):wrong = "qwertyuioplkjhgfdsazxcvbnm1234567890QWERTYUIOPLKJHGFDSAZXCVBNM!@#$%^&*()_-+={[};?/>.<"- right = "{>/?;}[.=+-_)(*&^%$#@!MqBVCXZASDFwHJKLPOIUYTREWQ0987654321mnbvcxzasdfghjklpoiuytr"+ right = "ertyuiqplkjhgfdsazx$vbnm1234567890QWERTYUIOPLKJHGFDSAZXCVBNM!@#<%^&*()_-+={[};?/c"self.assertEqual(sig(wrong), right)def test_84(self):diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.pyindex 2aac5dd2ec..12e8fc25d6 100644--- a/youtube_dl/extractor/youtube.py+++ b/youtube_dl/extractor/youtube.py@@ -190,7 +190,7 @@ class YoutubeIE(InfoExtractor):elif len(s) == 86:return s[2:63] + s[82] + s[64:82] + s[63]elif len(s) == 85:- return s[76] + s[82:76:-1] + s[83] + s[75:60:-1] + s[0] + s[59:50:-1] + s[1] + s[49:2:-1]+ return s[2:8] + s[0] + s[9:21] + s[65] + s[22:65] + s[84] + s[66:82] + s[21]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: