🐛 修复(v2ex/main.py):将cookie过期的返回值从字符串改为字典形式,以便更好地处理错误信息

This commit is contained in:
shitao 2024-02-22 09:27:34 +08:00
parent e8f6efdda9
commit 067d0925f8

View File

@ -27,7 +27,7 @@ class V2ex(CheckIn):
urls = re.findall(pattern=pattern, string=response.text)
url = urls[0] if urls else None
if url is None:
return "cookie 可能过期"
return [{"name": "签到失败", "value": "cookie 可能过期"}]
elif url != "/balance":
headers = {"Referer": "https://www.v2ex.com/mission/daily"}
data = {"once": url.split("=")[-1]}