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
|
pip install -r requirements.txt
|
||||||
- name: set var
|
- name: set var
|
||||||
run: |
|
run: |
|
||||||
echo ${{ secrets.cookie }} > cookie.txt
|
|
||||||
echo ${{ secrets.teleid }} > teleid.txt
|
echo ${{ secrets.teleid }} > teleid.txt
|
||||||
echo ${{ secrets.teletoken }} > teletoken.txt
|
echo ${{ secrets.teletoken }} > teletoken.txt
|
||||||
- name: Run script
|
- name: Run script
|
||||||
run: |
|
run: |
|
||||||
python3 main.py
|
python3 main.py ${{ secrets.cookie }}
|
||||||
- name: remove var
|
- name: remove var
|
||||||
run: |
|
run: |
|
||||||
rm cookie.txt
|
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=''
|
cookie=''
|
||||||
teleid=0
|
teleid=0
|
||||||
teletoken=''
|
teletoken=''
|
||||||
try:
|
# try:
|
||||||
with open('cookie.txt','r') as f:
|
# with open('cookie.txt','r') as f:
|
||||||
cookie=f.read()
|
# cookie=f.read()
|
||||||
f.close
|
# f.close
|
||||||
except FileNotFoundError as e:
|
# except FileNotFoundError as e:
|
||||||
print('[网易云游戏自动签到]无法读取Cookie,请检查是否正确设置Cookie!错误回显为:\n{}'.format(e))
|
# print('[网易云游戏自动签到]无法读取Cookie,请检查是否正确设置Cookie!错误回显为:\n{}'.format(e))
|
||||||
sys.exit()
|
# sys.exit()
|
||||||
except Exception as e:
|
# except Exception as e:
|
||||||
print('[网易云游戏自动签到]无法读取Cookie,回显为\n{}'.format(e))
|
# print('[网易云游戏自动签到]无法读取Cookie,回显为\n{}'.format(e))
|
||||||
sys.exit()
|
# sys.exit()
|
||||||
|
|
||||||
|
cookie=sys.argv[1]
|
||||||
|
|
||||||
try:
|
try:
|
||||||
with open('teleid.txt','r') as f:
|
with open('teleid.txt','r') as f:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user