diff --git a/lib/cloudscraper/__init__.py b/lib/cloudscraper/__init__.py index 31a4cd36..3a056269 100644 --- a/lib/cloudscraper/__init__.py +++ b/lib/cloudscraper/__init__.py @@ -54,7 +54,7 @@ except ImportError: # ------------------------------------------------------------------------------- # -__version__ = '1.2.32' +__version__ = '1.2.34' # ------------------------------------------------------------------------------- # @@ -102,6 +102,7 @@ class CloudScraper(Session): self.debug = kwargs.pop('debug', False) self.delay = kwargs.pop('delay', None) self.cipherSuite = kwargs.pop('cipherSuite', None) + self.ssl_context = kwargs.pop('ssl_context', None) self.interpreter = kwargs.pop('interpreter', 'native') self.recaptcha = kwargs.pop('recaptcha', {}) self.allow_brotli = kwargs.pop( @@ -134,7 +135,8 @@ class CloudScraper(Session): self.mount( 'https://', CipherSuiteAdapter( - cipherSuite=self.cipherSuite + cipherSuite=self.cipherSuite, + ssl_context=self.ssl_context ) ) @@ -253,7 +255,7 @@ class CloudScraper(Session): resp.headers.get('Server', '').startswith('cloudflare') and resp.status_code in [429, 503] and re.search( - r'action="/.*?__cf_chl_jschl_tk__=\S+".*?name="jschl_vc"\svalue=.*?', + r'