mirror of
https://github.com/blackmatrix7/ios_rule_script.git
synced 2025-12-12 01:22:12 +00:00
Init project
This commit is contained in:
120
script/tieba/README.md
Normal file
120
script/tieba/README.md
Normal file
@@ -0,0 +1,120 @@
|
||||
# 百度贴吧签到
|
||||
|
||||
## 前言
|
||||
|
||||
参考 https://github.com/NobyDa/Script/tree/master/BDTieBa-DailyBonus 做了彻底的重写。
|
||||
|
||||
做如下改动:
|
||||
|
||||
1. 精简合并通知
|
||||
|
||||
只显示签到贴吧总数、成功数量、失败数量,签到明细只会显示失败的,因为我并不关心哪些贴吧签到成功。
|
||||
|
||||
2. 增加重试机制
|
||||
|
||||
针对签到失败的贴吧,进行10次,每次间隔2秒的重试,可以极大提高签到成功率。
|
||||
|
||||
|
||||
## 配置
|
||||
|
||||
### Surge
|
||||
|
||||
使用模块
|
||||
|
||||
```ini
|
||||
https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/tieba/tieba_checkin.sgmodule
|
||||
```
|
||||
|
||||
### Quantumult X
|
||||
|
||||
```ini
|
||||
[rewrite_remote]
|
||||
https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/tieba/tieba_checkin.qxrewrite, tag=贴吧_获取Cookie, update-interval=86400, opt-parser=false, enabled=true
|
||||
|
||||
[task_local]
|
||||
30 0 * * * https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/tieba/tieba_checkin.js, tag=贴吧_每日签到, enabled=true
|
||||
```
|
||||
|
||||
### Loon
|
||||
|
||||
配置文件
|
||||
|
||||
```ini
|
||||
[Remote Script]
|
||||
https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/tieba/tieba_checkin.lnscript, tag=贴吧_每日签到, enabled=true
|
||||
```
|
||||
|
||||
## 获取Cookie
|
||||
|
||||
关闭贴吧后台,重新进入一次贴吧即可。
|
||||
|
||||

|
||||
|
||||
## 签到
|
||||
|
||||
带有重试机制,解决need vcode失败问题,凌晨高峰期签到也可以保证成功率。
|
||||
|
||||
全部签到成功时:
|
||||
|
||||

|
||||
|
||||
部分贴吧签到失败时:
|
||||
|
||||

|
||||
|
||||
## 统一推送
|
||||
|
||||
MagicJS利用Bark,实现了跨设备的统一推送能力,将多个iOS设备的脚本执行结果,统一推送到一个设备上。
|
||||
|
||||
执行效果图,以饿了么为例:
|
||||
|
||||

|
||||
|
||||
### 开启统一推送
|
||||
|
||||
你需要安装Bark这个APP,打开后可以得到类似这样的链接:
|
||||
|
||||
```http
|
||||
https://api.day.app/VXTWvaQ18N29bsQAg7DgkT
|
||||
```
|
||||
|
||||
在Surge、Loon、QuantumultX中执行以下代码,将链接写入(如何执行代码请自己动手解决)。
|
||||
|
||||
**Surge、Loon**
|
||||
|
||||
```javascript
|
||||
# 开启所有脚本统一推送
|
||||
$persistentStore.write("https://api.day.app/VXTWvaQ18N29bsQAg7DgkT", "magicjs_unified_push_url");
|
||||
```
|
||||
|
||||
**Quantumult X**
|
||||
|
||||
```javascript
|
||||
# 开启所有脚本统一推送
|
||||
$prefs.setValueForKey("https://api.day.app/VXTWvaQ18N29bsQAg7DgkT", "magicjs_unified_push_url");
|
||||
```
|
||||
|
||||
### 关闭统一推送
|
||||
|
||||
**Surge、Loon**
|
||||
|
||||
```javascript
|
||||
# 关闭所有脚本统一推送
|
||||
$persistentStore.write("", "magicjs_unified_push_url");
|
||||
```
|
||||
|
||||
**Quantumult X**
|
||||
|
||||
```javascript
|
||||
# 关闭所有脚本统一推送
|
||||
$prefs.setValueForKey("", "magicjs_unified_push_url");
|
||||
```
|
||||
|
||||
### 其他
|
||||
|
||||
1. 统一推送能力仅对支持的脚本有效。
|
||||
2. 开启统一推送后,所有支持统一推送的脚本,都会把通知推送到目标设备上。
|
||||
3. 限于Bark的功能,统一推送中的多媒体和链接不可用。
|
||||
4. 统一推送需要使用Bark的服务器,推送成功与否,与Bark服务器的可用性有关。
|
||||
5. 统一推送不会关闭APP的本地推送,即两个iOS设备都会有推送。
|
||||
6. 如有隐私考虑,可以参考Bark的服务端文档,自建服务端。
|
||||
BIN
script/tieba/images/01.jpg
Normal file
BIN
script/tieba/images/01.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 14 KiB |
BIN
script/tieba/images/02.jpg
Normal file
BIN
script/tieba/images/02.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 20 KiB |
BIN
script/tieba/images/03.jpg
Normal file
BIN
script/tieba/images/03.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.5 KiB |
BIN
script/tieba/tieba.png
Normal file
BIN
script/tieba/tieba.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 10 KiB |
174
script/tieba/tieba_checkin.js
Normal file
174
script/tieba/tieba_checkin.js
Normal file
File diff suppressed because one or more lines are too long
6
script/tieba/tieba_checkin.lnscript
Normal file
6
script/tieba/tieba_checkin.lnscript
Normal file
@@ -0,0 +1,6 @@
|
||||
# 百度贴吧签到
|
||||
|
||||
http-request ^https?:\/\/c\.tieba\.baidu\.com\/c\/s\/login script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/tieba/tieba_checkin.js,tag=贴吧_获取Cookie
|
||||
cron "30 0 * * *" script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/tieba/tieba_checkin.js,timeout=60,tag=贴吧_每日签到
|
||||
|
||||
hostname = c.tieba.baidu.com
|
||||
5
script/tieba/tieba_checkin.qxrewrite
Normal file
5
script/tieba/tieba_checkin.qxrewrite
Normal file
@@ -0,0 +1,5 @@
|
||||
# 百度贴吧每日自动签到
|
||||
|
||||
^https?:\/\/c\.tieba\.baidu\.com\/c\/s\/login url script-request-header https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/tieba/tieba_checkin.js
|
||||
|
||||
hostname = c.tieba.baidu.com
|
||||
10
script/tieba/tieba_checkin.sgmodule
Normal file
10
script/tieba/tieba_checkin.sgmodule
Normal file
@@ -0,0 +1,10 @@
|
||||
#!name=百度贴吧
|
||||
#!desc=百度贴吧每日自动签到
|
||||
#!system=ios
|
||||
|
||||
[Script]
|
||||
贴吧_每日签到 = type=cron,cronexp=30 0 * * *,timeout=60,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/tieba/tieba_checkin.js
|
||||
贴吧_获取cookie = type=http-request,pattern=^https?:\/\/c\.tieba\.baidu\.com\/c\/s\/login,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/tieba/tieba_checkin.js
|
||||
|
||||
[MITM]
|
||||
hostname = %APPEND% c.tieba.baidu.com
|
||||
Reference in New Issue
Block a user