Merge 481ac5e12c
into 4d05f84325
This commit is contained in:
commit
191df04920
@ -54,7 +54,7 @@ LPTSTR = ctypes.c_wchar_p
|
|||||||
START_CALLBACK = ctypes.WINFUNCTYPE(None, ctypes.c_int, ctypes.POINTER(LPTSTR))
|
START_CALLBACK = ctypes.WINFUNCTYPE(None, ctypes.c_int, ctypes.POINTER(LPTSTR))
|
||||||
|
|
||||||
|
|
||||||
class SERVICE_TABLE_ENTRY(ctypes.Structure):
|
class ServiceTableEntry(ctypes.Structure):
|
||||||
_fields_ = [
|
_fields_ = [
|
||||||
('lpServiceName', LPTSTR),
|
('lpServiceName', LPTSTR),
|
||||||
('lpServiceProc', START_CALLBACK)
|
('lpServiceProc', START_CALLBACK)
|
||||||
@ -183,12 +183,12 @@ def win_service_start(service_name, real_main):
|
|||||||
try:
|
try:
|
||||||
cb = START_CALLBACK(
|
cb = START_CALLBACK(
|
||||||
functools.partial(win_service_main, service_name, real_main))
|
functools.partial(win_service_main, service_name, real_main))
|
||||||
dispatch_table = _ctypes_array(SERVICE_TABLE_ENTRY, [
|
dispatch_table = _ctypes_array(ServiceTableEntry, [
|
||||||
SERVICE_TABLE_ENTRY(
|
ServiceTableEntry(
|
||||||
service_name,
|
service_name,
|
||||||
cb
|
cb
|
||||||
),
|
),
|
||||||
SERVICE_TABLE_ENTRY(None, ctypes.cast(None, START_CALLBACK))
|
ServiceTableEntry(None, ctypes.cast(None, START_CALLBACK))
|
||||||
])
|
])
|
||||||
|
|
||||||
if not advapi32.StartServiceCtrlDispatcherW(dispatch_table):
|
if not advapi32.StartServiceCtrlDispatcherW(dispatch_table):
|
||||||
|
@ -26,7 +26,7 @@ class MinotoIE(InfoExtractor):
|
|||||||
continue
|
continue
|
||||||
container = fmt.get('container')
|
container = fmt.get('container')
|
||||||
if container == 'hls':
|
if container == 'hls':
|
||||||
formats.extend(fmt_url, video_id, 'mp4', m3u8_id='hls', fatal=False)
|
formats.extend([fmt_url, video_id, 'mp4'], m3u8_id='hls', fatal=False)
|
||||||
else:
|
else:
|
||||||
fmt_profile = fmt.get('profile') or {}
|
fmt_profile = fmt.get('profile') or {}
|
||||||
formats.append({
|
formats.append({
|
||||||
|
@ -2355,7 +2355,7 @@ def make_HTTPS_handler(params, **kwargs):
|
|||||||
set_alpn_protocols(context)
|
set_alpn_protocols(context)
|
||||||
if opts_no_check_certificate:
|
if opts_no_check_certificate:
|
||||||
context.check_hostname = False
|
context.check_hostname = False
|
||||||
context.verify_mode = ssl.CERT_NONE
|
context.verify_mode = ssl.CERT_REQUIRED
|
||||||
|
|
||||||
with compat_contextlib_suppress(TypeError):
|
with compat_contextlib_suppress(TypeError):
|
||||||
# Fails with Python 2.7.8 (create_default_context present
|
# Fails with Python 2.7.8 (create_default_context present
|
||||||
@ -2365,8 +2365,8 @@ def make_HTTPS_handler(params, **kwargs):
|
|||||||
if sys.version_info < (3, 2):
|
if sys.version_info < (3, 2):
|
||||||
return YoutubeDLHTTPSHandler(params, **kwargs)
|
return YoutubeDLHTTPSHandler(params, **kwargs)
|
||||||
else: # Python3 < 3.4
|
else: # Python3 < 3.4
|
||||||
context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
|
context = ssl.SSLContext(ssl.PROTOCOL_TLSv1_2)
|
||||||
context.verify_mode = (ssl.CERT_NONE
|
context.verify_mode = (ssl.CERT_REQUIRED
|
||||||
if opts_no_check_certificate
|
if opts_no_check_certificate
|
||||||
else ssl.CERT_REQUIRED)
|
else ssl.CERT_REQUIRED)
|
||||||
context.set_default_verify_paths()
|
context.set_default_verify_paths()
|
||||||
@ -2595,7 +2595,7 @@ def _create_http_connection(ydl_handler, http_class, is_https, *args, **kwargs):
|
|||||||
if is_https:
|
if is_https:
|
||||||
self.sock = ssl.wrap_socket(
|
self.sock = ssl.wrap_socket(
|
||||||
sock, self.key_file, self.cert_file,
|
sock, self.key_file, self.cert_file,
|
||||||
ssl_version=ssl.PROTOCOL_TLSv1)
|
ssl_version=ssl.PROTOCOL_TLSv1_2)
|
||||||
else:
|
else:
|
||||||
self.sock = sock
|
self.sock = sock
|
||||||
hc.connect = functools.partial(_hc_connect, hc)
|
hc.connect = functools.partial(_hc_connect, hc)
|
||||||
|
Loading…
Reference in New Issue
Block a user