Skip to content

Commit 4f59bc9

Browse files
committed
workaround for requests 2.32.3
1 parent 7cc90a5 commit 4f59bc9

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

audiobookdl/sources/source/__init__.py

+7
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,14 @@ def find_all_in_page(self, url: str, regex: str, **kwargs) -> list:
177177
get_stream_files = networking.get_stream_files
178178

179179
def create_ssl_context(self, options: Any) -> SSLContext:
180+
# Custom SSLContext's are broken in requests version 2.32.0/2.32.1/2.32.2
181+
# fixed in version 2.32.3: https://github.com/psf/requests/pull/6716
180182
ssl_context: SSLContext = urllib3.util.create_urllib3_context() # type: ignore[attr-defined]
183+
184+
# Workaround for regression in requests version 2.32.3
185+
# https://github.com/psf/requests/issues/6730
186+
ssl_context.load_default_certs()
187+
181188
# Prevent the padding extension from appearing in the TLS ClientHello
182189
# It's used by Cloudflare for bot detection
183190
# See issue #106

0 commit comments

Comments
 (0)