INNER CODE UNIT · Python
_rotate_tls_cipher_suite
VeNoMouS/cloudscraper · cloudscraper/__init__.py:602
def _rotate_tls_cipher_suite(self):
"""
Rotate TLS cipher suites to avoid detection patterns
"""
if not hasattr(self, 'user_agent') or not hasattr(self.user_agent, 'cipherSuite'):
return
# Get available cipher suites for current browser
browser_name = getattr(self.user_agent, 'browser', 'chrome')
try:
# Get cipher suites from browsers.json
import json
import os
browsers_file = os.path.join(os.path.dirname(__file__), 'user_agent', 'browsers.json')
with open(browsers_file, 'r') as f:
browsers_data = json.load(f)