Skip to content

Commit 3e43700

Browse files
committed
[PATCH] http_session: don't disable InsecureRequestWarning (streamlink#4525)
1 parent 0ab803f commit 3e43700

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

src/streamlink/plugin/api/http_session.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
pass
77

88
import requests
9+
# noinspection PyPackageRequirements
910
import urllib3
1011
from requests import Session
1112

@@ -19,15 +20,6 @@
1920
urllib3_version = tuple(map(int, urllib3.__version__.split(".")[:3]))
2021

2122

22-
try:
23-
from requests.packages import urllib3
24-
25-
# We tell urllib3 to disable warnings about unverified HTTPS requests,
26-
# because in some plugins we have to do unverified requests intentionally.
27-
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
28-
except (ImportError, AttributeError):
29-
pass
30-
3123
# Never convert percent-encoded characters to uppercase in urllib3>=1.25.4.
3224
# This is required for sites which compare request URLs byte for byte and return different responses depending on that.
3325
# Older versions of urllib3 are not compatible with this override and will always convert to uppercase characters.

0 commit comments

Comments
 (0)