debug
This commit is contained in:
parent
6c9c618aa0
commit
db332f04f2
3
.github/workflows/AutoSignin.yml
vendored
3
.github/workflows/AutoSignin.yml
vendored
|
@ -29,12 +29,11 @@ jobs:
|
|||
pip install -r requirements.txt
|
||||
- name: set var
|
||||
run: |
|
||||
echo ${{ secrets.cookie }} > cookie.txt
|
||||
echo ${{ secrets.teleid }} > teleid.txt
|
||||
echo ${{ secrets.teletoken }} > teletoken.txt
|
||||
- name: Run script
|
||||
run: |
|
||||
python3 main.py
|
||||
python3 main.py ${{ secrets.cookie }}
|
||||
- name: remove var
|
||||
run: |
|
||||
rm cookie.txt
|
||||
|
|
22
main.py
22
main.py
|
@ -9,16 +9,18 @@ current='https://n.cg.163.com/api/v2/client-settings/@current'
|
|||
cookie=''
|
||||
teleid=0
|
||||
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()
|
||||
# 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()
|
||||
|
||||
cookie=sys.argv[1]
|
||||
|
||||
try:
|
||||
with open('teleid.txt','r') as f:
|
||||
|
|
Loading…
Reference in New Issue
Block a user