|
|
@ -1,11 +1,11 @@ |
|
|
|
# -*- coding: utf-8 -*- |
|
|
|
# -*- coding: utf-8 -*- |
|
|
|
# 20 10 * * * |
|
|
|
|
|
|
|
import json |
|
|
|
import json |
|
|
|
import os |
|
|
|
import os |
|
|
|
import time |
|
|
|
|
|
|
|
from urllib import parse |
|
|
|
from urllib import parse |
|
|
|
from checksendNotify import send |
|
|
|
|
|
|
|
import requests |
|
|
|
import requests |
|
|
|
|
|
|
|
from getENV import getENv |
|
|
|
|
|
|
|
from checksendNotify import send |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class WZYDCheckIn: |
|
|
|
class WZYDCheckIn: |
|
|
@ -25,7 +25,7 @@ class WZYDCheckIn: |
|
|
|
return msg |
|
|
|
return msg |
|
|
|
|
|
|
|
|
|
|
|
def main(self): |
|
|
|
def main(self): |
|
|
|
wzyd_data = self.check_item |
|
|
|
wzyd_data = self.check_item.get("wzyd_data") |
|
|
|
data = {k: v[0] for k, v in parse.parse_qs(wzyd_data).items()} |
|
|
|
data = {k: v[0] for k, v in parse.parse_qs(wzyd_data).items()} |
|
|
|
try: |
|
|
|
try: |
|
|
|
user_id = data.get("userId", "") |
|
|
|
user_id = data.get("userId", "") |
|
|
@ -38,10 +38,10 @@ class WZYDCheckIn: |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__": |
|
|
|
if __name__ == "__main__": |
|
|
|
if 'wzyd' in os.environ: |
|
|
|
getENv() |
|
|
|
print('王者营地签到开始') |
|
|
|
with open("/ql/config/check.json", "r", encoding="utf-8") as f: |
|
|
|
text = WZYDCheckIn(check_item=os.environ.get('wzyd')).main() |
|
|
|
datas = json.loads(f.read()) |
|
|
|
localtime = time.asctime(time.localtime(time.time())) |
|
|
|
_check_item = datas.get("WZYD_DATA_LIST", [])[0] |
|
|
|
result=f'当前时间{localtime}\n结果:{text}' |
|
|
|
res = WZYDCheckIn(check_item=_check_item).main() |
|
|
|
send('王者营地签到',result) |
|
|
|
print(res) |
|
|
|
else:print('未找到变量请填入') |
|
|
|
send('王者营地', res) |
|
|
|