Skip to content

Commit

Permalink
fix pterclub签到报错
Browse files Browse the repository at this point in the history
  • Loading branch information
jxxghp committed Aug 13, 2023
1 parent f2fdd9d commit 2ede2cc
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions app/plugins/autosignin/sites/pterclub.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,11 @@ def signin(self, site_info: CommentedMap) -> Tuple[bool, str]:
if not html_text:
logger.error(f"{site} 签到失败,签到接口请求失败")
return False, '签到失败,请检查cookie是否失效'

sign_dict = json.loads(html_text)
try:
sign_dict = json.loads(html_text)
except Exception as e:
logger.error(f"{site} 签到失败,签到接口返回数据异常,错误信息:{e}")
return False, '签到失败,签到接口返回数据异常'
if sign_dict['status'] == '1':
# {"status":"1","data":" (签到已成功300)","message":"<p>这是您的第<b>237</b>次签到,
# 已连续签到<b>237</b>天。</p><p>本次签到获得<b>300</b>克猫粮。</p>"}
Expand Down

0 comments on commit 2ede2cc

Please sign in to comment.