Skip to content

Commit

Permalink
[PATCH] http_session: don't disable InsecureRequestWarning (streamlin…
Browse files Browse the repository at this point in the history
  • Loading branch information
Billy2011 committed May 14, 2022
1 parent 0ab803f commit 3e43700
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/streamlink/plugin/api/http_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
pass

import requests
# noinspection PyPackageRequirements
import urllib3
from requests import Session

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


try:
from requests.packages import urllib3

# We tell urllib3 to disable warnings about unverified HTTPS requests,
# because in some plugins we have to do unverified requests intentionally.
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
except (ImportError, AttributeError):
pass

# Never convert percent-encoded characters to uppercase in urllib3>=1.25.4.
# This is required for sites which compare request URLs byte for byte and return different responses depending on that.
# Older versions of urllib3 are not compatible with this override and will always convert to uppercase characters.
Expand Down

0 comments on commit 3e43700

Please sign in to comment.