1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-11-05 10:42:37 +01:00

Merge pull request #4815 from jaimeMF/https_handler

[utils] YoutubeDLHTTPSHandler.https_open: pass all required arguments to to do_open
This commit is contained in:
Philipp Hagemeister 2015-01-30 01:57:46 +01:00
commit a16f6643f0

View File

@ -654,9 +654,14 @@ def __init__(self, params, https_conn_class=None, *args, **kwargs):
self._params = params
def https_open(self, req):
kwargs = {}
if hasattr(self, '_context'): # python > 2.6
kwargs['context'] = self._context
if hasattr(self, '_check_hostname'): # python 3.x
kwargs['check_hostname'] = self._check_hostname
return self.do_open(functools.partial(
_create_http_connection, self, self._https_conn_class, True),
req)
req, **kwargs)
def parse_iso8601(date_str, delimiter='T'):