Revert to old get args method

This commit is contained in:
y1ndan 2021-01-04 19:32:07 +08:00
parent b9488f5c7a
commit 2ec09677e8
3 changed files with 8 additions and 11 deletions

View File

@ -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'

View File

@ -48,9 +48,7 @@ Genshin Impact Helper 可以自动化为你获取原神每日福利。
![fork](https://i.loli.net/2020/10/28/qpXowZmIWeEUyrJ.png) ![fork](https://i.loli.net/2020/10/28/qpXowZmIWeEUyrJ.png)
- 打开`Fork`后的仓库,将仓库默认分支设置为 master 分支 - 将仓库默认分支设置为 master 分支
![default-master](https://i.loli.net/2021/01/04/eRYf8hTAvcOQnBI.jpg)
### 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 值,即可开启订阅推送
## ❗️协议 ## ❗️协议

View File

@ -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()