From a8694cb049e6f7c123abb1bbb51f3e1ca5ff2972 Mon Sep 17 00:00:00 2001 From: rlaphoenix Date: Sat, 25 Feb 2023 11:56:23 +0000 Subject: [PATCH] Disable Insecure Request Warnings These seem to occur when using HTTP+S proxies when connecting to a HTTPS URL. E.g., NordVPN proxies to https://google.com. While not ideal, we can't solve this solution and the warning logs are quite annoying. --- devine/core/__main__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/devine/core/__main__.py b/devine/core/__main__.py index 68f1677..cd4e440 100644 --- a/devine/core/__main__.py +++ b/devine/core/__main__.py @@ -4,6 +4,8 @@ from pathlib import Path import click import coloredlogs +import urllib3 +from urllib3.exceptions import InsecureRequestWarning from devine.core import __version__ from devine.core.commands import Commands @@ -29,6 +31,8 @@ def main(version: bool, debug: bool, log_path: Path) -> None: fh.setFormatter(LOG_FORMATTER) log.addHandler(fh) + urllib3.disable_warnings(InsecureRequestWarning) + log.info(f"Devine version {__version__} Copyright (c) 2019-{datetime.now().year} rlaphoenix") log.info("Convenient Widevine-DRM Downloader and Decrypter.") log.info("https://github.com/devine-dl/devine")