Skip to content

Commit

Permalink
test multiple accounts
Browse files Browse the repository at this point in the history
  • Loading branch information
lpxks authored Jan 2, 2025
1 parent d0f4ad5 commit da1191f
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,23 @@ def push(content):
print(f'[{email}] 进行登录...')
response = json.loads(session.post(url=login_url,headers=header,data=data).text)
print(response['msg'])
# 获取账号名称
# info_html = session.get(url=info_url,headers=header).text
# info = "".join(re.findall('<span class="user-name text-bold-600">(.*?)</span>', info_html, re.S))
# 获取之前的流量
remain_html = session.get(url=user_url,headers=header).text
#之前剩余流量
remain = re.findall('<span class="counter">(.*?)</span> GB', remain_html, re.S);
# 进行签到
result = json.loads(session.post(url=check_url,headers=header).text)
print(result['msg'])
content = result['msg']
#签到后获取剩余总流量
total_html = session.get(url = user_url,headers = header).text;
total = re.findall('<span class="counter">(.*?)</span> GB', total_html, re.S);
# 进行推送
content = email + '\n签到前剩余总流量: ' + remain[0] + 'GB\n' + content + '\n当前剩余总流量: ' + total[0] + 'GB';
push(content)
except:
content = '签到失败'
print(content)
push(content)
total_html = session.get(url = user_url,headers = header).text;
total = re.findall('<span class="counter">(.*?)</span> GB', total_html, re.S);
content = '签到失败' + ',当前剩余总流量: ' + total + "GB"
print(content);
push(content);

0 comments on commit da1191f

Please sign in to comment.