commit
4589cce4e8
4
.github/workflows/AutoSignin.yml
vendored
4
.github/workflows/AutoSignin.yml
vendored
|
@ -10,7 +10,7 @@ on:
|
||||||
# branches:
|
# branches:
|
||||||
# - master
|
# - master
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "0 2 * * *"
|
- cron: "0 0 * * *"
|
||||||
watch:
|
watch:
|
||||||
types: [started]
|
types: [started]
|
||||||
|
|
||||||
|
@ -30,4 +30,4 @@ jobs:
|
||||||
pip install -r requirements.txt
|
pip install -r requirements.txt
|
||||||
- name: Run script
|
- name: Run script
|
||||||
run: |
|
run: |
|
||||||
python3 main.py "${{ secrets.cookie }}" "${{ secrets.teleid }}" "${{ secrets.teletoken }}" "${{ secrets.SCKEY }}"
|
python3 main.py "${{ secrets.cookie }}" "${{ secrets.teleid }}" "${{ secrets.teletoken }}" "${{ secrets.SCKEY }}" "${{ secrets.QQKEY }}"
|
||||||
|
|
10
README.md
10
README.md
|
@ -111,6 +111,12 @@
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
### QQKEY获取
|
||||||
|
|
||||||
|
访问[CoolPush官网](https://cp.xuthus.cc/),使用任一方式登录,在`调用代码Skey`可以看到你的KEY
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
## 脚本更新
|
## 脚本更新
|
||||||
|
|
||||||
### 自动更新
|
### 自动更新
|
||||||
|
@ -194,3 +200,7 @@
|
||||||
## 历史STAR
|
## 历史STAR
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
## 免责声明
|
||||||
|
|
||||||
|
使用本脚本造成的封号或任何违反相关法律法规造成的任何责任,由使用者自行承担,开发者不担负任何责任!
|
||||||
|
|
28
main.py
28
main.py
|
@ -5,6 +5,7 @@ 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'
|
||||||
|
|
||||||
|
@ -13,6 +14,7 @@ cookies = sys.argv[1].split('#')
|
||||||
teleid = sys.argv[2]
|
teleid = sys.argv[2]
|
||||||
teletoken = sys.argv[3]
|
teletoken = sys.argv[3]
|
||||||
sckey = sys.argv[4]
|
sckey = sys.argv[4]
|
||||||
|
qqkey = sys.argv[5]
|
||||||
|
|
||||||
if cookies == "":
|
if cookies == "":
|
||||||
print('[网易云游戏自动签到]未设置cookie,正在退出……')
|
print('[网易云游戏自动签到]未设置cookie,正在退出……')
|
||||||
|
@ -22,10 +24,12 @@ if teleid != "" and teletoken != "":
|
||||||
bot = telepot.Bot(teletoken)
|
bot = telepot.Bot(teletoken)
|
||||||
if sckey != "":
|
if sckey != "":
|
||||||
sc_enable = True
|
sc_enable = True
|
||||||
|
if qqkey != "":
|
||||||
|
qq_enable = True
|
||||||
|
|
||||||
|
|
||||||
class Error(Exception):
|
class ScriptRunError(Exception):
|
||||||
pass
|
print("[网易云游戏自动签到]脚本运行错误,具体请参见日志!")
|
||||||
|
|
||||||
|
|
||||||
def signin(url, cookie):
|
def signin(url, cookie):
|
||||||
|
@ -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,20 @@ 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}
|
||||||
|
GamerNoTitle: https://bili33.top
|
||||||
|
网易云游戏自动签到脚本: https://github.com/GamerNoTitle/wyycg-autocheckin
|
||||||
|
'''.format(len(success), len(failure), len(cookies), outputmsg)
|
||||||
|
|
||||||
scsend(sckey, scinfomsg)
|
|
||||||
send(teleid, teleinfomsg)
|
send(teleid, teleinfomsg)
|
||||||
|
scsend(sckey, scinfomsg)
|
||||||
|
qqsend(qqkey, qqinfomsg)
|
||||||
print(teleinfomsg)
|
print(teleinfomsg)
|
||||||
if (len(failure) != 0):
|
if (len(failure) != 0):
|
||||||
raise Error
|
raise ScriptRunError
|
||||||
|
|
Loading…
Reference in New Issue
Block a user