├── requirements.txt
├── UUID.txt
├── .github
├── workflows
│ ├── MirrorSync.yml
│ ├── AutoSignin.yml.disabled
│ └── KeepAlive.yml.disabled
└── FUNDING.yml
├── qinglong
└── qinglong.py
├── README.md
├── main.py
└── LICENSE
/requirements.txt:
--------------------------------------------------------------------------------
1 | requests
2 | telepot
--------------------------------------------------------------------------------
/UUID.txt:
--------------------------------------------------------------------------------
1 | 484f060f-1cfa-4d65-a8e3-aae2ca5c22b0
2 |
--------------------------------------------------------------------------------
/.github/workflows/MirrorSync.yml:
--------------------------------------------------------------------------------
1 | name: 'SyncMirror'
2 |
3 | on:
4 | workflow_dispatch:
5 | push:
6 |
7 | jobs:
8 | sync:
9 | runs-on: ubuntu-latest
10 | steps:
11 | - name: 'Checkout codes'
12 | uses: actions/checkout@v2
13 |
14 | - name: 'Sync'
15 | id: commit
16 | run: |
17 | git fetch --unshallow
18 | git checkout master
19 | git remote add gitea https://${{ secrets.GITEA_USERNAME }}:${{ secrets.GITEA_PASSWORD }}@git.bili33.top/GamerNoTitle/wyycg-AutoCheckin.git
20 | git push gitea master
21 |
22 |
--------------------------------------------------------------------------------
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | # These are supported funding model platforms
2 |
3 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4 | patreon: # Replace with a single Patreon username
5 | open_collective: # Replace with a single Open Collective username
6 | ko_fi: # Replace with a single Ko-fi username
7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9 | liberapay: # Replace with a single Liberapay username
10 | issuehunt: # Replace with a single IssueHunt username
11 | otechie: # Replace with a single Otechie username
12 | custom: ['https://afdian.net/@GamerNoTitle','https://paypal.me/GamerNoTitle','https://goto.bili33.top/WeChatPay','https://goto.bili33.top/Alipay'] # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
13 |
--------------------------------------------------------------------------------
/.github/workflows/AutoSignin.yml.disabled:
--------------------------------------------------------------------------------
1 | name: AutoCheckin
2 |
3 | on:
4 | workflow_dispatch:
5 | release:
6 | types: [published]
7 | push:
8 | tags:
9 | - 'v*'
10 | # branches:
11 | # - master
12 | schedule:
13 | - cron: "0 2 * * *"
14 | watch:
15 | types: [started]
16 |
17 | jobs:
18 | build:
19 | runs-on: ubuntu-latest
20 | steps:
21 | - name: Checkout
22 | uses: actions/checkout@master
23 | - name: Set up Python #安装python
24 | uses: actions/setup-python@v4
25 | with:
26 | python-version: '3.10'
27 | - name: Install requirements #安装轮子
28 | run: |
29 | pip install -r requirements.txt
30 | - name: Run script
31 | run: |
32 | python3 main.py "${{ secrets.cookie }}" "${{ secrets.teleid }}" "${{ secrets.teletoken }}" "${{ secrets.SCKEY }}" "${{ secrets.QQKEY }}" "${{ secrets.PPKEY }}"
33 |
--------------------------------------------------------------------------------
/.github/workflows/KeepAlive.yml.disabled:
--------------------------------------------------------------------------------
1 | name: 'KeepActionAlive'
2 |
3 | on:
4 | workflow_dispatch:
5 | schedule:
6 | - cron: '0 0 1 * *'
7 |
8 | jobs:
9 | auto_renew:
10 | runs-on: ubuntu-latest
11 | steps:
12 | - name: 'Checkout codes'
13 | uses: actions/checkout@v2
14 |
15 | - name: 'Avoid Github Workflow being suspended'
16 | run: echo $(cat /proc/sys/kernel/random/uuid) > UUID.txt
17 |
18 | - name: 'Commit Files'
19 | id: commit
20 | run: |
21 | git config --local user.email "action@github.com"
22 | git config --local user.name "GitHub Action"
23 | git add .
24 | git diff --quiet && git diff --staged --quiet || git commit -am '是否继续白嫖:[是] —— 继续白嫖成功!'
25 | echo ::set-output name=status::success
26 |
27 | - name: 'GitHub Push'
28 | if: steps.commit.output.status != 'success'
29 | uses: ad-m/github-push-action@v0.6.0
30 | with:
31 | github_token: ${{ secrets.GITHUB_TOKEN }}
32 | branch: ${{ github.ref }}
33 |
--------------------------------------------------------------------------------
/qinglong/qinglong.py:
--------------------------------------------------------------------------------
1 | import sys
2 | import requests as r
3 | import json
4 | import os
5 |
6 | tele_enable = False
7 | sc_enable = False
8 | qq_enable = False
9 | pp_enable = False
10 | sign_url = 'https://n.cg.163.com/api/v2/sign-today'
11 | current = 'https://n.cg.163.com/api/v2/client-settings/@current'
12 |
13 |
14 | cookies = os.environ.get('wyycg_cookies').split('#')
15 |
16 | if cookies == "" or cookies == []:
17 | print('[网易云游戏自动签到]未设置cookie,正在退出……')
18 | sys.exit()
19 |
20 | class ScriptRunError(Exception):
21 | print("[网易云游戏自动签到]脚本运行错误,具体请参见日志!")
22 |
23 |
24 | def signin(url, cookie):
25 | header = {
26 | 'Accept': 'application/json, text/plain, */*',
27 | 'Accept-Encoding': 'gzip, deflate, br',
28 | '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',
29 | 'Authorization': str(cookie),
30 | 'Connection': 'keep-alive',
31 | 'Content-Length': '0',
32 | 'Host': 'n.cg.163.com',
33 | 'Origin': 'https://cg.163.com',
34 | 'Referer': 'https://cg.163.com/',
35 | 'Sec-Fetch-Dest': 'empty',
36 | 'Sec-Fetch-Mode': 'cors',
37 | 'Sec-Fetch-Site': 'same-site',
38 | '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',
39 | 'X-Platform': '0'
40 | }
41 |
42 | result = r.post(url=url, headers=header)
43 | return result
44 |
45 |
46 | def getme(url, cookie):
47 | header = {
48 | 'Host': 'n.cg.163.com',
49 | 'Connection': 'keep-alive',
50 | 'Accept': 'application/json, text/plain, */*',
51 | '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',
52 | 'X-Platform': '0',
53 | 'Authorization': str(cookie),
54 | 'Origin': 'https://cg.163.com',
55 | 'Sec-Fetch-Site': 'same-site',
56 | 'Sec-Fetch-Mode': 'cors',
57 | 'Sec-Fetch-Dest': 'empty',
58 | 'Referer': 'https://cg.163.com/',
59 | 'Accept-Encoding': 'gzip, deflate, br',
60 | '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'
61 | }
62 | result = r.get(url=url, headers=header)
63 | return result
64 |
65 | if __name__ == "__main__":
66 | print('检测到{}个账号,即将开始签到!'.format(len(cookies)))
67 | success = []
68 | failure = []
69 | msg = []
70 | for i in cookies:
71 | cookie = i
72 | autherror = False
73 | signerror = False
74 | sign_return = None
75 | me = None
76 | try:
77 | me = getme(current, cookie)
78 | except:
79 | message = '第{}个账号验证失败!请检查Cookie是否过期!或者附上报错信息到 https://github.com/GamerNoTitle/wyycg-autosignin/issues 发起issue'.format(
80 | cookies.index(i) + 1)
81 | failure.append(cookie)
82 | msg.append(message)
83 | autherror = True
84 |
85 | if me.status_code != 200 and not autherror:
86 | message = '第{}个账号验证失败!请检查Cookie是否过期!或者附上报错信息到 https://github.com/GamerNoTitle/wyycg-autosignin/issues 发起issue'.format(
87 | cookies.index(i) + 1)
88 | failure.append(cookie)
89 | msg.append(message)
90 | elif me.status_code == 200:
91 | try:
92 | sign_return = signin(sign_url, cookie)
93 | except:
94 | message = '第{}个账号签到失败,回显状态码为{},具体错误信息如下:{}'.format(cookies.index(i) + 1, sign_return.status_code, sign_return.text)
95 | failure.append(cookie)
96 | msg.append(message)
97 | signerror = True
98 |
99 | if sign_return.status_code == 200:
100 | message = '第{}个账号签到成功!'.format(cookies.index(i) + 1)
101 | success.append(cookie)
102 | msg.append(message)
103 | elif not signerror:
104 | message = '第{}个账号签到失败,回显状态码为{},具体错误信息如下:{}'.format(cookies.index(i) + 1, sign_return.status_code, sign_return.text)
105 | failure.append(cookie)
106 | msg.append(message)
107 | outputmsg = str(msg).replace("[", '').replace(']', '').replace(',', '
').replace('\'', '')
108 | teleinfomsg = '''
109 | 感谢使用来自GamerNoTitle的网易云游戏自动签到脚本!
110 | 今日签到结果如下:
111 | 成功数量:{0}/{2}
112 | 失败数量:{1}/{2}
113 | 具体情况如下:
114 | {3}
115 | GamerNoTitle: https://bili33.top
116 | 网易云游戏自动签到脚本: https://github.com/GamerNoTitle/wyycg-autocheckin
117 | '''.format(len(success), len(failure), len(cookies), outputmsg)
118 | print(teleinfomsg)
119 | if (len(failure) != 0):
120 | raise ScriptRunError
121 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # 网易云游戏自动签到
2 |
3 | 请注意:关于LICENSE,在Apache-2.0的基础上增加一条:**禁止上传到CSDN等网站盈利,禁止放在某宝某鱼等平台贩卖**,否则官方找上门就**删库跑路**!
4 |
5 | 仓库被封了就来这里找https://git.bili33.top/GamerNoTitle/wyycg-AutoCheckin
6 |
7 | 本脚本通过使用Github Action来进行[网易云游戏](https://cloudgame.webapp.163.com/newer.html?invite_code=2ZLPWY)签到操作,让你能够天天白嫖网易云游戏时长和云电脑!
8 |
9 | 喜欢就给我点个STAR吧!
10 |
11 | 签到时间是早上10点,如果有需要就自己修改.github/workflows/AutoSignin.yml中第12行的时间,时间遵循UTC时间,+8才是我们的时间
12 |
13 | **请不要使用非master分支脚本,他们通常正在开发新功能,会有BUG出现**
14 |
15 | 关于签到失败返回的结果([这里有实例](https://github.com/GamerNoTitle/wyycg-autocheckin/discussions/6)),如果你有解码的经验,可以前往[这里](https://github.com/GamerNoTitle/wyycg-autocheckin/discussions/6)提供帮助,Thanks♪(・ω・)ノ
16 |
17 | ## 赞助
18 | 点击下面的Badge其中一个就可以跳转到相应页面,感谢老板的支持!
19 |
20 |
21 |
22 | ## 目录
23 |
24 | - [使用方法](#使用方法)
25 | - ~~[保活策略](#保活策略)~~
26 | - [变量获取](#变量内容获取)
27 | - ~~[脚本更新](#脚本更新)~~
28 | - [Q&A](#qa)
29 |
30 | ## 使用方法
31 |
32 | ### 变量添加
33 |
34 | 1、Fork本仓库,按右上角的分支按钮(如图)
35 |
36 | 
37 |
38 | 2、进入设置,设置变量`cookie`和`teleid` `teletoken` `SCKEY` `QQKEY` `PPKEY`(这五个可选,但是`teleid`和`teletoken`要用的话就得两个都要配置!)
39 |
40 | **请注意:你无需在仓库的secrets内设置名为`GITHUB_TOKEN`的变量,该名称本身就是指定为自己账户下名为`GITHUB_TOKEN`的密钥,如果你在仓库的secrets内设置将会被Github提示无效**
41 |
42 | **如果使用多用户,多个cookie请使用`#`分隔**
43 |
44 | [如何获取变量内容?请点这里](#变量内容获取)
45 |
46 | 
47 |
48 | 
49 |
50 | 
51 |
52 | ### 测试脚本
53 |
54 | **请在当天没有签到的情况下测试!!!**
55 |
56 | 我们先进入Action界面,启用Action
57 |
58 | 
59 |
60 | 然后我们进入对应的脚本,启用脚本,并进行测试
61 |
62 | 
63 |
64 | ~~除了点STAR进行启动以外~~(现在STAR启动不了了),你也可以点击右边那个白白的按钮来启动
65 |
66 | **只要测试通过就是没问题,如果你配置了TELEGRAM还会收到你的BOT给你发送的消息**
67 |
68 | 测试通过后,你还需要创建保活需要用到的Github Token,详情可以看[保活策略](#保活策略)这一节(其实就在下面撒)
69 |
70 | ## ~~保活策略~~ (新版Action可跳过,但是在设置里面的Action权限要放行写入权限!)
71 |
72 | 因为Github Action在仓库60天内没有任何Push的时候会禁用你的Action,这时候我们就要进行保活
73 |
74 | 保活Action已经写好了~~,但是这里有一些步骤是需要你进行的,请看下面的图片生成GITHUB_TOKEN以便让脚本造成的更改能够正常推送入你的仓库~~
75 |
76 | ## 变量内容获取
77 |
78 | ### cookie获取
79 |
80 | 首先我们进入[官网](https://cg.163.com),进行登录,然后用F12打开开发者工具后使用Ctrl+F5进行刷新,会刷出很多结果
81 |
82 | 我们在里面找到`@me`这一项,然后在右边找到`Authorization`将冒号后面的内容复制下来就是我们所需要的Cookie
83 |
84 | **如果使用多用户,多个cookie请使用`#`分隔**
85 |
86 | 
87 |
88 | ### teleid获取
89 |
90 | 用你的Telegram找到@userinfobot,点个Start,会直接给你回复你的ID,复制下id后面的数字就是teleid了
91 |
92 | ### teletoken获取
93 |
94 | 找@BotFather进行机器人的创建,按照提示创建即可,会给你一个API TOKEN,如果一不小心点过去了可以用命令`/mybots`管理自己的bot,找到自己想要使用的bot并获取API就可以了
95 |
96 | ### SCKEY获取
97 |
98 | 访问[ServerChanTurbo官网](https://sct.ftqq.com/r/3350),并用你的微信扫码登陆,获取推送用的KEY即可(因为我没有使用这个推送方法所以没有图)
99 |
100 | **请各位使用了SC推送服务的小伙伴尽快迁移到SCT,原服务将会在四月底下线**
101 |
102 | ### QQKEY获取
103 |
104 | **不推荐使用此推送方式,因为其极不稳定!使用该推送方式无法收到QQ提醒的请不要开issue说这个问题,因为这是该服务的问题不是脚本问题**
105 |
106 | 访问[CoolPush官网](https://cp.xuthus.cc/),使用任一方式登录,在`调用代码Skey`可以看到你的KEY
107 |
108 | 
109 |
110 | ### PPKEY获取
111 |
112 | **此平台是ServerChan的替代平台,因为ServerChan发了个[通知](https://mp.weixin.qq.com/s/L4rONhZN2OCQ80cHxPAY0Q),所以我就先把这个给更了
113 |
114 | 访问[PushPlus官网](http://pushplus.hxtrip.com/),使用微信登录,直接在[一对一推送](http://pushplus.hxtrip.com/message)复制自己的Token填入变量即可!
115 |
116 | ## Q&A
117 |
118 | ## 返回值400并附带一串不知道什么鬼的字符串
119 |
120 | 例子:
121 | ```
122 | 感谢使用来自GamerNoTitle的网易云游戏自动签到脚本!
123 | 今日签到结果如下:
124 | 成功数量:0/1
125 | 失败数量:1/1
126 | 具体情况如下:
127 | 第1个账号签到失败,回显状态码为400,具体错误信息如下:GL8B/hH+v9cYGsm/Ag8PAAwBAr/XztPNzsm/Ag8PChAEv9e/EhACD70QBgQLvREMAf4Wv8m/Ag8PChAEAAu/17/5EtID0tD5EtLWz9b5EtIBA8/5EtT/1AL5EtLP0M2/Gqc=
128 | GamerNoTitle: https://bili33.top
129 | 网易云游戏自动签到脚本: https://github.com/GamerNoTitle/wyycg-autocheckin
130 | ```
131 |
132 | 首先你需要确认你当天是否已经签到过了才运行的脚本,如果确实先签了到再运行脚本,网易确实会返回400
133 |
134 | 目前也只发现这种情况会返回400,如果有其他情况你可以在issue跟我提出
135 |
136 | ## 错误代码
137 |
138 | ### telepot.exception.TelegramError
139 |
140 | #### Chat not found
141 |
142 | 请先用你要接受信息的账户发个`/start`给你的bot,或者检查用户ID是否正确!
143 |
144 | #### Not found
145 |
146 | 请检查自己的Telebot Token是否正确!
147 |
148 | ### telepot.exception.UnauthorizedError
149 |
150 | 该错误显示如下:
151 |
152 | ```
153 | Traceback (most recent call last):
154 | File "main.py", line 185, in
155 | send(teleid, teleinfomsg)
156 | File "main.py", line 82, in send
157 | bot.sendMessage(id, message, parse_mode=None, disable_web_page_preview=None, disable_notification=None,
158 | File "/opt/hostedtoolcache/Python/3.8.9/x64/lib/python3.8/site-packages/telepot/init.py", line 513, in sendMessage
159 | return self._api_request('sendMessage', _rectify(p))
160 | File "/opt/hostedtoolcache/Python/3.8.9/x64/lib/python3.8/site-packages/telepot/init.py", line 491, in _api_request
161 | return api.request((self._token, method, params, files), **kwargs)
162 | File "/opt/hostedtoolcache/Python/3.8.9/x64/lib/python3.8/site-packages/telepot/api.py", line 155, in request
163 | return _parse(r)
164 | File "/opt/hostedtoolcache/Python/3.8.9/x64/lib/python3.8/site-packages/telepot/api.py", line 147, in _parse
165 | raise e(description, error_code, data)
166 | telepot.exception.UnauthorizedError: ('Unauthorized', 401, {'ok': False, 'error_code': 401, 'description': 'Unauthorized'})
167 | ```
168 |
169 | 解决方法:检查自己的Bot的Token是不是正确的!
170 |
171 | ### urllib3.exceptions
172 |
173 | #### MaxRetryError
174 |
175 | `HTTPSConnectionPool(host='api.telegram.org', port=443): Max retries exceeded with url: /botxxxx/sendMessage`
176 |
177 | 出现这个错误,那就是Telegram的问题,Github连接不上Telegram服务器(大半是TG服务器炸了)
178 |
179 | #### ReadTimeoutError
180 |
181 | `HTTPSConnectionPool(host='api.telegram.org', port=443): Read timed out. (read timeout=30)`
182 |
183 | 出现这个错误,那就是Telegram的问题,Github连接不上Telegram服务器(大半是TG服务器炸了)~~(复制粘贴大法)~~
184 |
185 | ---
186 |
187 | ## 历史STAR
188 |
189 | 
190 |
191 | ## 免责声明
192 |
193 | 使用本脚本造成的封号或任何违反相关法律法规造成的任何责任,由使用者自行承担,开发者不担负任何责任!
194 |
--------------------------------------------------------------------------------
/main.py:
--------------------------------------------------------------------------------
1 | import sys
2 | import requests as r
3 | import json
4 | import telepot
5 |
6 | tele_enable = False
7 | sc_enable = False
8 | qq_enable = False
9 | pp_enable = False
10 | sign_url = 'https://n.cg.163.com/api/v2/sign-today'
11 | current = 'https://n.cg.163.com/api/v2/client-settings/@current'
12 |
13 |
14 | cookies = sys.argv[1].split('#')
15 | teleid = sys.argv[2]
16 | teletoken = sys.argv[3]
17 | sckey = sys.argv[4]
18 | qqkey = sys.argv[5]
19 | ppkey = sys.argv[6]
20 |
21 | if cookies == "" or cookies == []:
22 | print('[网易云游戏自动签到]未设置cookie,正在退出……')
23 | sys.exit()
24 | if teleid != "" and teletoken != "":
25 | tele_enable = True
26 | print('Telegram推送已配置!')
27 | bot = telepot.Bot(teletoken)
28 | else:
29 | print('未配置Telegram推送!')
30 | if sckey != "":
31 | sc_enable = True
32 | print('ServerChan推送已配置!')
33 | else:
34 | print('未配置ServerChan推送!')
35 | if qqkey != "":
36 | qq_enable = True
37 | print('QQ推送已配置!')
38 | else:
39 | print('未配置QQ推送!')
40 | if ppkey != '':
41 | pp_enable = True
42 | print('PushPlus推送已配置!')
43 | else:
44 | print('未配置PushPlus推送!')
45 |
46 | class ScriptRunError(Exception):
47 | print("[网易云游戏自动签到]脚本运行错误,具体请参见日志!")
48 |
49 |
50 | def signin(url, cookie):
51 | header = {
52 | 'Accept': 'application/json, text/plain, */*',
53 | 'Accept-Encoding': 'gzip, deflate, br',
54 | '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',
55 | 'Authorization': str(cookie),
56 | 'Connection': 'keep-alive',
57 | 'Content-Length': '0',
58 | 'Host': 'n.cg.163.com',
59 | 'Origin': 'https://cg.163.com',
60 | 'Referer': 'https://cg.163.com/',
61 | 'Sec-Fetch-Dest': 'empty',
62 | 'Sec-Fetch-Mode': 'cors',
63 | 'Sec-Fetch-Site': 'same-site',
64 | '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',
65 | 'X-Platform': '0'
66 | }
67 |
68 | result = r.post(url=url, headers=header)
69 | return result
70 |
71 |
72 | def getme(url, cookie):
73 | header = {
74 | 'Host': 'n.cg.163.com',
75 | 'Connection': 'keep-alive',
76 | 'Accept': 'application/json, text/plain, */*',
77 | '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',
78 | 'X-Platform': '0',
79 | 'Authorization': str(cookie),
80 | 'Origin': 'https://cg.163.com',
81 | 'Sec-Fetch-Site': 'same-site',
82 | 'Sec-Fetch-Mode': 'cors',
83 | 'Sec-Fetch-Dest': 'empty',
84 | 'Referer': 'https://cg.163.com/',
85 | 'Accept-Encoding': 'gzip, deflate, br',
86 | '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'
87 | }
88 | result = r.get(url=url, headers=header)
89 | return result
90 |
91 |
92 | def send(id, message):
93 | if tele_enable:
94 | print('正在使用Telebot进行消息推送……')
95 | bot.sendMessage(id, message, parse_mode=None, disable_web_page_preview=None, disable_notification=None,
96 | reply_to_message_id=None, reply_markup=None)
97 | print('Telebot消息推送完成!')
98 |
99 |
100 | def scsend(SCKEY, message):
101 | sc_url = 'http://sctapi.ftqq.com/{}.send?title=网易云游戏自动签到脚本&desp={}'.format(SCKEY, message)
102 | if sc_enable:
103 | print('正在使用ServerChan进行消息推送……')
104 | r.get(url=sc_url)
105 | print('ServerChan消息推送完成!')
106 |
107 | def qqsend(QQKEY, message):
108 | qq_url = 'https://push.xuthus.cc/send/{}?c=网易云游戏自动签到脚本\n{}'.format(QQKEY, message)
109 | if qq_enable:
110 | print('正在进行QQ消息推送……')
111 | r.get(url=qq_url)
112 | print('QQ消息推送完成!')
113 |
114 | def ppsend(PPKEY, message):
115 | pp_url = 'http://pushplus.hxtrip.com/send?token={}&title=网易云游戏自动签到脚本&content={}&template=html'.format(PPKEY, message)
116 | if pp_enable:
117 | print('正在使用PushPlus进行消息推送……')
118 | r.get(url=pp_url)
119 | print('PushPlus消息推送完成')
120 |
121 | if __name__ == "__main__":
122 | print('检测到{}个账号,即将开始签到!'.format(len(cookies)))
123 | success = []
124 | failure = []
125 | msg = []
126 | for i in cookies:
127 | cookie = i
128 | autherror = False
129 | signerror = False
130 | sign_return = None
131 | me = None
132 | try:
133 | me = getme(current, cookie)
134 | except:
135 | message = '第{}个账号验证失败!请检查Cookie是否过期!或者附上报错信息到 https://github.com/GamerNoTitle/wyycg-autosignin/issues 发起issue'.format(
136 | cookies.index(i) + 1)
137 | failure.append(cookie)
138 | msg.append(message)
139 | autherror = True
140 |
141 | if me.status_code != 200 and not autherror:
142 | message = '第{}个账号验证失败!请检查Cookie是否过期!或者附上报错信息到 https://github.com/GamerNoTitle/wyycg-autosignin/issues 发起issue'.format(
143 | cookies.index(i) + 1)
144 | failure.append(cookie)
145 | msg.append(message)
146 | elif me.status_code == 200:
147 | try:
148 | sign_return = signin(sign_url, cookie)
149 | except:
150 | message = '第{}个账号签到失败,回显状态码为{},具体错误信息如下:{}'.format(cookies.index(i) + 1, sign_return.status_code, sign_return.text)
151 | failure.append(cookie)
152 | msg.append(message)
153 | signerror = True
154 |
155 | if sign_return.status_code == 200:
156 | message = '第{}个账号签到成功!'.format(cookies.index(i) + 1)
157 | success.append(cookie)
158 | msg.append(message)
159 | elif not signerror:
160 | message = '第{}个账号签到失败,回显状态码为{},具体错误信息如下:{}'.format(cookies.index(i) + 1, sign_return.status_code, sign_return.text)
161 | failure.append(cookie)
162 | msg.append(message)
163 | outputmsg = str(msg).replace("[", '').replace(']', '').replace(',', '
').replace('\'', '')
164 | teleinfomsg = '''
165 | 感谢使用来自GamerNoTitle的网易云游戏自动签到脚本!
166 | 今日签到结果如下:
167 | 成功数量:{0}/{2}
168 | 失败数量:{1}/{2}
169 | 具体情况如下:
170 | {3}
171 | GamerNoTitle: https://bili33.top
172 | 网易云游戏自动签到脚本: https://github.com/GamerNoTitle/wyycg-autocheckin
173 | '''.format(len(success), len(failure), len(cookies), outputmsg)
174 | scinfomsg = '''
175 | 感谢使用来自GamerNoTitle的网易云游戏自动签到脚本!
176 | 今日签到结果如下:
177 | 成功数量:{0}/{2}
178 | 失败数量:{1}/{2}
179 | 具体情况如下:
180 | {3}
181 | GamerNoTitle: https://bili33.top
182 | 网易云游戏自动签到脚本: https://github.com/GamerNoTitle/wyycg-autocheckin
183 | '''.format(len(success), len(failure), len(cookies), outputmsg)
184 | qqinfomsg = '''
185 | 感谢使用来自bili33.top GamerNoTitle的网易云游戏自动签到脚本
186 | 今日签到结果如下:
187 | 成功数量:{0}/{2}
188 | 失败数量:{1}/{2}
189 | 具体情况如下:
190 | {3}
191 | GamerNoTitle: https://bili33.top
192 | 网易云游戏自动签到脚本: https://github.com/GamerNoTitle/wyycg-autocheckin
193 | '''.format(len(success), len(failure), len(cookies), outputmsg)
194 | ppinfomsg = '''
195 | 感谢使用来自bili33.top GamerNoTitle的网易云游戏自动签到脚本
196 | 今日签到结果如下:
197 | 成功数量:{0}/{2}
198 | 失败数量:{1}/{2}
199 | 具体情况如下:
200 | {3}
201 | GamerNoTitle: https://bili33.top
202 | 网易云游戏自动签到脚本: https://github.com/GamerNoTitle/wyycg-autocheckin
203 | '''.format(len(success), len(failure), len(cookies), outputmsg)
204 |
205 | send(teleid, teleinfomsg)
206 | scsend(sckey, scinfomsg)
207 | qqsend(qqkey, qqinfomsg)
208 | ppsend(ppkey, ppinfomsg)
209 | print(teleinfomsg)
210 | if (len(failure) != 0):
211 | raise ScriptRunError
212 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction,
10 | and distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by
13 | the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all
16 | other entities that control, are controlled by, or are under common
17 | control with that entity. For the purposes of this definition,
18 | "control" means (i) the power, direct or indirect, to cause the
19 | direction or management of such entity, whether by contract or
20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
21 | outstanding shares, or (iii) beneficial ownership of such entity.
22 |
23 | "You" (or "Your") shall mean an individual or Legal Entity
24 | exercising permissions granted by this License.
25 |
26 | "Source" form shall mean the preferred form for making modifications,
27 | including but not limited to software source code, documentation
28 | source, and configuration files.
29 |
30 | "Object" form shall mean any form resulting from mechanical
31 | transformation or translation of a Source form, including but
32 | not limited to compiled object code, generated documentation,
33 | and conversions to other media types.
34 |
35 | "Work" shall mean the work of authorship, whether in Source or
36 | Object form, made available under the License, as indicated by a
37 | copyright notice that is included in or attached to the work
38 | (an example is provided in the Appendix below).
39 |
40 | "Derivative Works" shall mean any work, whether in Source or Object
41 | form, that is based on (or derived from) the Work and for which the
42 | editorial revisions, annotations, elaborations, or other modifications
43 | represent, as a whole, an original work of authorship. For the purposes
44 | of this License, Derivative Works shall not include works that remain
45 | separable from, or merely link (or bind by name) to the interfaces of,
46 | the Work and Derivative Works thereof.
47 |
48 | "Contribution" shall mean any work of authorship, including
49 | the original version of the Work and any modifications or additions
50 | to that Work or Derivative Works thereof, that is intentionally
51 | submitted to Licensor for inclusion in the Work by the copyright owner
52 | or by an individual or Legal Entity authorized to submit on behalf of
53 | the copyright owner. For the purposes of this definition, "submitted"
54 | means any form of electronic, verbal, or written communication sent
55 | to the Licensor or its representatives, including but not limited to
56 | communication on electronic mailing lists, source code control systems,
57 | and issue tracking systems that are managed by, or on behalf of, the
58 | Licensor for the purpose of discussing and improving the Work, but
59 | excluding communication that is conspicuously marked or otherwise
60 | designated in writing by the copyright owner as "Not a Contribution."
61 |
62 | "Contributor" shall mean Licensor and any individual or Legal Entity
63 | on behalf of whom a Contribution has been received by Licensor and
64 | subsequently incorporated within the Work.
65 |
66 | 2. Grant of Copyright License. Subject to the terms and conditions of
67 | this License, each Contributor hereby grants to You a perpetual,
68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69 | copyright license to reproduce, prepare Derivative Works of,
70 | publicly display, publicly perform, sublicense, and distribute the
71 | Work and such Derivative Works in Source or Object form.
72 |
73 | 3. Grant of Patent License. Subject to the terms and conditions of
74 | this License, each Contributor hereby grants to You a perpetual,
75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76 | (except as stated in this section) patent license to make, have made,
77 | use, offer to sell, sell, import, and otherwise transfer the Work,
78 | where such license applies only to those patent claims licensable
79 | by such Contributor that are necessarily infringed by their
80 | Contribution(s) alone or by combination of their Contribution(s)
81 | with the Work to which such Contribution(s) was submitted. If You
82 | institute patent litigation against any entity (including a
83 | cross-claim or counterclaim in a lawsuit) alleging that the Work
84 | or a Contribution incorporated within the Work constitutes direct
85 | or contributory patent infringement, then any patent licenses
86 | granted to You under this License for that Work shall terminate
87 | as of the date such litigation is filed.
88 |
89 | 4. Redistribution. You may reproduce and distribute copies of the
90 | Work or Derivative Works thereof in any medium, with or without
91 | modifications, and in Source or Object form, provided that You
92 | meet the following conditions:
93 |
94 | (a) You must give any other recipients of the Work or
95 | Derivative Works a copy of this License; and
96 |
97 | (b) You must cause any modified files to carry prominent notices
98 | stating that You changed the files; and
99 |
100 | (c) You must retain, in the Source form of any Derivative Works
101 | that You distribute, all copyright, patent, trademark, and
102 | attribution notices from the Source form of the Work,
103 | excluding those notices that do not pertain to any part of
104 | the Derivative Works; and
105 |
106 | (d) If the Work includes a "NOTICE" text file as part of its
107 | distribution, then any Derivative Works that You distribute must
108 | include a readable copy of the attribution notices contained
109 | within such NOTICE file, excluding those notices that do not
110 | pertain to any part of the Derivative Works, in at least one
111 | of the following places: within a NOTICE text file distributed
112 | as part of the Derivative Works; within the Source form or
113 | documentation, if provided along with the Derivative Works; or,
114 | within a display generated by the Derivative Works, if and
115 | wherever such third-party notices normally appear. The contents
116 | of the NOTICE file are for informational purposes only and
117 | do not modify the License. You may add Your own attribution
118 | notices within Derivative Works that You distribute, alongside
119 | or as an addendum to the NOTICE text from the Work, provided
120 | that such additional attribution notices cannot be construed
121 | as modifying the License.
122 |
123 | You may add Your own copyright statement to Your modifications and
124 | may provide additional or different license terms and conditions
125 | for use, reproduction, or distribution of Your modifications, or
126 | for any such Derivative Works as a whole, provided Your use,
127 | reproduction, and distribution of the Work otherwise complies with
128 | the conditions stated in this License.
129 |
130 | 5. Submission of Contributions. Unless You explicitly state otherwise,
131 | any Contribution intentionally submitted for inclusion in the Work
132 | by You to the Licensor shall be under the terms and conditions of
133 | this License, without any additional terms or conditions.
134 | Notwithstanding the above, nothing herein shall supersede or modify
135 | the terms of any separate license agreement you may have executed
136 | with Licensor regarding such Contributions.
137 |
138 | 6. Trademarks. This License does not grant permission to use the trade
139 | names, trademarks, service marks, or product names of the Licensor,
140 | except as required for reasonable and customary use in describing the
141 | origin of the Work and reproducing the content of the NOTICE file.
142 |
143 | 7. Disclaimer of Warranty. Unless required by applicable law or
144 | agreed to in writing, Licensor provides the Work (and each
145 | Contributor provides its Contributions) on an "AS IS" BASIS,
146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147 | implied, including, without limitation, any warranties or conditions
148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149 | PARTICULAR PURPOSE. You are solely responsible for determining the
150 | appropriateness of using or redistributing the Work and assume any
151 | risks associated with Your exercise of permissions under this License.
152 |
153 | 8. Limitation of Liability. In no event and under no legal theory,
154 | whether in tort (including negligence), contract, or otherwise,
155 | unless required by applicable law (such as deliberate and grossly
156 | negligent acts) or agreed to in writing, shall any Contributor be
157 | liable to You for damages, including any direct, indirect, special,
158 | incidental, or consequential damages of any character arising as a
159 | result of this License or out of the use or inability to use the
160 | Work (including but not limited to damages for loss of goodwill,
161 | work stoppage, computer failure or malfunction, or any and all
162 | other commercial damages or losses), even if such Contributor
163 | has been advised of the possibility of such damages.
164 |
165 | 9. Accepting Warranty or Additional Liability. While redistributing
166 | the Work or Derivative Works thereof, You may choose to offer,
167 | and charge a fee for, acceptance of support, warranty, indemnity,
168 | or other liability obligations and/or rights consistent with this
169 | License. However, in accepting such obligations, You may act only
170 | on Your own behalf and on Your sole responsibility, not on behalf
171 | of any other Contributor, and only if You agree to indemnify,
172 | defend, and hold each Contributor harmless for any liability
173 | incurred by, or claims asserted against, such Contributor by reason
174 | of your accepting any such warranty or additional liability.
175 |
176 | END OF TERMS AND CONDITIONS
177 |
178 | APPENDIX: How to apply the Apache License to your work.
179 |
180 | To apply the Apache License to your work, attach the following
181 | boilerplate notice, with the fields enclosed by brackets "[]"
182 | replaced with your own identifying information. (Don't include
183 | the brackets!) The text should be enclosed in the appropriate
184 | comment syntax for the file format. We also recommend that a
185 | file or class name and description of purpose be included on the
186 | same "printed page" as the copyright notice for easier
187 | identification within third-party archives.
188 |
189 | Copyright 2020-present GamerNoTitle
190 |
191 | Licensed under the Apache License, Version 2.0 (the "License");
192 | you may not use this file except in compliance with the License.
193 | You may obtain a copy of the License at
194 |
195 | http://www.apache.org/licenses/LICENSE-2.0
196 |
197 | Unless required by applicable law or agreed to in writing, software
198 | distributed under the License is distributed on an "AS IS" BASIS,
199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200 | See the License for the specific language governing permissions and
201 | limitations under the License.
202 |
--------------------------------------------------------------------------------