[叮咚买菜] 支持多账户及青龙面板

This commit is contained in:
blackmatrix7 2022-09-15 21:15:39 +08:00
parent 6c45f31459
commit d0b0454ee5
6 changed files with 186 additions and 146 deletions

View File

@ -157,7 +157,8 @@
"name": "叮咚买菜", "name": "叮咚买菜",
"keys": [ "keys": [
"dingdongmaicai_checkin_cookie", "dingdongmaicai_checkin_cookie",
"dingdongmaicai_checkin_body" "dingdongmaicai_checkin_body",
"dingdongmaicai_sync_qinglong"
], ],
"author": "@blackmatrix7", "author": "@blackmatrix7",
"repo": "https://github.com/blackmatrix7/ios_rule_script/tree/master/script/dingdong", "repo": "https://github.com/blackmatrix7/ios_rule_script/tree/master/script/dingdong",
@ -165,7 +166,16 @@
"https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/dingdong/dingdong.png", "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/dingdong/dingdong.png",
"https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/dingdong/dingdong.png" "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/dingdong/dingdong.png"
], ],
"script": "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/dingdong/dingdong_checkin.js" "script": "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/dingdong/dingdong_checkin.js",
"settings": [
{
"id": "dingdongmaicai_sync_qinglong",
"name": "同步Cookie到青龙面板",
"val": false,
"type": "boolean",
"desc": "将获取的Cookies和Body同步至青龙面板"
}
]
}, },
{ {
"id": "blackmatrix7.eleme", "id": "blackmatrix7.eleme",

View File

@ -1,4 +1,4 @@
# 叮咚买菜 # 🧸叮咚买菜
叮咚买菜每日自动签到 叮咚买菜每日自动签到
@ -6,17 +6,19 @@
### Surge ### Surge
使用模块 安装模块
```ini
https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/dingdong/dingdong_checkin.sgmodule https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/dingdong/dingdong_checkin.sgmodule
```
### Loon ### Loon
使用远程脚本配置 安装插件
```ini ```ini
[Remote Script] [Remote Script]
https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/dingdong/dingdong_checkin.lnscript, tag=叮咚买菜_每日签到, enabled=true https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/dingdong/dingdong_checkin.lnplugin
``` ```
### Quantumult X ### Quantumult X
@ -28,66 +30,43 @@ https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/din
https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/dingdong/dingdong_checkin.qxrewrite, tag=叮咚买菜_获取Cookie, enabled=true https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/dingdong/dingdong_checkin.qxrewrite, tag=叮咚买菜_获取Cookie, enabled=true
[task_local] [task_local]
20 0 * * * https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/dingdong/dingdong_checkin.js, tag=叮咚买菜_每日签到, enabled=true 20 10 * * * https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/dingdong/dingdong_checkin.js, tag=叮咚买菜_每日签到, enabled=true
``` ```
## 获取Cookie ## 获取Cookie
叮咚买菜APP - 我的 - 右上角签到 叮咚买菜APP - 我的 - 右上角签到
## 统一推送 ## 多账户
MagicJS利用Bark实现了跨设备的统一推送能力将多个iOS设备的脚本执行结果统一推送到一个设备上 目前无法在单台iPhone/iPad设备上实现多账户执行每日签到
执行效果图,以饿了么为例: 多账户更多的作用是在多设备的情况下将Cookies和坐标同步至青龙面板由青龙面板执行多账户作业。
![](https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/eleme/images/bark.jpg) ## 脚本变量
### 开启统一推送 根据下表配置magic.json文件的内容
你需要安装Bark这个APP打开后可以得到类似这样的链接 | 名称 | 类型 | 说明 |
| ----------------------------- | ---- | -------------------------------------- |
| dingdongmaicai_checkin_cookie | Json | 多账户叮咚买菜Cookies |
| dingdongmaicai_checkin_body | Json | 多战虎叮咚买菜Body |
| dingdongmaicai_sync_qinglong | Bool | 是否将获取的Cookie和Body同步至青龙面板 |
```http 部分属性示例
https://api.day.app/VXTWvaQ18N29bsQAg7DgkT
```json
{
"dingdongmaicai_checkin_cookie": {
"magic_session": true,
"user_id1": "cookie_1",
"user_id2": "cookie_2"
},
"dingdongmaicai_checkin_body":{
"magic_session": true,
"user_id1": "body_1",
"user_id2": "body_2"
}
}
``` ```
在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的服务端文档自建服务端。

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,13 @@
#!name= 叮咚买菜
#!desc= 叮咚买菜每日自动签到
#!openUrl=https://github.com/blackmatrix7/ios_rule_script/tree/master/script/dingdong
#!author= blackmatrix7
#!homepage= https://github.com/blackmatrix7/ios_rule_script
#!icon= https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/dingdong/dingdong.png
[Script]
http-request ^https?:\/\/maicai\.api\.ddxq\.mobi\/point\/home\?api_version requires-body=1,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/dingdong/dingdong_checkin.js,tag=叮咚买菜_获取cookie
cron "20 9 * * *" script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/dingdong/dingdong_checkin.js,timeout=30,tag=叮咚买菜_每日签到
[MITM]
hostname = maicai.api.ddxq.mobi

View File

@ -1,6 +0,0 @@
# 叮咚买菜每日自动签到
http-request ^https?:\/\/maicai\.api\.ddxq\.mobi\/point\/home\?api_version requires-body=1,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/dingdong/dingdong_checkin.js,tag=叮咚买菜_获取cookie
cron "20 0 * * *" script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/dingdong/dingdong_checkin.js,timeout=30,tag=叮咚买菜_每日签到
hostname = maicai.api.ddxq.mobi

View File

@ -1,43 +1,35 @@
{"name":"blackmatrix7", {"name":"hellomatrix",
"task":[ "task":[
{ {
"config":"20 0 * * * https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/dingdong/dingdong_checkin.js, tag=叮咚买菜, img-url=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/dingdong/dingdong.png, enabled=true", "config":"25 9 * * * https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/dingdong/dingdong_checkin.js, tag=叮咚买菜, img-url=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/dingdong/dingdong.png, enabled=true",
"addons":"https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/dingdong/dingdong_checkin.qxrewrite,tag=叮咚买菜_获取Cookie" "addons":"https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/dingdong/dingdong_checkin.qxrewrite,tag=叮咚买菜_获取Cookie"
}, },
{ {
"config":"10 00 * * * https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/eleme/eleme_daily.js, tag=领取吃货豆, img-url=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/eleme/elem.png, enabled=true", "config":"00 9 * * * https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/eleme/eleme_daily.js, tag=领取吃货豆, img-url=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/eleme/elem.png, enabled=true",
"addons":"https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/eleme/eleme_daily.qxrewrite,tag=饿了么_获取Cookie" "addons":"https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/eleme/eleme_daily.qxrewrite,tag=饿了么_获取Cookie"
}, },
{ {
"config":"00 10 * * * https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/eleme/eleme_mission.js, tag=领取会员任务, img-url=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/eleme/elem.png, enabled=true", "config":"15 00 * * * https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/famijia/famijia_checkin.js, tag=Fa米家, img-url=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/famijia/famijia.png, enabled=true",
"addons":"https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/eleme/eleme_daily.qxrewrite,tag=饿了么_获取Cookie"
},
{
"config":"15 0 * * * https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/famijia/famijia_checkin.js, tag=Fa米家, img-url=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/famijia/famijia.png, enabled=true",
"addons":"https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/famijia/famijia_checkin.qxrewrite,tag=Fa米家_获取Cookie" "addons":"https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/famijia/famijia_checkin.qxrewrite,tag=Fa米家_获取Cookie"
}, },
{ {
"config":"20 0 * * * https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/luka/luka_signin.js, tag=Luka, img-url=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/luka/luka.png, enabled=true", "config":"25 00 * * * https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/luka/luka_signin.js, tag=Luka, img-url=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/luka/luka.png, enabled=true",
"addons":"https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/luka/luka_signin.qxrewrite,tag=Luka_获取Cookie" "addons":"https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/luka/luka_signin.qxrewrite,tag=Luka_获取Cookie"
}, },
{ {
"config":"30 0 * * * https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/tieba/tieba_checkin.js, tag=百度贴吧, img-url=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/tieba/tieba.png, enabled=true", "config":"30 10 * * * https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/tieba/tieba_signin.js, tag=百度贴吧, img-url=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/tieba/tieba.png, enabled=true",
"addons":"https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/tieba/tieba_checkin.qxrewrite,tag=贴吧_获取Cookie" "addons":"https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/tieba/tieba_signin.qxrewrite,tag=贴吧_获取Cookie"
}, },
{ {
"config":"20 0 * * * https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/manmanbuy/manmanbuy_checkin.js, tag=慢慢买, img-url=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/manmanbuy/manmanmai.png, enabled=true", "config":"20 00 * * * https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/manmanbuy/manmanbuy_checkin.js, tag=慢慢买, img-url=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/manmanbuy/manmanmai.png, enabled=true",
"addons":"https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/manmanbuy/manmanbuy_checkin.qxrewrite,tag=慢慢买_获取Cookie" "addons":"https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/manmanbuy/manmanbuy_checkin.qxrewrite,tag=慢慢买_获取Cookie"
}, },
{ {
"config":"5 0 * * * https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/smzdm/smzdm_signin.js, tag=每日签到, img-url=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/smzdm/smzdm.png, enabled=true", "config":"05 9 * * * https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/smzdm/smzdm_daily.js, tag=签到与任务, img-url=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/smzdm/smzdm.png, enabled=true",
"addons":"https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/smzdm/smzdm_signin.qxrewrite,tag=什么值得买_获取Cookie" "addons":"https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/smzdm/smzdm_daily.qxrewrite,tag=什么值得买_获取Cookie"
}, },
{ {
"config":"20 0 * * * https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/smzdm/smzdm_mission.js, tag=每日任务, img-url=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/smzdm/smzdm.png, enabled=true", "config":"30 00 * * * https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/meituan/maicai_checkin.js, tag=美团买菜, img-url=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/meituan/maicai.png, enabled=true",
"addons":"https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/smzdm/smzdm_signin.qxrewrite,tag=什么值得买_获取Cookie"
},
{
"config":"30 0 * * * https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/meituan/maicai_checkin.js, tag=美团买菜, img-url=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/meituan/maicai.png, enabled=true",
"addons":"https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/meituan/maicai_checkin.qxrewrite,tag=美团买菜_获取Cookie" "addons":"https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/meituan/maicai_checkin.qxrewrite,tag=美团买菜_获取Cookie"
}, },
{ {