Compare commits

...

10 Commits

Author SHA1 Message Date
Pesy Wu
d9fa176619
Uodate mirror repo link 2024-01-30 16:21:00 +08:00
Pesy Wu
d13d2d4268
Create MirrorSync.yml 2024-01-18 12:24:24 +08:00
Pesy Wu
cf6a092602
qinglong panel bug fixed 2023-03-03 17:48:39 +08:00
Pesy Wu
eb4cfccde4
Qinglong Panel Support 2023-03-03 17:47:15 +08:00
Pesy Wu
78861c14d4
Update AutoSignin.yml.disabled 2023-02-18 10:04:36 +08:00
Pesy Wu
f527d9638b
Update README.md 2023-02-18 10:04:01 +08:00
Pesy Wu
23d5a2a0ba
Update AutoSignin.yml.disabled 2023-02-08 22:43:27 +08:00
Pesy Wu
4cd64cc45f
Update README.md 2023-02-08 17:21:53 +08:00
Pesy Wu
4d7aa28f70
Rename KeepAlive.yml to KeepAlive.yml.disabled 2023-02-05 12:03:38 +08:00
Pesy Wu
3d55db004f
Rename AutoSignin.yml to AutoSignin.yml.disabled 2023-02-05 12:03:20 +08:00
5 changed files with 156 additions and 66 deletions

View File

@ -17,14 +17,13 @@ on:
jobs:
build:
runs-on: ubuntu-latest
if: github.event.repository.owner.id == github.event.sender.id # 自己点的 start
steps:
- name: Checkout
uses: actions/checkout@master
- name: Set up Python #安装python
uses: actions/setup-python@v1
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: '3.10'
- name: Install requirements #安装轮子
run: |
pip install -r requirements.txt

21
.github/workflows/MirrorSync.yml vendored Normal file
View File

@ -0,0 +1,21 @@
name: 'SyncMirror'
on:
workflow_dispatch:
push:
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: 'Checkout codes'
uses: actions/checkout@v2
- name: 'Sync'
id: commit
run: |
git fetch --unshallow
git checkout master
git remote add gitea https://${{ secrets.GITEA_USERNAME }}:${{ secrets.GITEA_PASSWORD }}@git.bili33.top/GamerNoTitle/wyycg-AutoCheckin.git
git push gitea master

View File

@ -2,7 +2,7 @@
请注意关于LICENSE在Apache-2.0的基础上增加一条:**禁止上传到CSDN等网站盈利禁止放在某宝某鱼等平台贩卖**,否则官方找上门就**删库跑路**
**本脚本从[@GamerNoTitle](https://github.com/GamerNoTitle)出Fork而来源仓库已于2021.5.19删除(我也不知道为什么本仓库会成为源仓库,理论上应该所有人都是源仓库才对),具体请参照[关于得知Github查封Action仓库的信息后我自行删除脚本的这档事 #2](https://github.com/GamerNoTitle/GamerNoTitle/discussions/2)**
仓库被封了就来这里找https://git.bili33.top/GamerNoTitle/wyycg-AutoCheckin
本脚本通过使用Github Action来进行[网易云游戏](https://cloudgame.webapp.163.com/newer.html?invite_code=2ZLPWY)签到操作,让你能够天天白嫖网易云游戏时长和云电脑!
@ -22,9 +22,9 @@
## 目录
- [使用方法](#使用方法)
- [保活策略](#保活策略)
- ~~[保活策略](#保活策略)~~
- [变量获取](#变量内容获取)
- [脚本更新](#脚本更新)
- ~~[脚本更新](#脚本更新)~~
- [Q&A](#qa)
## 使用方法
@ -33,7 +33,7 @@
1、Fork本仓库按右上角的分支按钮如图
![](https://upimage.alexhchu.com/2020/11/22/e9b4bcf8e6a1d.png)
![](https://img-blog.csdnimg.cn/img_convert/66fab88923e92003e3afa44206b4bd24.png)
2、进入设置设置变量`cookie`和`teleid` `teletoken` `SCKEY` `QQKEY` `PPKEY`(这五个可选,但是`teleid`和`teletoken`要用的话就得两个都要配置!)
@ -43,11 +43,11 @@
[如何获取变量内容?请点这里](#变量内容获取)
![](https://upimage.alexhchu.com/2020/11/22/988724b77ca62.png)
![](https://img-blog.csdnimg.cn/img_convert/6f1fe236f0738619a72c51f66602c200.png)
![](https://upimage.alexhchu.com/2020/11/22/a7958e9f5582f.png)
![](https://img-blog.csdnimg.cn/img_convert/a061b20e2e7ba6469815da4bdc1ead4d.png)
![](https://upimage.alexhchu.com/2020/11/22/7213627d41fc1.png)
![](https://img-blog.csdnimg.cn/img_convert/fced676544526af044e9ad985b77b8ca.png)
### 测试脚本
@ -55,35 +55,23 @@
我们先进入Action界面启用Action
![](https://upimage.alexhchu.com/2020/11/22/70dd262ae54f0.png)
![](https://img-blog.csdnimg.cn/img_convert/ca2490f2f7ccd525598e75fe9c2d79a8.png)
然后我们进入对应的脚本,启用脚本,并进行测试
![](https://upimage.alexhchu.com/2020/11/22/457403bb7d3bb.png)
![](https://img-blog.csdnimg.cn/img_convert/2451e76e03508ce7c852b3a226d8d599.png)
除了点STAR进行启动以外你也可以点击右边那个白白的按钮来启动
![](https://upimage.alexhchu.com/2021/01/09/49ef24f93434e.png)
~~除了点STAR进行启动以外~~现在STAR启动不了了你也可以点击右边那个白白的按钮来启动
**只要测试通过就是没问题如果你配置了TELEGRAM还会收到你的BOT给你发送的消息**
测试通过后你还需要创建保活需要用到的Github Token详情可以看[保活策略](#保活策略)这一节(其实就在下面撒)
## 保活策略
## ~~保活策略~~ 新版Action可跳过但是在设置里面的Action权限要放行写入权限
因为Github Action在仓库60天内没有任何Push的时候会禁用你的Action这时候我们就要进行保活
保活Action已经写好了但是这里有一些步骤是需要你进行的请看下面的图片生成GITHUB_TOKEN以便让脚本造成的更改能够正常推送入你的仓库
![](https://upimage.alexhchu.com/2020/12/27/dce7070ae625c.png)
![](https://upimage.alexhchu.com/2020/12/27/f82f6505503ed.png)
![](https://upimage.alexhchu.com/2020/12/27/9cff0436399b7.png)
到这里勾选完以后点绿绿的Generate token就可以了
**请注意你无需在仓库的secrets内设置名为`GITHUB_TOKEN`的变量,该名称本身就是指定为自己账户下名为`GITHUB_TOKEN`的密钥如果你在仓库的secrets内设置将会被Github提示无效**
保活Action已经写好了~~但是这里有一些步骤是需要你进行的请看下面的图片生成GITHUB_TOKEN以便让脚本造成的更改能够正常推送入你的仓库~~
## 变量内容获取
@ -95,20 +83,16 @@
**如果使用多用户多个cookie请使用`#`分隔**
![](https://upimage.alexhchu.com/2020/11/22/bfb0e2dbd347a.png)
![](https://img-blog.csdnimg.cn/img_convert/8916bfbda33b93061206f2571665987d.png)
### teleid获取
用你的Telegram找到@userinfobot点个Start会直接给你回复你的ID复制下id后面的数字就是teleid了
![](https://upimage.alexhchu.com/2020/11/22/e4c50250626a6.png)
### teletoken获取
找@BotFather进行机器人的创建按照提示创建即可会给你一个API TOKEN如果一不小心点过去了可以用命令`/mybots`管理自己的bot找到自己想要使用的bot并获取API就可以了
![](https://upimage.alexhchu.com/2020/11/22/0428751a3925e.png)
### SCKEY获取
访问[ServerChanTurbo官网](https://sct.ftqq.com/)并用你的微信扫码登陆获取推送用的KEY即可因为我没有使用这个推送方法所以没有图
@ -129,40 +113,6 @@
访问[PushPlus官网](http://pushplus.hxtrip.com/),使用微信登录,直接在[一对一推送](http://pushplus.hxtrip.com/message)复制自己的Token填入变量即可
![](https://upimage.alexhchu.com/2021/02/08/c8d1898ca8de5.png)
## 脚本更新
### 自动更新
[点击这里](https://github.com/apps/pull)安装插件可以选择所有仓库也可以指选择你Fork的仓库当然至少要选择fork的仓库对吧要不然怎么更新然后不管它就好了
详细步骤可以看下面的图片
![](https://upimage.alexhchu.com/2020/12/26/4c0d02795a38c.png)
![](https://upimage.alexhchu.com/2020/12/26/1800e5609a365.png)
![](https://upimage.alexhchu.com/2020/12/26/29ffcfd4fd8b0.png)
如果你完成了上面的步骤,就可以不管它了,自动更新会自己进行(除非有`Merge Conflict`
### 手动更新
在自己的仓库中创建一个pull requests上游右边的选择本仓库GamerNoTitle/wyycg-autocheckin的master分支左边选择自己的仓库然后创建PR并Merge即可
具体可以看下面的图片
![](https://upimage.alexhchu.com/2020/12/26/660bffa186f57.png)
![](https://upimage.alexhchu.com/2020/12/26/b90770108e301.png)
![](https://upimage.alexhchu.com/2020/12/26/da988092d8556.png)
![](https://upimage.alexhchu.com/2020/12/26/444ca5bc88093.png)
![](https://upimage.alexhchu.com/2020/12/26/db022886a1c5f.png)
## Q&A
## 返回值400并附带一串不知道什么鬼的字符串

120
qinglong/qinglong.py Normal file
View File

@ -0,0 +1,120 @@
import sys
import requests as r
import json
import os
tele_enable = False
sc_enable = False
qq_enable = False
pp_enable = False
sign_url = 'https://n.cg.163.com/api/v2/sign-today'
current = 'https://n.cg.163.com/api/v2/client-settings/@current'
cookies = os.environ.get('wyycg_cookies').split('#')
if cookies == "" or cookies == []:
print('[网易云游戏自动签到]未设置cookie正在退出……')
sys.exit()
class ScriptRunError(Exception):
print("[网易云游戏自动签到]脚本运行错误,具体请参见日志!")
def signin(url, cookie):
header = {
'Accept': 'application/json, text/plain, */*',
'Accept-Encoding': 'gzip, deflate, br',
'Accept-Language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7,ja-JP;q=0.6,ja;q=0.5',
'Authorization': str(cookie),
'Connection': 'keep-alive',
'Content-Length': '0',
'Host': 'n.cg.163.com',
'Origin': 'https://cg.163.com',
'Referer': 'https://cg.163.com/',
'Sec-Fetch-Dest': 'empty',
'Sec-Fetch-Mode': 'cors',
'Sec-Fetch-Site': 'same-site',
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36',
'X-Platform': '0'
}
result = r.post(url=url, headers=header)
return result
def getme(url, cookie):
header = {
'Host': 'n.cg.163.com',
'Connection': 'keep-alive',
'Accept': 'application/json, text/plain, */*',
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36',
'X-Platform': '0',
'Authorization': str(cookie),
'Origin': 'https://cg.163.com',
'Sec-Fetch-Site': 'same-site',
'Sec-Fetch-Mode': 'cors',
'Sec-Fetch-Dest': 'empty',
'Referer': 'https://cg.163.com/',
'Accept-Encoding': 'gzip, deflate, br',
'Accept-Language': 'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7,ja-JP;q=0.6,ja;q=0.5'
}
result = r.get(url=url, headers=header)
return result
if __name__ == "__main__":
print('检测到{}个账号,即将开始签到!'.format(len(cookies)))
success = []
failure = []
msg = []
for i in cookies:
cookie = i
autherror = False
signerror = False
sign_return = None
me = None
try:
me = getme(current, cookie)
except:
message = '{}个账号验证失败请检查Cookie是否过期或者附上报错信息到 https://github.com/GamerNoTitle/wyycg-autosignin/issues 发起issue'.format(
cookies.index(i) + 1)
failure.append(cookie)
msg.append(message)
autherror = True
if me.status_code != 200 and not autherror:
message = '{}个账号验证失败请检查Cookie是否过期或者附上报错信息到 https://github.com/GamerNoTitle/wyycg-autosignin/issues 发起issue'.format(
cookies.index(i) + 1)
failure.append(cookie)
msg.append(message)
elif me.status_code == 200:
try:
sign_return = signin(sign_url, cookie)
except:
message = '{}个账号签到失败,回显状态码为{},具体错误信息如下:{}'.format(cookies.index(i) + 1, sign_return.status_code, sign_return.text)
failure.append(cookie)
msg.append(message)
signerror = True
if sign_return.status_code == 200:
message = '{}个账号签到成功!'.format(cookies.index(i) + 1)
success.append(cookie)
msg.append(message)
elif not signerror:
message = '{}个账号签到失败,回显状态码为{},具体错误信息如下:{}'.format(cookies.index(i) + 1, sign_return.status_code, sign_return.text)
failure.append(cookie)
msg.append(message)
outputmsg = str(msg).replace("[", '').replace(']', '').replace(',', '<br>').replace('\'', '')
teleinfomsg = '''
感谢使用来自GamerNoTitle的网易云游戏自动签到脚本
今日签到结果如下
成功数量{0}/{2}
失败数量{1}/{2}
具体情况如下
{3}
GamerNoTitle: https://bili33.top
网易云游戏自动签到脚本: https://github.com/GamerNoTitle/wyycg-autocheckin
'''.format(len(success), len(failure), len(cookies), outputmsg)
print(teleinfomsg)
if (len(failure) != 0):
raise ScriptRunError