if cache_enabled:
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]
try:
os.makedirs(os.path.dirname(cache_fn))
else:
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]
expr_code = u' + '.join(gen_sig_code(cache_spec))
code = u'if len(s) == %d:\n return %s\n' % (slen, expr_code)
self._downloader.report_warning(
u'Automatic signature extraction failed: ' + tb)
- self._downloader.report_warning(
- u'Warning: Falling back to static signature algorithm')
+ self._downloader.report_warning(
+ u'Warning: Falling back to static signature algorithm')
return self._static_decrypt_signature(
s, video_id, player_url, age_gate)