Skip to content

Commit a4b6cdc

Browse files
fix: 修复因使用新语法 在py310以下版本脚本报错问题 (#316)
* Update utils.py * Update utils.py --------- Co-authored-by: Night-stars-1 <99261160+Night-stars-1@users.noreply.github.com>
1 parent e2b4643 commit a4b6cdc

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

utils/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import string
66
import time
77
from io import BytesIO
8-
from typing import Type
8+
from typing import Type, Union
99
from urllib.parse import parse_qsl, urlparse
1010

1111
from Crypto.Cipher import AES, PKCS1_v1_5
@@ -90,7 +90,7 @@ def is_incorrect_return(
9090
)
9191

9292

93-
def get_token_by_captcha(url: str) -> str | bool:
93+
def get_token_by_captcha(url: str) -> Union[str, bool]:
9494
"""通过人机验证码获取TOKEN"""
9595
try:
9696
parsed_url = urlparse(url)

0 commit comments

Comments
 (0)