Revert to old get args method
This commit is contained in:
parent
b9488f5c7a
commit
2ec09677e8
2
.github/workflows/main.yml
vendored
2
.github/workflows/main.yml
vendored
@ -43,5 +43,5 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
pip install -r requirements.txt
|
pip install -r requirements.txt
|
||||||
echo '${{ secrets.COOKIE }}' | tr '#' '\n' | sed 's/^/-c &/g' | sed 's/$/&${{ secrets.SCKEY }}/g' | xargs -I {} sh -c 'echo "{}" | python3 ./genshin.py'
|
echo '${{ secrets.COOKIE }}' | tr '#' '\n' | sed 's/$/&#${{ secrets.SCKEY }}/g' | xargs -I {} sh -c 'echo "{}" | python3 ./genshin.py'
|
||||||
|
|
||||||
|
|||||||
@ -48,9 +48,7 @@ Genshin Impact Helper 可以自动化为你获取原神每日福利。
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
- 打开`Fork`后的仓库,将仓库默认分支设置为 master 分支
|
- 将仓库默认分支设置为 master 分支
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
### 2. 获取 Cookie
|
### 2. 获取 Cookie
|
||||||
|
|
||||||
@ -155,7 +153,7 @@ Error: Process completed with exit code 255.
|
|||||||
- 使用 GitHub 登录 [sc.ftqq.com](http://sc.ftqq.com/?c=github&a=login) 创建账号
|
- 使用 GitHub 登录 [sc.ftqq.com](http://sc.ftqq.com/?c=github&a=login) 创建账号
|
||||||
- 点击「[发送消息](http://sc.ftqq.com/?c=code)」,获取`SCKEY`
|
- 点击「[发送消息](http://sc.ftqq.com/?c=code)」,获取`SCKEY`
|
||||||
- 点击「[微信推送](http://sc.ftqq.com/?c=wechat&a=bind)」,完成微信绑定
|
- 点击「[微信推送](http://sc.ftqq.com/?c=wechat&a=bind)」,完成微信绑定
|
||||||
- 建立名为`SCKEY`的 secret,并添加获取的 SCKEY 值,即可开启订阅推送。注意必须加上`-s`,例子:`-s <SCKEY>`
|
- 建立名为`SCKEY`的 secret,并添加获取的 SCKEY 值,即可开启订阅推送
|
||||||
|
|
||||||
## ❗️协议
|
## ❗️协议
|
||||||
|
|
||||||
|
|||||||
11
genshin.py
11
genshin.py
@ -278,11 +278,10 @@ def notify(sckey, status, message):
|
|||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
parser = argparse.ArgumentParser()
|
secret = input().strip().split('#')
|
||||||
parser.add_argument('-c', '--cookie', required=True, type=str, default='')
|
secret.append('')
|
||||||
parser.add_argument('-s', '--sckey', type=str, default='')
|
cookie = secret[0]
|
||||||
args = parser.parse_args()
|
sckey = secret[1]
|
||||||
sckey = args.sckey
|
|
||||||
|
|
||||||
Sign(args.cookie).run()
|
Sign(cookie).run()
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user