Skip to content

Commit

Permalink
支持低版本python3.x
Browse files Browse the repository at this point in the history
  • Loading branch information
wangluozhe committed Dec 14, 2023
1 parent 4610602 commit 36cf2e9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion requests_go/__version__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

__title__ = "requests_go"
__description__ = "Advanced Python HTTP/HTTP2 Client. Support tls/http2/ja3 Fingerprint Custom."
__version__ = "0.6"
__version__ = "0.6.1"
__author__ = "Lee Gene"
__license__ = "MIT"
__author_email__ = "leegene0816@gmail.com"
Expand Down
2 changes: 1 addition & 1 deletion requests_go/tls_config/algorithms.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@


# charles的signature_algorithms转换为TLS1.3的signature_algorithms
def charles_to_tls_signature_algorithms(charles_signature_algorithms: str) -> list[str]:
def charles_to_tls_signature_algorithms(charles_signature_algorithms: str) -> list:
signature_algorithm_list = []
charles_signature_algorithms = charles_signature_algorithms.strip()
for signature_algorithm in charles_signature_algorithms.split("\n"):
Expand Down
4 changes: 2 additions & 2 deletions requests_go/tls_config/ciphers.py
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,7 @@ def cipher_suite_to_decimal(cipher_suite: str) -> int:


# CipherSuite列表转十进制列表
def cipher_suites_to_decimals(cipher_suites: list or str, split_str: str = "\n") -> list[int]:
def cipher_suites_to_decimals(cipher_suites: list or str, split_str: str = "\n") -> list:
if type(cipher_suites) == str:
cipher_suites = cipher_suites.strip()
cipher_suites = cipher_suites.split(split_str)
Expand All @@ -703,7 +703,7 @@ def decimal_to_cipher_suite(decimal: int) -> str:


# 十进制列表转CipherSuite列表
def decimals_to_cipher_suites(decimals: list or str, split_str: str = "-") -> list[str]:
def decimals_to_cipher_suites(decimals: list or str, split_str: str = "-") -> list:
if type(decimals) == str:
decimals = decimals.strip()
decimals = decimals.split(split_str)
Expand Down

0 comments on commit 36cf2e9

Please sign in to comment.