projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ea3f204
)
[YoutubeDL] PEP 8
author
Sergey M․
<dstftw@gmail.com>
Sat, 15 Jul 2017 00:02:14 +0000
(07:02 +0700)
committer
Sergey M․
<dstftw@gmail.com>
Sat, 15 Jul 2017 00:02:57 +0000
(07:02 +0700)
youtube_dl/YoutubeDL.py
patch
|
blob
|
history
diff --git
a/youtube_dl/YoutubeDL.py
b/youtube_dl/YoutubeDL.py
index 8730d32efc63e65dcc3481ee917f0f6e8f53afb8..89c07be290eaad1b198e3acf089831884e24ad21 100755
(executable)
--- a/
youtube_dl/YoutubeDL.py
+++ b/
youtube_dl/YoutubeDL.py
@@
-20,13
+20,14
@@
import re
import shutil
import subprocess
import socket
import shutil
import subprocess
import socket
-import string
import sys
import time
import tokenize
import traceback
import random
import sys
import time
import tokenize
import traceback
import random
+from string import ascii_letters
+
from .compat import (
compat_basestring,
compat_cookiejar,
from .compat import (
compat_basestring,
compat_cookiejar,
@@
-679,7
+680,7
@@
class YoutubeDL(object):
# correspondingly that is not what we want since we need to keep
# '%%' intact for template dict substitution step. Working around
# with boundary-alike separator hack.
# correspondingly that is not what we want since we need to keep
# '%%' intact for template dict substitution step. Working around
# with boundary-alike separator hack.
- sep = ''.join([random.choice(
string.
ascii_letters) for _ in range(32)])
+ sep = ''.join([random.choice(ascii_letters) for _ in range(32)])
outtmpl = outtmpl.replace('%%', '%{0}%'.format(sep)).replace('$$', '${0}$'.format(sep))
# outtmpl should be expand_path'ed before template dict substitution
outtmpl = outtmpl.replace('%%', '%{0}%'.format(sep)).replace('$$', '${0}$'.format(sep))
# outtmpl should be expand_path'ed before template dict substitution