Skip to content

Commit

Permalink
fix: 登录判断
Browse files Browse the repository at this point in the history
  • Loading branch information
linyuan0213 committed Aug 26, 2024
1 parent e53c461 commit 19b6d23
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions app/helper/site_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,13 @@ def is_logged_in(cls, html_text):
"""
if JsonUtils.is_valid_json(html_text):
json_data = json.loads(html_text)
if json_data.get('message') == 'SUCCESS' or json_data.get('success'):
message = json_data.get('message')
success = json_data.get('success')
error_message = json_data.get('errorMessage')

if message == 'SUCCESS' or success or (error_message and '已签' in error_message):
return True
else:
return False
return False
if "签到成功" in html_text:
return True

Expand Down

0 comments on commit 19b6d23

Please sign in to comment.