bug修复完成
This commit is contained in:
parent
ff9d8bfd1a
commit
e55a5b52ec
5
.github/workflows/AutoSignin.yml
vendored
5
.github/workflows/AutoSignin.yml
vendored
|
@ -30,8 +30,3 @@ jobs:
|
||||||
- name: Run script
|
- name: Run script
|
||||||
run: |
|
run: |
|
||||||
python3 main.py "${{ secrets.cookie }}" "${{ secrets.teleid }}" "${{ secrets.teletoken }}"
|
python3 main.py "${{ secrets.cookie }}" "${{ secrets.teleid }}" "${{ secrets.teletoken }}"
|
||||||
- name: remove var
|
|
||||||
run: |
|
|
||||||
rm cookie.txt
|
|
||||||
rm teleid.txt
|
|
||||||
rm teletoken.txt
|
|
||||||
|
|
16
main.py
16
main.py
|
@ -9,16 +9,6 @@ current='https://n.cg.163.com/api/v2/client-settings/@current'
|
||||||
cookie=''
|
cookie=''
|
||||||
teleid=0
|
teleid=0
|
||||||
teletoken=''
|
teletoken=''
|
||||||
# try:
|
|
||||||
# with open('cookie.txt','r') as f:
|
|
||||||
# cookie=f.read()
|
|
||||||
# f.close
|
|
||||||
# except FileNotFoundError as e:
|
|
||||||
# print('[网易云游戏自动签到]无法读取Cookie,请检查是否正确设置Cookie!错误回显为:\n{}'.format(e))
|
|
||||||
# sys.exit()
|
|
||||||
# except Exception as e:
|
|
||||||
# print('[网易云游戏自动签到]无法读取Cookie,回显为\n{}'.format(e))
|
|
||||||
# sys.exit()
|
|
||||||
if len(sys.argv)==1:
|
if len(sys.argv)==1:
|
||||||
print('[网易云游戏自动签到]未设置cookie,正在退出……')
|
print('[网易云游戏自动签到]未设置cookie,正在退出……')
|
||||||
elif len(sys.argv)==2:
|
elif len(sys.argv)==2:
|
||||||
|
@ -81,12 +71,6 @@ def send(id,message):
|
||||||
bot.sendMessage(id, message, parse_mode=None, disable_web_page_preview=None, disable_notification=None, reply_to_message_id=None, reply_markup=None)
|
bot.sendMessage(id, message, parse_mode=None, disable_web_page_preview=None, disable_notification=None, reply_to_message_id=None, reply_markup=None)
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
print(cookie)
|
|
||||||
print(teleid)
|
|
||||||
print(teletoken)
|
|
||||||
if cookie=='':
|
|
||||||
print('[网易云游戏自动签到]未设置Cookie!正在退出……')
|
|
||||||
sys.exit()
|
|
||||||
me=getme(current,getheader)
|
me=getme(current,getheader)
|
||||||
if(me.status_code!=200):
|
if(me.status_code!=200):
|
||||||
message='[网易云游戏自动签到]签到失败!请检查Cookie是否过期!或者附上报错信息到 https://github.com/GamerNoTitle/wyycg-autosignin/issues 发起issue'
|
message='[网易云游戏自动签到]签到失败!请检查Cookie是否过期!或者附上报错信息到 https://github.com/GamerNoTitle/wyycg-autosignin/issues 发起issue'
|
||||||
|
|
Loading…
Reference in New Issue
Block a user