projects
/
youtube-dl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Switch codebase to use sanitized_Request instead of
[youtube-dl]
/
youtube_dl
/
YoutubeDL.py
diff --git
a/youtube_dl/YoutubeDL.py
b/youtube_dl/YoutubeDL.py
index b20837ce288c7d1b182ab4b4fc83f18804851823..9a8c7da05172e342959d2ec5ffa481ab951fa763 100755
(executable)
--- 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_error,
compat_urllib_request,
compat_urllib_request_DataHandler,
- compat_urllib_request_Request,
)
from .utils import (
ContentTooShortError,
)
from .utils import (
ContentTooShortError,
@@
-65,6
+64,7
@@
from .utils import (
SameFileError,
sanitize_filename,
sanitize_path,
SameFileError,
sanitize_filename,
sanitize_path,
+ sanitized_Request,
std_headers,
subtitles_filename,
UnavailableVideoError,
std_headers,
subtitles_filename,
UnavailableVideoError,
@@
-1189,7
+1189,7
@@
class YoutubeDL(object):
return res
def _calc_cookies(self, info_dict):
return res
def _calc_cookies(self, info_dict):
- pr =
compat_urllib_request.
Request(info_dict['url'])
+ pr =
sanitized_
Request(info_dict['url'])
self.cookiejar.add_cookie_header(pr)
return pr.get_header('Cookie')
self.cookiejar.add_cookie_header(pr)
return pr.get_header('Cookie')
@@
-1874,7
+1874,7
@@
class YoutubeDL(object):
def urlopen(self, req):
""" Start an HTTP download """
if isinstance(req, compat_basestring):
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):
return self._opener.open(req, timeout=self._socket_timeout)
def print_debug_header(self):