Commit a3031c6 1 parent a338b61 commit a3031c6 Copy full SHA for a3031c6
File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -67,17 +67,17 @@ def push(content):
67
67
total_html = session .get (url = user_url ,headers = header ).text ;
68
68
total = re .findall ('<span class="counter">(.*?)</span> GB' , total_html , re .S );
69
69
# 进行推送
70
- content = email + '\n 签到前剩余总流量: ' + remain [0 ] + 'GB\n ' + content + '\n 当前剩余总流量: ' + total [0 ] + 'GB\n ' ;
70
+ content = email + '\n 签到前剩余总流量: ' + remain [0 ] if len ( remain ) > 0 else "NULL " + 'GB\n ' + content + '\n 当前剩余总流量: ' + total [0 ] if len ( total ) > 0 else "NULL " + 'GB\n ' ;
71
71
#push(content)
72
72
res += content
73
73
except :
74
74
total_html = session .get (url = user_url ,headers = header ).text ;
75
75
total = re .findall ('<span class="counter">(.*?)</span> GB' , total_html , re .S );
76
76
print (email ,passwd )
77
- content = email + ' 签到失败' + ',当前剩余总流量: ' + total + "GB\n "
77
+ content = email + ' 签到失败' + ',当前剩余总流量: ' + total [ 0 ] if len ( total ) > 0 else "NULL " + "GB\n "
78
78
print (content );
79
79
#push(content);
80
80
res += content
81
81
82
82
#最后统一推送
83
- push (res )
83
+ push (res )
You can’t perform that action at this time.
0 commit comments