mirror of
				https://github.com/yt-dlp/yt-dlp.git
				synced 2025-11-04 08:35:12 +00:00 
			
		
		
		
	Correct test strings
This commit is contained in:
		@@ -468,7 +468,8 @@ class YoutubeIE(YoutubeBaseInfoExtractor, SubtitlesInfoExtractor):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        if cache_enabled:
 | 
					        if cache_enabled:
 | 
				
			||||||
            try:
 | 
					            try:
 | 
				
			||||||
                cache_res = res(map(compat_chr, range(slen)))
 | 
					                test_string = u''.join(map(compat_chr, range(slen)))
 | 
				
			||||||
 | 
					                cache_res = res(test_string)
 | 
				
			||||||
                cache_spec = [ord(c) for c in cache_res]
 | 
					                cache_spec = [ord(c) for c in cache_res]
 | 
				
			||||||
                try:
 | 
					                try:
 | 
				
			||||||
                    os.makedirs(os.path.dirname(cache_fn))
 | 
					                    os.makedirs(os.path.dirname(cache_fn))
 | 
				
			||||||
@@ -512,7 +513,8 @@ class YoutubeIE(YoutubeBaseInfoExtractor, SubtitlesInfoExtractor):
 | 
				
			|||||||
            else:
 | 
					            else:
 | 
				
			||||||
                yield _genslice(start, i, step)
 | 
					                yield _genslice(start, i, step)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        cache_res = func(map(compat_chr, range(slen)))
 | 
					        test_string = u''.join(map(compat_chr, range(slen)))
 | 
				
			||||||
 | 
					        cache_res = func(test_string)
 | 
				
			||||||
        cache_spec = [ord(c) for c in cache_res]
 | 
					        cache_spec = [ord(c) for c in cache_res]
 | 
				
			||||||
        expr_code = u' + '.join(gen_sig_code(cache_spec))
 | 
					        expr_code = u' + '.join(gen_sig_code(cache_spec))
 | 
				
			||||||
        code = u'if len(s) == %d:\n    return %s\n' % (slen, expr_code)
 | 
					        code = u'if len(s) == %d:\n    return %s\n' % (slen, expr_code)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user