projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d2d8f89
)
Correct test strings
author
Philipp Hagemeister
<phihag@phihag.de>
Sun, 22 Sep 2013 10:18:16 +0000
(12:18 +0200)
committer
Philipp Hagemeister
<phihag@phihag.de>
Sun, 22 Sep 2013 10:18:16 +0000
(12:18 +0200)
youtube_dl/extractor/youtube.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/youtube.py
b/youtube_dl/extractor/youtube.py
index 780690ed02c990a1fbaa87bf9e97bd66bddd3245..049da2f91326b19a1bb1b02be3c1c630535773a3 100644
(file)
--- a/
youtube_dl/extractor/youtube.py
+++ b/
youtube_dl/extractor/youtube.py
@@
-468,7
+468,8
@@
class YoutubeIE(YoutubeBaseInfoExtractor, SubtitlesInfoExtractor):
if cache_enabled:
try:
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))
cache_spec = [ord(c) for c in cache_res]
try:
os.makedirs(os.path.dirname(cache_fn))
@@
-512,7
+513,8
@@
class YoutubeIE(YoutubeBaseInfoExtractor, SubtitlesInfoExtractor):
else:
yield _genslice(start, i, step)
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)
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)