Prefer secure HTTPS by default

This commit is contained in:
Ritiek Malhotra
2019-06-03 14:04:41 +05:30
parent b808265c38
commit fd74adb42f
2 changed files with 4 additions and 0 deletions

View File

@@ -43,3 +43,6 @@ class PatchPafy:
def patch_process_streams(self):
backend_youtube_dl.YtdlPafy._old_process_streams = backend_youtube_dl.YtdlPafy._process_streams
backend_youtube_dl.YtdlPafy._process_streams = _process_streams
def patch_insecure_streams(self):
pafy.g.def_ydl_opts["prefer_insecure"] = False

View File

@@ -21,6 +21,7 @@ if pafy.__version__ <= "0.5.4":
pafy_patcher = patcher.PatchPafy()
pafy_patcher.patch_getbestthumb()
pafy_patcher.patch_process_streams()
pafy_patcher.patch_insecure_streams()
def set_api_key():