A feature-rich command-line audio/video downloader
[compat] Fix missing _asciire on python 2.6
Sergey M․3cc8b4c32758
diff --git a/youtube_dl/compat.py b/youtube_dl/compat.pyindex e950a4688f..db0da5828d 100644--- a/youtube_dl/compat.py+++ b/youtube_dl/compat.py@@ -79,6 +79,8 @@ try:from urllib.parse import unquote as compat_urllib_parse_unquotefrom urllib.parse import unquote_plus as compat_urllib_parse_unquote_plusexcept ImportError: # Python 2+ _asciire = re.compile('([\x00-\x7f]+)') if sys.version_info < (2, 7) else compat_urllib_parse._asciire+# HACK: The following are the correct unquote_to_bytes, unquote and unquote_plus# implementations from cpython 3.4.3's stdlib. Python 2's version# is apparently broken (see https://github.com/rg3/youtube-dl/pull/6244)@@ -124,7 +126,7 @@ except ImportError: # Python 2encoding = 'utf-8'if errors is None:errors = 'replace'- bits = compat_urllib_parse._asciire.split(string)+ bits = _asciire.split(string)res = [bits[0]]append = res.appendfor i in range(1, len(bits), 2):