执行 Ruff 安全自动修复
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user