Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue where DEFAULT_CIPHERS is not supported in urrlib3>=2 #463

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 12 additions & 1 deletion cfscrape/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,18 @@
from requests.compat import urlparse, urlunparse
from requests.exceptions import RequestException

from urllib3.util.ssl_ import create_urllib3_context, DEFAULT_CIPHERS
from urllib3.util.ssl_ import create_urllib3_context

try:
from urllib3.util.ssl_ import DEFAULT_CIPHERS
except ImportError:
# Defer to system configuration starting with
# urllib3 2.0. This will choose the ciphers provided by
# Openssl 1.1.1+ or secure system defaults.
DEFAULT_CIPHERS = (
'ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+HIGH:'
'DH+HIGH:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+HIGH:RSA+3DES:!aNULL:'
'!eNULL:!MD5')

from .user_agents import USER_AGENTS

Expand Down