Skip to content

Commit

Permalink
fix: 修复因使用新语法 在py310以下版本脚本报错问题 (#316)
Browse files Browse the repository at this point in the history
* Update utils.py

* Update utils.py

---------

Co-authored-by: Night-stars-1 <99261160+Night-stars-1@users.noreply.github.com>
  • Loading branch information
jhl337 and Night-stars-1 authored Jan 27, 2025
1 parent e2b4643 commit a4b6cdc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import string
import time
from io import BytesIO
from typing import Type
from typing import Type, Union
from urllib.parse import parse_qsl, urlparse

from Crypto.Cipher import AES, PKCS1_v1_5
Expand Down Expand Up @@ -90,7 +90,7 @@ def is_incorrect_return(
)


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

0 comments on commit a4b6cdc

Please sign in to comment.