Browse Source

葫芦侠

pull/15/head
张洛 3 years ago
parent
commit
32109b0e31
  1. 5
      checksendNotify.py
  2. 2
      hlx.py
  3. 4
      wzyd.py

5
checksendNotify.py

@ -16,10 +16,11 @@ def message2telegram(tg_api_host, tg_proxy, tg_bot_token, tg_user_id, content):
} }
else: else:
proxies = None proxies = None
if requests.post(url=url, data=send_data, proxies=proxies) == 200: try :
requests.post(url=url, data=send_data, proxies=proxies)
print("推送成功") print("推送成功")
return 1 return 1
else: except:
print("推送失败") print("推送失败")
return 0 return 0

2
hlx.py

@ -101,7 +101,7 @@ def start():
if "hlx_username" in os.environ and "hlx_password" in os.environ: if "hlx_username" in os.environ and "hlx_password" in os.environ:
print('已经在环境中找到用户名和密码,开始执行程序') print('已经在环境中找到用户名和密码,开始执行程序')
res = hlx(os.environ['hlx_username'], os.environ['hlx_password']) res = hlx(os.environ['hlx_username'], os.environ['hlx_password'])
result = f' \'{scriptName}\'' + f' \'{res}\'' result = f' {scriptName} \n {res}'
send(result) send(result)
else: else:
print('未找到用户名和密码停止执行') print('未找到用户名和密码停止执行')

4
wzyd.py

@ -3,7 +3,7 @@ import json
import os import os
import time import time
from urllib import parse from urllib import parse
from checksendNotify import send
import requests import requests
@ -41,4 +41,4 @@ if __name__ == "__main__":
print('王者营地签到开始') print('王者营地签到开始')
text = WZYDCheckIn(check_item=os.environ).main() text = WZYDCheckIn(check_item=os.environ).main()
localtime = time.asctime( time.localtime(time.time()) ) localtime = time.asctime( time.localtime(time.time()) )
send(f'当前时间{localtime}\n结果:{text}')

Loading…
Cancel
Save