Skip to content

Commit

Permalink
Fix SSL context deprecation warning.
Browse files Browse the repository at this point in the history
  • Loading branch information
VeNoMouS committed Apr 25, 2023
1 parent 5f8f00f commit 9855d8e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cloudscraper/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

# ------------------------------------------------------------------------------- #

__version__ = '1.2.69'
__version__ = '1.2.70'

# ------------------------------------------------------------------------------- #

Expand Down Expand Up @@ -82,7 +82,10 @@ def __init__(self, *args, **kwargs):

self.ssl_context.set_ciphers(self.cipherSuite)
self.ssl_context.set_ecdh_curve(self.ecdhCurve)
self.ssl_context.options |= (ssl.OP_NO_SSLv2 | ssl.OP_NO_SSLv3 | ssl.OP_NO_TLSv1 | ssl.OP_NO_TLSv1_1)

self.ssl_context.options |= (ssl.OP_NO_SSLv2 | ssl.OP_NO_SSLv3 | ssl.OP_NO_TLSv1_1)
if sys.version_info[:2] < (3, 10): # Remove deprecation warning in >= py3.10
self.ssl_context.options |= ssl.OP_NO_TLSv1

super(CipherSuiteAdapter, self).__init__(**kwargs)

Expand Down

0 comments on commit 9855d8e

Please sign in to comment.