Skip to content

Commit 1ddf7b7

Browse files
committed
add pushplus channel
1 parent 1702df4 commit 1ddf7b7

File tree

7 files changed

+131
-57
lines changed

7 files changed

+131
-57
lines changed

dlt.py

+53-4
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
from pathlib import Path
1717
from collections import defaultdict
1818
from collections import Counter
19+
from collections import deque
1920
from datetime import datetime, timedelta
2021

2122
import fire
@@ -37,7 +38,7 @@
3738
"7": "103.36.203.104:303",
3839
"8": "103.36.203.208:302",
3940
"9": "103.36.203.132:302",
40-
"10": "103.36.203.205:301",
41+
"10": "103.36.203.125:301",
4142
"5": "103.36.203.105:301",
4243
}
4344
daily_device = ["1", "4", "5", "9", "3"]
@@ -843,13 +844,11 @@ def check(key=""):
843844
over_set = []
844845
for m in dlt.my(raw=True):
845846
leave_time = float(m["LeaveTime"][:-2])
846-
if leave_time < 8:
847+
if leave_time < 16:
847848
serial = m["SerialNo"]
848849
print(dlt.detail(serial, quiet=True))
849850
print("0 check " + serial)
850851
print("0 last --over " + serial)
851-
elif leave_time < 16:
852-
print(dlt.detail(serial, quiet=True))
853852

854853

855854
# every day upload
@@ -863,5 +862,55 @@ def users():
863862
daily("user")
864863

865864

865+
def newsession():
866+
resp = requests.get(
867+
"http://api.vc.bilibili.com/session_svr/v1/session_svr/new_sessions",
868+
cookies={"SESSDATA": bilibili_sessdata},
869+
)
870+
r = json.loads(resp.text)
871+
# r = r['data']['session_list']
872+
r = r["data"]["session_list"]
873+
ans = []
874+
for s in r:
875+
x = {
876+
"talker_id": s["talker_id"],
877+
"session_type": s["session_type"],
878+
}
879+
content = s["last_msg"]["content"]
880+
content = json.loads(content)
881+
content = content["content"]
882+
server = 0
883+
p = "(B|b)[^ ]*服"
884+
if re.search(p, content):
885+
content = re.sub(p, "", content)
886+
server = 1
887+
content = re.sub("账号[::]*", "", content)
888+
content = re.sub("密码[::]*", "", content)
889+
user = re.search("([^ ]+)\s+([^ ]+)", content)
890+
if not user:
891+
continue
892+
username = user.group(1)
893+
password = user.group(2)
894+
x["username"] = username
895+
x["password"] = password
896+
x["server"] = server
897+
ans.append(x)
898+
899+
return ans
900+
901+
902+
def session():
903+
cur = deque()
904+
new = newsession()
905+
for n in reversed(new):
906+
for c in cur:
907+
if c["username"] == n["username"]:
908+
c["password"] = n["password"]
909+
c["server"] = n["server"]
910+
break
911+
else:
912+
cur.push(n)
913+
914+
866915
if __name__ == "__main__":
867916
fire.Fire()

docs/guide.md

+12-8
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,19 @@
55

66
闲聊群:[1009619697](https://qm.qq.com/cgi-bin/qm/qr?k=ZtJVQZ1LI_9nMh3tj7fKgYu5PrwqBCje&jump_from=webapi)
77

8+
问题反馈:[github.com/tkkcc/ArkLights/issues](https://github.com/tkkcc/ArkLights/issues)
9+
810
源码与其他明日方舟脚本:[github.com/tkkcc/ArkLights](https://github.com/tkkcc/ArkLights)
9-
觉得好用请在github上给个star,这是对开发者最大的帮助。无法访问请看[国内主页](https://gitee.com/bilabila/arknights)
11+
觉得好用请在github上给个star,这是对开发者最大的帮助。
1012

1113
## 最近更新
1214

13-
- 活动关不打、启动弹“停止运行”,重装最新安装包后清除缓存,设置不丢。
15+
- 华云必须执行[外置root指令](#云手机)才能正常使用。
16+
- 建议勾选“启用完全重启”,彻底保证脚本内存稳定,遇到定时启动失败的请反馈。
17+
- 可使用pushplus通知,支持微信公众号、邮件等多种渠道,有图,无需自建服务。
18+
- 标题时间异常、弹“停止运行”,重装最新安装包后清除缓存,设置不丢。
1419
- 活动关内存泄漏严重,2G内存设备将内存清理间隔设为900才能稳定挂机。
15-
- 已root设备上会`重启acc进程`来保证脚本内存稳定。如果出现脚本启动失败问题且只是短时间使用,可禁用。
16-
- 华云需手动运行指定命令,才有完整root权限。
20+
- 已root设备上会`重启acc进程`来保证脚本内存稳定。如果出现脚本启动失败且只是短时间使用,可禁用。
1721
- magisk hide设备需**手动关闭root授权提示**
1822
<!-- - 默认不自动重启acc进程,但这样刷肉鸽每小时内存泄漏44M,一天1G。启用后会定期释放脚本内存,但在部分设备上会造成启动失败与闪退。 -->
1923
<!-- - 单号最大剿灭次数默认为1。 -->
@@ -50,7 +54,7 @@
5054
<!-- 1. 华云的root保活仍存在问题,但api较全。 -->
5155

5256

53-
::: tip 华云需要执行以下命令使脚本获得完整root权限
57+
::: tip 华云必须执行以下命令
5458
```sh
5559
adb connect 123.456.789.101:234
5660
adb -s 123.456.789.101:234 shell "nohup sh -c 'nc -klp49876 -e sh' > /dev/null 2>&1 &"
@@ -166,7 +170,7 @@ username3 password3 b
166170
<!-- 长时间挂机时,游戏与脚本占用内存会不断上涨(可用top监测到),因此需要定期重启游戏与脚本进程来释放内存。在有root权限的情况下脚本才有能力做到这点。 -->
167171
<!-- ::: -->
168172

169-
给root权限,单账号勾`完成之后关闭游戏`,多账号勾`切号前关闭其他服与当前服`(必要)。
173+
给root权限,单账号勾`完成之后关闭游戏`,多账号勾`切号前关闭其他服与当前服`(必要),高级设置勾`启用完全重启`,内存清理间隔900
170174

171175
<!-- 1. 模拟器使用`2核2G 1280x720`足够稳定挂机,闪退换模拟器/升级显卡驱动。 -->
172176
<!---->
@@ -506,7 +510,7 @@ pr => pr-b-2*99 pr-a-2*99 pr-c-2*99 pr-d-2*99 pr-b-1*99 pr-a-1*99 pr-c-1*99 pr-d
506510

507511
目前公开机器人由于风控严重已不再提供,请按下面的教程自建。风控主要和好友数群数以及消息内容消息数量相关,少部分人使用不会风控。
508512

509-
也可以设置pushplus账号。其他推送方案如 QQ频道、telegram机器人、wecomchan、喵提醒、邮件,没有集成计划,如果需要可以pull request,参考notifyqq与notifypp函数
513+
也可以使用pushplus推送,支持多种[通知渠道](http://www.pushplus.plus/doc/guide/api.html#%E4%B8%80%E3%80%81%E5%8F%91%E9%80%81%E6%B6%88%E6%81%AF%E6%8E%A5%E5%8F%A3),但有[额度限制](http://www.pushplus.plus/doc/guide/use.html)。在脚本高级设置中填写token即可使用,无需自建服务
510514

511515
高级设置中可设置更多情况的通知。
512516

@@ -705,4 +709,4 @@ qqimagedeliver --username=12345 --password=abcde --maxtry=2 # 再密码登录
705709
若勾选`审判庭接受任务`,则速通只处理云端分发的任务。
706710

707711
如果后端服务器掉线的话,每次上传截图时会等待30秒。
708-
712+
c

main.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ default_findcolor_confidence = 95 / 100
5050
-- 设成1000//30时,真机同时开着B服与官服时会出现点着点着脚本就停(从基建开始做邮件)
5151
frame_milesecond = 1000 // 30
5252
milesecond_after_click = frame_milesecond
53-
release_date = "2022.06.21 18:31"
53+
release_date = "2022.06.22 20:31"
5454
ui_submit_color = "#ff0d47a1"
5555
ui_cancel_color = "#ff1976d2"
5656
ui_warn_color = "#ff33ccff"

path.lua

+13-3
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,13 @@ path.base = {
9595
log(48)
9696

9797
-- local login_error_times = 0
98-
wait(function()
98+
wait(function(reset_wait_start_time)
9999
tap("登录")
100-
local p = appear({"captcha", "密码不能为空", "单选确认框"}, 2)
100+
local p = appear({
101+
"captcha", "密码不能为空", "单选确认框", "注册协议",
102+
}, 2)
101103
log(p)
104+
if p == "注册协议" then return true end
102105
if p == 'captcha' then
103106
trySolveCapture()
104107
appear("单选确认框")
@@ -165,7 +168,8 @@ path.base = {
165168
return true
166169
end
167170

168-
if findOne("剿灭接管作战") then
171+
if findOne("剿灭接管作战") and
172+
not disappear("剿灭接管作战", 5) then
169173
captureqqimagedeliver(table.join(qqmessage, ' ') .. " " .. cur_fight ..
170174
"剿灭接管作战", true)
171175
tap("剿灭接管作战")
@@ -391,6 +395,12 @@ path.bilibili_login_change = update(path.bilibili_login, {
391395
}, nil, true)
392396

393397
path.fallback = {
398+
399+
注册协议 = function()
400+
tap("注册协议1")
401+
ssleep(1)
402+
tap("注册协议2")
403+
end,
394404
阿米娅 = function()
395405
for k, v in pairs(point.阿米娅右列表) do tap(v) end
396406
for k, v in pairs(point.阿米娅左列表) do tap(v) end

point.lua

+7-1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ point = {
2626
阿米娅2 = "777|300|FAEAD1,714|369|3DD1E2",
2727
阿米娅右列表 = {{1771, 841}, {1300, 832}},
2828
阿米娅左列表 = {{364, 913}},
29+
注册协议 = {text = "鹰角网络用户注册协议"},
30+
注册协议1 = "972|753|FCFCFC",
31+
注册协议2 = "972|843|616161",
2932
同意并继续 = {text = "同意并继续"},
3033
战略等级入口 = "1488|69|493828",
3134
战略源石锭入口 = "282|834|787878",
@@ -808,7 +811,8 @@ point = {
808811
面板邮件有 = "327|34|FF6801",
809812
用户名或密码错误 = "956|742|FFFFFF",
810813
确认白 = "956|742|FFFFFF",
811-
密码不能为空 = "1216|722|FFFFFF",
814+
-- 密码不能为空 = "1216|722|FFFFFF",
815+
密码不能为空 = "1215|721|FFFFFF,1201|721|4F0E0E",
812816
账号不能为空 = "1227|645|FFFFFF",
813817
enter = {1920 - 20, 1090 - 20},
814818
正在加载网络配置 = "880|1005|010101,874|1023|000000,910|1017|757575,928|1017|636363,964|1023|3A3A3A,994|1023|000000,1030|1023|4F4F4F,1048|1035|B5B5B5,1054|1035|2E2E2E,844|1029|000000,952|1023|FEFEFE,922|1023|A4A4A4",
@@ -1244,6 +1248,8 @@ autojs提供OCR、图像匹配、速度没测过。OCR看现有明日方舟辅
12441248
--]]
12451249

12461250
center = {
1251+
注册协议1 = "center_center",
1252+
注册协议2 = "center_center",
12471253
剿灭接管作战 = "center_center",
12481254
战略等级125 = "right_top",
12491255
阿米娅右列表 = "right_center",

release

Submodule release updated from 5e378cc to e3741d9

0 commit comments

Comments
 (0)