8000 更新[顺丰速运]: 恢复 APP 端签到,感谢 @wangfei021325 · webdev123456/scripts@91d7343 · GitHub
[go: up one dir, main page]

Skip to content

Commit 91d7343

Browse files
committed
更新[顺丰速运]: 恢复 APP 端签到,感谢 @wangfei021325
1 parent 663b985 commit 91d7343

File tree

4 files changed

+182
-218
lines changed

4 files changed

+182
-218
lines changed

box/chavy.boxjs.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,8 +282,8 @@
282282
{
283283
"id": "sfexpress",
284284
"name": "顺丰速运",
285-
"keys": ["chavy_loginurl_sfexpress", "chavy_loginheader_sfexpress"],
286-
"author": "@chavyleung",
285+
"keys": ["chavy_login_sfexpress"],
286+
"author": "@wangfei021325, @chavyleung",
287287
"repo": "https://github.com/chavyleung/scripts/blob/master/sfexpress",
288288
"script": "https://raw.githubusercontent.com/chavyleung/scripts/master/sfexpress/sfexpress.js",
289289
"icons": [

sfexpress/README.md

Lines changed: 22 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -1,108 +1,49 @@
1-
# 顺丰速运
2-
3-
> 代码已同时兼容 Surge & QuanX, 使用同一份签到脚本即可
4-
5-
> 2020.1.22 据实测顺丰的 Cookie 只能存活 1 天不到,大家先弃坑
6-
7-
> 2020.3.15 恢复顺丰签到 (更新脚本、更新配置、重取 Cookie) (QuanX&Surge、商店&TF 都支持)
8-
9-
> 2020.3.20 修复多余的登录失败提示问题 & 修复没有 \$done() 问题
10-
11-
> 2020.3.30 增加 27 周年签到 (增加 1 条`mitm`和 1 条`rewrite`)
12-
13-
> 2020.5.6 移除 27 周年签到 (活动结束)
1+
# 顺丰速运 (APP)
142

153
## 配置 (Surge)
164

175
```properties
186
[MITM]
19-
hostname = sf-integral-sign-in.weixinjia.net, mcs-mimp-web.sf-express.com
7+
hostname = ccsp-egmas.sf-express.com
208

219
[Script]
22-
http-request ^https:\/\/sf-integral-sign-in.weixinjia.net\/app\/index script-path=https://raw.githubusercontent.com/chavyleung/scripts/master/sfexpress/sfexpress.cookie.js
23-
http-request ^https:\/\/mcs-mimp-web.sf-express.com\/mcs-mimp\/share\/(.*?)Redirect script-path=https://raw.githubusercontent.com/chavyleung/scripts/master/sfexpress/sfexpress.cookie.js
24-
cron "*/10 * * * * *" script-path=scripts/sfexpress.js
10+
Rewrite: 顺丰速运 = type=http-request, pattern=^https:\/\/ccsp-egmas.sf-express.com\/cx-app-member\/member\/app\/user\/universalSign,script-path=https://raw.githubusercontent.com/chavyleung/scripts/master/sfexpress/sfexpress.cookie.js,requires-body=true
11+
cron "*/10 * * * * *" script-path=https://raw.githubusercontent.com/chavyleung/scripts/master/sfexpress/sfexpress.js
2512
```
2613

2714
## 配置 (QuanX)
2815

2916
```properties
3017
[MITM]
31-
hostname = sf-integral-sign-in.weixinjia.net, mcs-mimp-web.sf-express.com
18+
hostname = ccsp-egmas.sf-express.com
3219

3320
[rewrite_local]
34-
# [商店版]
35-
^https:\/\/sf-integral-sign-in.weixinjia.net\/app\/index url script-request-header sfexpress.cookie.js
36-
^https:\/\/mcs-mimp-web.sf-express.com\/mcs-mimp\/share\/(.*?)Redirect url script-request-header sfexpress.cookie.js
37-
38-
# [TF版]
39-
^https:\/\/sf-integral-sign-in.weixinjia.net\/app\/index url script-request-header https://raw.githubusercontent.com/chavyleung/scripts/master/sfexpress/sfexpress.cookie.js
40-
^https:\/\/mcs-mimp-web.sf-express.com\/mcs-mimp\/share\/(.*?)Redirect url script-request-header https://raw.githubusercontent.com/chavyleung/scripts/master/sfexpress/sfexpress.cookie.js
21+
^https:\/\/ccsp-egmas.sf-express.com\/cx-app-member\/member\/app\/user\/universalSign url script-request-body https://raw.githubusercontent.com/chavyleung/scripts/master/sfexpress/sfexpress.cookie.js
4122

4223
[task_local]
43-
1 0 * * * sfexpress.js
24+
1 0 * * * https://raw.githubusercontent.com/chavyleung/scripts/master/sfexpress/sfexpress.js
4425
```
4526

46-
## 说明
47-
48-
1. 先把`sf-integral-sign-in.weixinjia.net`加到`[MITM]`
49-
2. 再配置重写规则:
50-
- Surge: 把两条远程脚本放到`[Script]`
51-
- QuanX: 把`sfexpress.cookie.js``sfexpress.js`传到`On My iPhone - Quantumult X - Scripts` (传到 iCloud 相同目录也可, 注意要打开 quanx 的 iCloud 开关)
52-
3. 打开 APP, 访问下`我的顺丰` > `去签到` (访问下`去签到`的页面即可, 不用点`签到`), 系统提示: `获取Cookie: 成功`
53-
4. 打开 APP, 访问下`27周年庆`, 系统提示: `获取Cookie: 成功 (27周年)`
54-
5. 最后就可以把第 1 条脚本注释掉了
55-
56-
> 第 1 条脚本是用来获取 cookie 的, 用浏览器访问一次获取 cookie 成功后就可以删掉或注释掉了, 但请确保在`登录成功`后再获取 cookie.
57-
58-
> 第 2 条脚本是签到脚本, 每天`00:00:10`执行一次.
59-
60-
## 常见问题
61-
62-
1. 无法写入 Cookie
63-
64-
- 检查 Surge 系统通知权限放开了没
65-
- 如果你用的是 Safari, 请尝试在浏览地址栏`手动输入网址`(不要用复制粘贴)
27+
## 配置 (Loon)
6628

67-
2. 写入 Cookie 成功, 但签到不成功
68-
69-
- 看看是不是在登录前就写入 Cookie 了
70-
- 如果是,请确保在登录成功后,再尝试写入 Cookie
71-
72-
3. 为什么有时成功有时失败
73-
74-
- 很正常,网络问题,哪怕你是手工签到也可能失败(凌晨签到容易拥堵就容易失败)
75-
- 暂时不考虑代码级的重试机制,但咱有配置级的(暴力美学):
76-
77-
- `Surge`配置:
78-
79-
```properties
80-
# 没有什么是一顿饭解决不了的:
81-
cron "10 0 0 * * *" script-path=xxx.js # 每天00:00:10执行一次
82-
# 如果有,那就两顿:
83-
cron "20 0 0 * * *" script-path=xxx.js # 每天00:00:20执行一次
84-
# 实在不行,三顿也能接受:
85-
cron "30 0 0 * * *" script-path=xxx.js # 每天00:00:30执行一次
29+
```properties
30+
[MITM]
31+
hostname = ccsp-egmas.sf-express.com
8632

87-
# 再粗暴点,直接:
88-
cron "* */60 * * * *" script-path=xxx.js # 每60分执行一次
89-
```
33+
[rewrite_local]
34+
http-request ^https:\/\/ccsp-egmas.sf-express.com\/cx-app-member\/member\/app\/user\/universalSign script-path=https://raw.githubusercontent.com/chavyleung/scripts/master/sfexpress/sfexpress.cookie.js, requires-body=true, tag=Rewrite: 顺丰速运
9035

91-
- `QuanX`配置:
36+
[task_local]
37+
cron "1 0 * * *" script-path=https://raw.githubusercontent.com/chavyleung/scripts/master/sfexpress/sfexpress.js
38+
```
9239< 9E7A div class="diff-text-inner">
93-
```properties
94-
[task_local]
95-
1 0 * * * xxx.js # 每天00:01执行一次
96-
2 0 * * * xxx.js # 每天00:02执行一次
97-
3 0 * * * xxx.js # 每天00:03执行一次
40+
## 说明
9841

99-
*/60 * * * * xxx.js # 每60分执行一次
100-
```
42+
1. 配置重写
43+
2. `APP` 我的顺丰 > 任务中心 > 去签到
44+
3. 提示 `获取会话: 成功`
45+
4. 注释重写
10146

10247
## 感谢
10348

104-
[@NobyDa](https://github.com/NobyDa)
105-
106-
[@lhie1](https://github.com/lhie1)
107-
108-
[@ConnersHua](https://github.com/ConnersHua)
49+
[@wangfei021325](https://github.com/wangfei021325)

sfexpress/sfexpress.cookie.js

Lines changed: 19 additions & 63 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sfexpress/sfexpress.js

Lines changed: 139 additions & 72 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)
0