YoutubeIE: new algo for length 86 (fixes #1156)
Now is using the same length as the flash player used for age protected videos, but the algorithm is different, so now for age protected videos it first tries to use the old algo.
This commit is contained in:
		
							parent
							
								
									05afc96b73
								
							
						
					
					
						commit
						75952c6e3d
					
				
					 3 changed files with 35 additions and 6 deletions
				
			
		| 
						 | 
				
			
			@ -17,9 +17,9 @@ tests = [
 | 
			
		|||
    # 87 - vflART1Nf 2013/07/24
 | 
			
		||||
    ("qwertyuioplkjhgfdsazxcvbnm1234567890QWERTYUIOPLKJHGFDSAZXCVBNM!@#$^&*()_-+={[]}|:;?/>.<",
 | 
			
		||||
     "tyuioplkjhgfdsazxcv<nm1234567890QWERTYUIOPLKJHGFDSAZXCVBNM!@#$^&*()_-+={[]}|:;?/>"),
 | 
			
		||||
    # 86 - vfl_ymO4Z 2013/06/27
 | 
			
		||||
    # 86 - vflm_D8eE 2013/07/31
 | 
			
		||||
    ("qwertyuioplkjhgfdsazxcvbnm1234567890QWERTYUIOPLKJHGFDSAZXCVBNM!@#$%^&*()_-+={[|};?/>.<",
 | 
			
		||||
     "ertyuioplkjhgfdsazxcvbnm1234567890QWERTYUIOPLKJHGFDSAZXCVBNM!/#$%^&*()_-+={[|};?@"),
 | 
			
		||||
     ">.1}|[{=+-_)(*&^%$#@!MNBVCXZASDFGHJK<POIUYTREW509876L432/mnbvcxzasdfghjklpoiuytre"),
 | 
			
		||||
    # 85 - vflSAFCP9 2013/07/19
 | 
			
		||||
    ("qwertyuioplkjhgfdsazxcvbnm1234567890QWERTYUIOPLKJHGFDSAZXCVBNM!@#$%^&*()_-+={[};?/>.<",
 | 
			
		||||
     "ertyuiqplkjhgfdsazx$vbnm1234567890QWERTYUIOPLKJHGFDSAZXCVBNM!@#<%^&*()_-+={[};?/c"),
 | 
			
		||||
| 
						 | 
				
			
			@ -40,6 +40,12 @@ tests = [
 | 
			
		|||
     "Z?;}[{=+-(*&^%$#@!MNBVCXRASDFGHKLPOIUYT/EWQ0q87659321mnbvcxzasdfghjkl4oiuytrewp"),
 | 
			
		||||
]
 | 
			
		||||
 | 
			
		||||
tests_age_gate = [
 | 
			
		||||
    # 86 - vflqinMWD
 | 
			
		||||
    ("qwertyuioplkjhgfdsazxcvbnm1234567890QWERTYUIOPLKJHGFDSAZXCVBNM!@#$%^&*()_-+={[|};?/>.<",
 | 
			
		||||
     "ertyuioplkjhgfdsazxcvbnm1234567890QWERTYUIOPLKJHGFDSAZXCVBNM!/#$%^&*()_-+={[|};?@"),
 | 
			
		||||
]
 | 
			
		||||
 | 
			
		||||
def find_matching(wrong, right):
 | 
			
		||||
    idxs = [wrong.index(c) for c in right]
 | 
			
		||||
    return compress(idxs)
 | 
			
		||||
| 
						 | 
				
			
			@ -90,6 +96,8 @@ def genall(tests):
 | 
			
		|||
 | 
			
		||||
def main():
 | 
			
		||||
    print(genall(tests))
 | 
			
		||||
    print(u'    Age gate:')
 | 
			
		||||
    print(genall(tests_age_gate))
 | 
			
		||||
 | 
			
		||||
if __name__ == '__main__':
 | 
			
		||||
    main()
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue