加入酷Q推送
This commit is contained in:
parent
91b1f62779
commit
79cec13090
32
main.py
32
main.py
|
@ -5,23 +5,27 @@ import telepot
|
||||||
|
|
||||||
tele_enable = False
|
tele_enable = False
|
||||||
sc_enable = False
|
sc_enable = False
|
||||||
|
qq_enable = False
|
||||||
sign_url = 'https://n.cg.163.com/api/v2/sign-today'
|
sign_url = 'https://n.cg.163.com/api/v2/sign-today'
|
||||||
current = 'https://n.cg.163.com/api/v2/client-settings/@current'
|
current = 'https://n.cg.163.com/api/v2/client-settings/@current'
|
||||||
|
|
||||||
|
|
||||||
cookies = sys.argv[1].split('#')
|
cookies = sys.argv[1].split('#')
|
||||||
teleid = sys.argv[2]
|
switchpush = sys.argv[2]
|
||||||
teletoken = sys.argv[3]
|
pushkey = sys.argv[3]
|
||||||
sckey = sys.argv[4]
|
teleid = sys.argv[3]
|
||||||
|
teletoken = sys.argv[4]
|
||||||
|
|
||||||
if cookies == "":
|
if cookies == "":
|
||||||
print('[网易云游戏自动签到]未设置cookie,正在退出……')
|
print('[网易云游戏自动签到]未设置cookie,正在退出……')
|
||||||
sys.exit()
|
sys.exit()
|
||||||
if teleid != "" and teletoken != "":
|
if switchpush == "1": #微信推送
|
||||||
|
sc_enable = True
|
||||||
|
elif switchpush == "2": #qq推送
|
||||||
|
qq_enable = True
|
||||||
|
elif switchpush == "3": #telegram推送
|
||||||
tele_enable = True
|
tele_enable = True
|
||||||
bot = telepot.Bot(teletoken)
|
bot = telepot.Bot(teletoken)
|
||||||
if sckey != "":
|
|
||||||
sc_enable = True
|
|
||||||
|
|
||||||
|
|
||||||
class Error(Exception):
|
class Error(Exception):
|
||||||
|
@ -81,6 +85,11 @@ def scsend(SCKEY, message):
|
||||||
if sc_enable:
|
if sc_enable:
|
||||||
r.get(url=sc_url)
|
r.get(url=sc_url)
|
||||||
|
|
||||||
|
def qqsend(QQKEY, message):
|
||||||
|
qq_url = 'https://push.xuthus.cc/send/{}?c=网易云游戏自动签到脚本\n{}'.format(QQKEY, message)
|
||||||
|
if qq_enable:
|
||||||
|
r.get(url=qq_url)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
print('检测到{}个账号,即将开始签到!'.format(len(cookies)))
|
print('检测到{}个账号,即将开始签到!'.format(len(cookies)))
|
||||||
|
@ -145,9 +154,18 @@ if __name__ == "__main__":
|
||||||
GamerNoTitle: https://bili33.top
|
GamerNoTitle: https://bili33.top
|
||||||
网易云游戏自动签到脚本: https://github.com/GamerNoTitle/wyycg-autocheckin
|
网易云游戏自动签到脚本: https://github.com/GamerNoTitle/wyycg-autocheckin
|
||||||
'''.format(len(success), len(failure), len(cookies), outputmsg)
|
'''.format(len(success), len(failure), len(cookies), outputmsg)
|
||||||
|
qqinfomsg = '''
|
||||||
|
感谢使用来自bili33.top GamerNoTitle的网易云游戏自动签到脚本
|
||||||
|
今日签到结果如下:
|
||||||
|
成功数量:{0}-{2}
|
||||||
|
失败数量:{1}-{2}
|
||||||
|
具体情况如下:
|
||||||
|
{3}
|
||||||
|
'''.format(len(success), len(failure), len(cookies), outputmsg)
|
||||||
|
|
||||||
scsend(sckey, scinfomsg)
|
|
||||||
send(teleid, teleinfomsg)
|
send(teleid, teleinfomsg)
|
||||||
|
scsend(pushkey, scinfomsg)
|
||||||
|
qqsend(pushkey, qqinfomsg)
|
||||||
print(teleinfomsg)
|
print(teleinfomsg)
|
||||||
if (len(failure) != 0):
|
if (len(failure) != 0):
|
||||||
raise Error
|
raise Error
|
||||||
|
|
Loading…
Reference in New Issue
Block a user