执行 Ruff 安全自动修复

This commit is contained in:
yml2213
2026-08-31 10:28:14 +08:00
parent 2a1d27f953
commit b58c6b4357
145 changed files with 940 additions and 993 deletions
+2 -3
View File
@@ -1,10 +1,9 @@
"""斗鱼 Cookie 有效性检测服务。"""
from datetime import datetime, timezone
from datetime import UTC, datetime
import requests
CHECK_UA = (
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 "
"(KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36"
@@ -15,7 +14,7 @@ USER_LEVEL_API = "https://www.douyu.com/japi/interactnc/web/userLevel/userLevelD
def check_douyu_cookie(cookie: str) -> dict:
"""检测斗鱼 Cookie 有效性,鱼丸与等级接口均通过才算有效。"""
checked_at = datetime.now(timezone.utc)
checked_at = datetime.now(UTC)
base = {
"checked_at": checked_at,
"fish_ball": None,