aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/YoutubeDL.py
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2015-11-20 20:33:49 +0600
committerSergey M․ <dstftw@gmail.com>2015-11-23 21:55:15 +0600
commit67dda51722f1ce12b956782d43047b3fff390115 (patch)
treeffa0aa90945651ce8ca8ab102095797d8ada5bc8 /youtube_dl/YoutubeDL.py
parente4c4bcf36f4e0bb575526701f852152f4fd976c4 (diff)
Rename compat_urllib_request_Request to sanitized_Request and move to utils
Diffstat (limited to 'youtube_dl/YoutubeDL.py')
-rwxr-xr-xyoutube_dl/YoutubeDL.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.py
index b20837ce2..eedab37a7 100755
--- a/youtube_dl/YoutubeDL.py
+++ b/youtube_dl/YoutubeDL.py
@@ -39,7 +39,6 @@ from .compat import (
compat_urllib_error,
compat_urllib_request,
compat_urllib_request_DataHandler,
- compat_urllib_request_Request,
)
from .utils import (
ContentTooShortError,
@@ -65,6 +64,7 @@ from .utils import (
SameFileError,
sanitize_filename,
sanitize_path,
+ sanitized_Request,
std_headers,
subtitles_filename,
UnavailableVideoError,
@@ -1874,7 +1874,7 @@ class YoutubeDL(object):
def urlopen(self, req):
""" Start an HTTP download """
if isinstance(req, compat_basestring):
- req = compat_urllib_request_Request(req)
+ req = sanitized_Request(req)
return self._opener.open(req, timeout=self._socket_timeout)
def print_debug_header(self):