From b895dc175d6261e6bacc5de3969ad67e076534fc Mon Sep 17 00:00:00 2001
From: blackmatrix7 <27717518+blackmatrix7@users.noreply.github.com>
Date: Tue, 30 Aug 2022 21:21:56 +0800
Subject: [PATCH] =?UTF-8?q?[=E9=A5=BF=E4=BA=86=E4=B9=88]=20=E4=BF=AE?=
=?UTF-8?q?=E5=A4=8D=E4=B8=8D=E8=83=BD=E8=8E=B7=E5=8F=96Cookie=E7=9A=84?=
=?UTF-8?q?=E9=97=AE=E9=A2=98=E5=8F=8A=E5=A2=9E=E5=8A=A0=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
script/boxjs.json | 261 ++++++++++++++----
script/eleme/README.md | 126 +++++----
script/eleme/eleme_daily.js | 138 +++++----
script/eleme/eleme_daily.lnplugin | 17 ++
script/eleme/eleme_daily.lnscript | 7 -
script/eleme/eleme_daily.qxrewrite | 5 +-
script/eleme/eleme_daily.sgmodule | 11 +-
script/eleme/eleme_mission.js | 14 +-
script/eleme/images/bark_conf.jpg | Bin 0 -> 99903 bytes
script/gallery.json | 8 -
.../jiazhangbang/jiazhangbang_checkin.js | 0
.../jiazhangbang_checkin.sgmodule | 0
script/{ => obsolete}/wanda/README.md | 0
script/{ => obsolete}/wanda/wanda.png | Bin
script/{ => obsolete}/wanda/wanda_checkin.js | 0
.../wanda/wanda_checkin.lnscript | 0
.../wanda/wanda_checkin.qxrewrite | 0
.../wanda/wanda_checkin.sgmodule | 0
18 files changed, 382 insertions(+), 205 deletions(-)
create mode 100644 script/eleme/eleme_daily.lnplugin
delete mode 100644 script/eleme/eleme_daily.lnscript
create mode 100644 script/eleme/images/bark_conf.jpg
rename script/{ => obsolete}/jiazhangbang/jiazhangbang_checkin.js (100%)
rename script/{ => obsolete}/jiazhangbang/jiazhangbang_checkin.sgmodule (100%)
rename script/{ => obsolete}/wanda/README.md (100%)
rename script/{ => obsolete}/wanda/wanda.png (100%)
rename script/{ => obsolete}/wanda/wanda_checkin.js (100%)
rename script/{ => obsolete}/wanda/wanda_checkin.lnscript (100%)
rename script/{ => obsolete}/wanda/wanda_checkin.qxrewrite (100%)
rename script/{ => obsolete}/wanda/wanda_checkin.sgmodule (100%)
diff --git a/script/boxjs.json b/script/boxjs.json
index fe71ef19d..95662f189 100644
--- a/script/boxjs.json
+++ b/script/boxjs.json
@@ -6,18 +6,38 @@
"repo": "https://github.com/blackmatrix7/ios_rule_script",
"apps": [
{
- "id": "blackmatrix7.10010",
- "name": "联通每日签到与抽奖",
- "keys": ["unicom_user_cookie", "unicom_mobile", "unicom_encrypt_mobile", "city_code"],
+ "id": "blackmatrix7.bark",
+ "name": "Bark推送",
+ "keys": [
+ "bark_url"
+ ],
+ "settings": [
+ {
+ "id": "bark_url",
+ "name": "Bark推送URL",
+ "val": "",
+ "type": "input",
+ "placeholder": "https://api.day.app/xxxxxxxxxxxxxxxxxx/",
+ "autoGrow": true,
+ "desc": "填写Bark推送的链接,脚本通知将通过Bark推送"
+ }
+ ],
"author": "@blackmatrix7",
- "repo": "https://github.com/blackmatrix7/ios_rule_script/tree/master/script/10010",
- "icons": ["https://raw.githubusercontent.com/Orz-3/mini/master/Alpha/10010.png", "https://raw.githubusercontent.com/Orz-3/mini/master/Color/10010.png"],
- "script": "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/10010/unicom_signin.js"
+ "repo": "https://git.codecolor.cool/matrix/script/bilibili",
+ "icons": [
+ "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/icon/matrix/dark/bark.jpg",
+ "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/icon/matrix/color/bark.jpg"
+ ]
},
{
"id": "blackmatrix7.bilibili",
"name": "哔哩哔哩去广告",
- "keys": ["bilibili_story_aid", "bilibili_feed_black", "bilibili_disable_index_story", "bilibili_enable_mall"],
+ "keys": [
+ "bilibili_story_aid",
+ "bilibili_feed_black",
+ "bilibili_disable_index_story",
+ "bilibili_enable_mall"
+ ],
"settings": [
{
"id": "bilibili_feed_black",
@@ -46,42 +66,41 @@
],
"author": "@blackmatrix7",
"repo": "https://github.com/blackmatrix7/ios_rule_script/tree/master/script/bilibili",
- "icons": ["https://raw.githubusercontent.com/Orz-3/mini/master/Alpha/bilibili.png", "https://raw.githubusercontent.com/Orz-3/mini/master/Color/bilibili.png"]
- },
- {
- "id": "blackmatrix7.didachuxing",
- "name": "嘀嗒出行",
- "keys": ["dida_cid", "dida_cookie", "dida_useragent", "dida_access_token"],
- "author": "@blackmatrix7",
- "repo": "https://github.com/blackmatrix7/ios_rule_script/tree/master/script/didachuxing",
- "icons": ["https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/didachuxing/didachuxing.png", "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/didachuxing/didachuxing.png"],
- "script": "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/didachuxing/didachuxing_plus.js"
- },
- {
- "id": "blackmatrix7.didichuxing",
- "name": "滴滴出行",
- "keys": ["didi_token", "didi_city_id", "didi_lottery_id", "didi_my_source_id", "didi_group_id", "didi_finance_channel_id", "didi_finance_activity_id"],
- "author": "@blackmatrix7",
- "repo": "https://github.com/blackmatrix7/ios_rule_script/tree/master/script/didichuxing",
- "icons": ["https://raw.githubusercontent.com/Orz-3/mini/master/Alpha/didi.png", "https://raw.githubusercontent.com/Orz-3/mini/master/Color/didi.png"],
- "script": "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/didichuxing/didi_checkin.js"
+ "icons": [
+ "https://raw.githubusercontent.com/Orz-3/mini/master/Alpha/bilibili.png",
+ "https://raw.githubusercontent.com/Orz-3/mini/master/Color/bilibili.png"
+ ]
},
{
"id": "blackmatrix7.dingdong",
"name": "叮咚买菜",
- "keys": ["dingdongmaicai_checkin_cookie", "dingdongmaicai_checkin_body"],
+ "keys": [
+ "dingdongmaicai_checkin_cookie",
+ "dingdongmaicai_checkin_body"
+ ],
"author": "@blackmatrix7",
"repo": "https://github.com/blackmatrix7/ios_rule_script/tree/master/script/dingdong",
- "icons": ["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"],
+ "icons": [
+ "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"
},
{
"id": "blackmatrix7.eleme",
"name": "饿了么",
- "keys": ["eleme_app_cookie", "eleme_app_longitude", "eleme_app_latitude"],
+ "keys": [
+ "eleme_app_cookie",
+ "eleme_app_longitude",
+ "eleme_app_latitude",
+ "eleme_task_keywords"
+ ],
"author": "@blackmatrix7",
- "repo": "https://github.com/blackmatrix7/ios_rule_script/tree/master/script/eleme",
- "icons": ["https://raw.githubusercontent.com/Orz-3/mini/master/Alpha/elem.png", "https://raw.githubusercontent.com/Orz-3/mini/master/Color/elem.png"],
+ "repo": "https://git.codecolor.cool/matrix/script/eleme",
+ "icons": [
+ "https://raw.githubusercontent.com/Orz-3/mini/master/Alpha/elem.png",
+ "https://raw.githubusercontent.com/Orz-3/mini/master/Color/elem.png"
+ ],
"scripts": [
{
"name": "领取吃货豆",
@@ -91,51 +110,155 @@
"name": "领取会员任务",
"script": "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/eleme/eleme_mission.js"
}
+ ],
+ "settings": [
+ {
+ "id": "eleme_app_cookie",
+ "name": "Cookie",
+ "val": "",
+ "type": "input",
+ "placeholder": "",
+ "autoGrow": true,
+ "desc": "填写获取的饿了么Cookie"
+ },
+ {
+ "id": "eleme_app_longitude",
+ "name": "经度",
+ "val": "",
+ "type": "input",
+ "placeholder": "",
+ "autoGrow": true,
+ "desc": "填写抓包获取的饿了么经度"
+ },
+ {
+ "id": "eleme_app_latitude",
+ "name": "纬度",
+ "val": "",
+ "type": "input",
+ "placeholder": "",
+ "autoGrow": true,
+ "desc": "填写抓包获取的饿了么纬度"
+ },
+ {
+ "id": "eleme_task_keywords",
+ "name": "任务关键字",
+ "val": "美食外卖;",
+ "type": "input",
+ "placeholder": "多个关键词以;分隔,越靠前的关键词优先级越高",
+ "autoGrow": true,
+ "desc": "只领取含有关键字的任务"
+ },
+ {
+ "id": "magicjs_loglevel",
+ "name": "日志等级",
+ "val": "INFO",
+ "type": "radios",
+ "items": [
+ {
+ "key": "INFO",
+ "label": "INFO"
+ },
+ {
+ "key": "WARNING",
+ "label": "WARNING"
+ },
+ {
+ "key": "ERROR",
+ "label": "ERROR"
+ },
+ {
+ "key": "CRITICAL",
+ "label": "CRITICAL"
+ },
+ {
+ "key": "DEBUG",
+ "label": "DEBUG"
+ }
+ ],
+ "desc": "出现异常时请选择DEBUG提交日志"
+ }
]
},
{
"id": "blackmatrix7.famijia",
"name": "Fa米家",
- "keys": ["famijia_checkin_cookie", "famijia_device_id", "famijia_black_box"],
+ "keys": [
+ "famijia_checkin_cookie",
+ "famijia_device_id",
+ "famijia_black_box"
+ ],
"author": "@blackmatrix7",
"repo": "https://github.com/blackmatrix7/ios_rule_script/tree/master/script/famijia",
- "icons": ["https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/famijia/famijia.png", "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/famijia/famijia.png"],
+ "icons": [
+ "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/famijia/famijia.png",
+ "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/famijia/famijia.png"
+ ],
"script": "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/famijia/famijia_checkin.js"
},
{
"id": "blackmatrix7.luka",
"name": "Luka阅读养成",
- "keys": ["luka_checkin_cookie", "luka_signin_auth"],
+ "keys": [
+ "luka_checkin_cookie",
+ "luka_signin_auth"
+ ],
"author": "@blackmatrix7",
"repo": "https://github.com/blackmatrix7/ios_rule_script/tree/master/script/luka",
- "icons": ["https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/luka/luka.png", "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/luka/luka.png"],
+ "icons": [
+ "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/luka/luka.png",
+ "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/luka/luka.png"
+ ],
"script": "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/luka/luka_signin.js"
},
{
"id": "blackmatrix7.manmanbuy",
"name": "慢慢买",
- "keys": ["manmanbuy_checkin_cookie", "manmanbuy_login_body", "manmanbuy_username", "manmanbuy_deviceid"],
+ "keys": [
+ "manmanbuy_checkin_cookie",
+ "manmanbuy_login_body",
+ "manmanbuy_username",
+ "manmanbuy_deviceid"
+ ],
"author": "@blackmatrix7",
"repo": "https://github.com/blackmatrix7/ios_rule_script/tree/master/script/manmanbuy",
- "icons": ["https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/manmanbuy/manmanmai.png", "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/manmanbuy/manmanmai.png"],
+ "icons": [
+ "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/manmanbuy/manmanmai.png",
+ "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/manmanbuy/manmanmai.png"
+ ],
"script": "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/manmanbuy/manmanbuy_checkin.js"
},
{
"id": "blackmatrix7.meituan",
"name": "美团买菜",
- "keys": ["meituan_mall_cookie", "meituan_mall_t", "meituan_mall_querystring", "meituan_mall_uuid", "meituan_mall_userid", "meituan_mall_body"],
+ "keys": [
+ "meituan_mall_cookie",
+ "meituan_mall_t",
+ "meituan_mall_querystring",
+ "meituan_mall_uuid",
+ "meituan_mall_userid",
+ "meituan_mall_body"
+ ],
"author": "@blackmatrix7",
"repo": "https://github.com/blackmatrix7/ios_rule_script/tree/master/script/meituan",
- "icons": ["https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/meituan/maicai.png", "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/meituan/maicai.png"],
+ "icons": [
+ "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/meituan/maicai.png",
+ "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/meituan/maicai.png"
+ ],
"script": "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/meituan/maicai_checkin.js"
},
{
"id": "blackmatrix7.smzdm",
"name": "什么值得买",
- "keys": ["smzdm_cookie", "smzdm_session"],
+ "keys": [
+ "smzdm_cookie",
+ "smzdm_session"
+ ],
"author": "@blackmatrix7",
"repo": "https://github.com/blackmatrix7/ios_rule_script/tree/master/script/smzdm",
- "icons": ["https://raw.githubusercontent.com/Orz-3/mini/master/Alpha/smzdm.png", "https://raw.githubusercontent.com/Orz-3/mini/master/Color/smzdm.png"],
+ "icons": [
+ "https://raw.githubusercontent.com/Orz-3/mini/master/Alpha/smzdm.png",
+ "https://raw.githubusercontent.com/Orz-3/mini/master/Color/smzdm.png"
+ ],
"scripts": [
{
"name": "每日自动任务",
@@ -150,28 +273,31 @@
{
"id": "blackmatrix7.tieba",
"name": "百度贴吧",
- "keys": ["tieba_checkin_cookie"],
+ "keys": [
+ "tieba_checkin_cookie"
+ ],
"author": "@blackmatrix7",
"repo": "https://github.com/blackmatrix7/ios_rule_script/tree/master/script/tieba",
- "icons": ["https://raw.githubusercontent.com/Orz-3/mini/master/Alpha/tieba.png", "https://raw.githubusercontent.com/Orz-3/mini/master/Color/tieba.png"],
+ "icons": [
+ "https://raw.githubusercontent.com/Orz-3/mini/master/Alpha/tieba.png",
+ "https://raw.githubusercontent.com/Orz-3/mini/master/Color/tieba.png"
+ ],
"script": "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/tieba/tieba_checkin.js"
},
- {
- "id": "blackmatrix7.wanda",
- "name": "万达电影",
- "keys": ["wanda_checkin_cookie", "wanda_activitycode"],
- "author": "@blackmatrix7",
- "repo": "https://github.com/blackmatrix7/ios_rule_script/tree/master/script/wanda",
- "icons": ["https://raw.githubusercontent.com/Orz-3/mini/master/Alpha/wanda.png", "https://raw.githubusercontent.com/Orz-3/mini/master/Color/wanda.png"],
- "script": "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/wanda/wanda_checkin.js"
- },
{
"id": "blackmatrix7.zhihu",
"name": "知乎助手",
- "keys": ["zhihu_blocked_users", "zhihu_current_userinfo", "zhihu_keyword_block"],
+ "keys": [
+ "zhihu_blocked_users",
+ "zhihu_current_userinfo",
+ "zhihu_keyword_block"
+ ],
"author": "@blackmatrix7",
"repo": "https://github.com/blackmatrix7/ios_rule_script/tree/master/script/zhihu",
- "icons": ["https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/zhihu/zhihu.png", "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/zhihu/zhihu.png"],
+ "icons": [
+ "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/zhihu/zhihu.png",
+ "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/zhihu/zhihu.png"
+ ],
"descs_html": [
"
",
"✨为Plus版本专属功能,❓为已过时或即将淘汰功能
",
@@ -309,7 +435,12 @@
{
"id": "blackmatrix7.synology",
"name": "Synology",
- "keys": ["syno_https_url", "syno_account", "syno_passwd", "syno_sid"],
+ "keys": [
+ "syno_https_url",
+ "syno_account",
+ "syno_passwd",
+ "syno_sid"
+ ],
"settings": [
{
"id": "syno_https_url",
@@ -379,7 +510,10 @@
],
"author": "@blackmatrix7",
"repo": "https://github.com/blackmatrix7/ios_rule_script/tree/master/script/synology",
- "icons": ["https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/synology/icon/synology_dark.jpg", "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/synology/icon/synology.jpg"],
+ "icons": [
+ "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/synology/icon/synology_dark.jpg",
+ "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/synology/icon/synology.jpg"
+ ],
"scripts": [
{
"name": "登录Synology",
@@ -390,7 +524,13 @@
{
"id": "blackmatrix7.applestore",
"name": "AppleStore",
- "keys": ["goods_model", "applestore_region", "applestore_bark_url", "applestore_stock", "onlinestore_stock"],
+ "keys": [
+ "goods_model",
+ "applestore_region",
+ "applestore_bark_url",
+ "applestore_stock",
+ "onlinestore_stock"
+ ],
"author": "@blackmatrix7",
"repo": "https://github.com/blackmatrix7/ios_rule_script/tree/master/script/applestore",
"settings": [
@@ -483,7 +623,10 @@
"desc": "出现异常时请选择DEBUG提交日志"
}
],
- "icons": ["https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/applestore/icon/applestore_dark.png", "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/applestore/icon/applestore.png"]
+ "icons": [
+ "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/applestore/icon/applestore_dark.png",
+ "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/applestore/icon/applestore.png"
+ ]
}
]
-}
+}
\ No newline at end of file
diff --git a/script/eleme/README.md b/script/eleme/README.md
index 7f05f43d5..633420a33 100644
--- a/script/eleme/README.md
+++ b/script/eleme/README.md
@@ -6,26 +6,15 @@
自动领取吃货豆,非会员可能能用,我没有非会员账号,无法验证,有兴趣可以自己试试。
-## 最近更新
-
-1. 拆分领取吃货豆和领取会员任务的脚本
-2. 支持最新多选一任务
-3. 适配饿了么最新的吃货豆活动
-4. 增加自动领取吃货豆功能
-
## 特别说明
-目前已将领取吃货豆和领取会员任务的脚本拆分,请按需部署脚本。
+### 获取数据
-如果使用现成的Surge模块或Loon插件,则会在0点10分领取吃货豆,在早上10点领取任务列表中第一个可以领取的任务。
-
-### 领取吃货豆
-
-脚本自动领取APP中未领取的吃货豆。
+需要同时获取到Cookie与坐标,脚本才能正常执行,获取方法见后。
### 多选一任务
-对于最新更新的多选一任务,脚本会依次尝试领取所有任务。但因为多选一的关系,通常只会有第一个任务能成功领取。
+脚本会依次尝试领取所有任务。但因为多选一的关系,通常只会有第一个任务能成功领取。
## 配置说明
@@ -33,15 +22,16 @@
使用模块
+```ini
https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/eleme/eleme_daily.sgmodule
+```
### Loon
-使用远程脚本配置
+使用插件
```ini
-[Remote Script]
-https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/eleme/eleme_daily.lnscript, tag=饿了么_领取吃货豆及任务, enabled=true
+https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/eleme/eleme_daily.lnplugin
```
### Quantumult X
@@ -53,67 +43,75 @@ https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/ele
https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/eleme/eleme_daily.qxrewrite, tag=饿了么_获取Cookie, enabled=true
[task_local]
-10 00 * * * https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/eleme/eleme_daily.js, tag=饿了么_领取吃货豆, enabled=true
-00 10 * * * https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/eleme/eleme_mission.js, tag=饿了么_领取会员任务, enabled=true
+05 10 * * * https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/eleme/eleme_daily.js, tag=饿了么_领取吃货豆, enabled=true
+05 10 * * * https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/eleme/eleme_mission.js, tag=饿了么_领取会员任务, enabled=true
```
-## 获取Cookie
+## 获取数据
-饿了么APP - 我的 - 超级吃货卡
+### 获取Cookie
-## 统一推送
+打开饿了么APP即可。
-MagicJS利用Bark,实现了跨设备的统一推送能力,将多个iOS设备的脚本执行结果,统一推送到一个设备上。
+### 获取坐标
-执行效果图,以饿了么为例:
+打开饿了么APP - 我的 - 赚吃货豆。
+
+由于获取坐标的请求不是每次都触发的,如果没有正确获取到坐标,建议移除饿了么APP后台,间隔10分钟后,再尝试上述操作。
+
+或者通过其他途径获取自身坐标,通过BoxJS填入。
+
+## Bark推送
+
+通过BoxJS,配置Bark推送链接,可以将脚本通知,通过Bark推送到其他设备上。
+
+以饿了么为例:
![](https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/eleme/images/bark.jpg)
-### 开启统一推送
+在BoxJS中填写Bark推送链接即可。
-你需要安装Bark这个APP,打开后可以得到类似这样的链接:
+
-```http
-https://api.day.app/VXTWvaQ18N29bsQAg7DgkT
+## 青龙面板
+
+MagicJS所有的变量,都存储在脚本同级目录下的`magic.json`文件中,不支持通过环境变量读取变量。
+
+在青龙面板中,在左侧菜单选择脚本管理,新建 `magic.json` 文件(文件名不可修改)。
+
+写入如下json:
+
+```json
+{
+ "eleme_app_cookie": "xxxxxxxxxxxxxxxxx",
+ "eleme_app_longitude": "111.1111111111",
+ "eleme_app_latitude": "111.1111111111",
+ "eleme_task_keywords": "美食外卖",
+ "bark_url": "https://api.day.app/xxxxxxxxxxxxxxxxxx/"
+}
```
-在Surge、Loon、QuantumultX中执行以下代码,将链接写入(如何执行代码请自己动手解决)。
+变量说明
-**Surge、Loon**
+| 变量名 | 说明 |
+| ------------------- | ---------------------------------------------- |
+| eleme_app_cookie | 饿了么Cookie |
+| eleme_app_longitude | 饿了么经度 |
+| eleme_app_latitude | 饿了么纬度 |
+| eleme_task_keywords | 饿了么任务关键词,含有此关键词的任务才会被领取 |
+| bark_url | Bark推送地址 |
-```javascript
-# 开启所有脚本统一推送
-$persistentStore.write("https://api.day.app/VXTWvaQ18N29bsQAg7DgkT", "magicjs_unified_push_url");
+如果你正在使用多个由MagicJS支持的脚本,可以将变量写在同一个`magic.json`文件中,例如:
+
+```json
+{
+ "smzdm_cookie": "xxxxxxxxxxxxxxxxxxxxx",
+ "smzdm_session": "xxxxxxxxxxxxxxxxxxxxx",
+ "eleme_app_cookie": "xxxxxxxxxxxxxxxxx",
+ "eleme_app_longitude": "111.1111111111",
+ "eleme_app_latitude": "111.1111111111",
+ "eleme_task_keywords": "美食外卖",
+ "bark_url": "https://api.day.app/xxxxxxxxxxxxxxxxxx/"
+}
```
-**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的服务端文档,自建服务端。
\ No newline at end of file
diff --git a/script/eleme/eleme_daily.js b/script/eleme/eleme_daily.js
index bd9f8eae6..f0d0c78da 100644
--- a/script/eleme/eleme_daily.js
+++ b/script/eleme/eleme_daily.js
@@ -1,41 +1,60 @@
const scriptName = '饿了么';
-const getCookieRegex = /^https?:\/\/h5\.ele\.me\/restapi\/biz\.svip_scene\/svip\/engine\/queryTrafficSupply\?.*longitude=([^&]*).*latitude=([^&]*)/;
+const getCoordinateRegex1 = /^https?:\/\/air\.tb\.ele\.me\/app\/conch-page\/svip-home-tasklist-new\/home\?.*longitude=([^&]*).*latitude=([^&]*)/;
+const getCoordinateRegex2 = /^https?:\/\/tb\.ele\.me\/wow\/alsc\/mod\/.*longitude=([^&]*).*latitude=([^&]*)/;
+const getCoordinateRegex3 = /^https?:\/\/h5\.ele\.me\/restapi\/biz\.svip_scene\/svip\/engine\/queryTrafficSupply\?.*longitude=([^&]*).*latitude=([^&]*)/;
+const getCookies = /^https?:\/\/air\.tb\.ele\.me\/app\/conch-page\/svip-foodie-card\/home/;
const elemeCookieKey = 'eleme_app_cookie';
const elemeLongitudeKey = 'eleme_app_longitude';
const elemeLatitudeKey = 'eleme_app_latitude';
let magicJS = MagicJS(scriptName, "INFO");
-magicJS.unifiedPushUrl = magicJS.read('eleme_app_unified_push_url') || magicJS.read('magicjs_unified_push_url');
+magicJS.unifiedPushUrl = magicJS.read("bark_url");
-function GetCookie(){
- try{
- let cookie = magicJS.request.headers.Cookie;
- let arr = magicJS.request.url.match(getCookieRegex);
- let longitude = arr[1];
- let latitude = arr[2];
- let hisCookie = magicJS.read(elemeCookieKey);
+function GetCoordinate() {
+ try {
+ let arr = [];
+ const hisLongitude = magicJS.read(elemeLongitudeKey);
+ const hisLatitude = magicJS.read(elemeLatitudeKey);
+ arr = magicJS.request.url.match(getCoordinateRegex1);
+ if (arr && arr.length < 2) {
+ arr = magicJS.request.url.match(getCoordinateRegex2);
+ }
+ if (arr && arr.length < 2) {
+ arr = magicJS.request.url.match(getCoordinateRegex3);
+ }
+ const longitude = arr[1];
+ const latitude = arr[2];
magicJS.write(elemeLongitudeKey, longitude);
magicJS.write(elemeLatitudeKey, latitude);
- let compareCookie2 = !!cookie? /cookie2=([a-zA-Z0-9]*)/.exec(cookie)[1]: null;
- let compareHisCookie2 = !!hisCookie? /cookie2=([a-zA-Z0-9]*)/.exec(hisCookie)[1]: null;
- if (!!!hisCookie || compareCookie2 !== compareHisCookie2){
- magicJS.write(elemeCookieKey, cookie);
- magicJS.logInfo(`旧的Cookie:${hisCookie}\n新的Cookie:${cookie}\nCookie不同,写入新的Cookie成功!`);
- magicJS.notify('Cookie写入成功!!');
- }
- else{
- magicJS.logInfo('Cookie没有变化,无需更新');
+ if (longitude !== hisLongitude || latitude !== hisLatitude){
+ magicJS.notify(`更新坐标成功!`)
}
}
- catch(err){
- magicJS.notify('获取Cookie出现异常,请查阅日志。');
- magicJS.logError(`获取Cookie出现执行异常,异常信息:${err}`);
+ catch (err) {
+ magicJS.notify('获取坐标出现异常,请查阅日志。');
+ magicJS.logError(`获取坐标出现执行异常,异常信息:${err}`);
+ }
+}
+
+
+function GetCookies(){
+ let cookie = magicJS.request.headers.Cookie;
+ let hisCookie = magicJS.read(elemeCookieKey);
+ let compareCookie2 = !!cookie ? /cookie2=([a-zA-Z0-9]*)/.exec(cookie)[1] : null;
+ let compareHisCookie2 = !!hisCookie ? /cookie2=([a-zA-Z0-9]*)/.exec(hisCookie)[1] : null;
+ if (!!!hisCookie || compareCookie2 !== compareHisCookie2) {
+ magicJS.write(elemeCookieKey, cookie);
+ magicJS.logInfo(`旧的Cookie:${hisCookie}\n新的Cookie:${cookie}\nCookie不同,写入新的Cookie成功!`);
+ magicJS.notify('Cookie写入成功!!');
+ }
+ else {
+ magicJS.logInfo('Cookie没有变化,无需更新');
}
}
// 获取待领取的吃货豆列表
-function GetPeaList(cookie, longitude, latitude){
- return new Promise((resolve, reject)=>{
+function GetPeaList(cookie, longitude, latitude) {
+ return new Promise((resolve, reject) => {
let options = {
url: `https://h5.ele.me/restapi/biz.svip_core/v1/foodie/homepage?longitude=${longitude}&latitude=${latitude}`,
headers: {
@@ -52,29 +71,29 @@ function GetPeaList(cookie, longitude, latitude){
"x-shard": `loc=${longitude},${latitude}`
}
}
- magicJS.get(options, (err, resp, data)=>{
- if (err){
+ magicJS.get(options, (err, resp, data) => {
+ if (err) {
magicJS.logError(`获取待领取的吃货豆失败,请求异常:${err}`);
reject('获取待领取的吃货豆失败,请求异常,请查阅日志!');
}
- else{
- try{
+ else {
+ try {
magicJS.logDebug(`获取待领取吃货豆列表响应结果:${data}`);
- let obj = typeof data === 'string'? JSON.parse(data) : data;
- if (obj.success === true){
+ let obj = typeof data === 'string' ? JSON.parse(data) : data;
+ if (obj.success === true) {
let peaList = [];
obj.foodiePeaBlock.peaList.forEach(element => {
- peaList.push({'id': element.id, 'count': element.count, 'description': element.description});
+ peaList.push({ 'id': element.id, 'count': element.count, 'description': element.description });
});
magicJS.logInfo(`获取待领取的吃货豆成功:${JSON.stringify(peaList)}`);
resolve(peaList);
}
- else{
+ else {
magicJS.logError(`获取待领取的吃货豆失败,响应异常:${data}`);
reject('获取待领取的吃货豆失败,响应异常,请查阅日志!');
}
}
- catch(err){
+ catch (err) {
magicJS.logError(`获取待领取的吃货豆失败,执行异常:${err},接口响应:${data}`);
reject('获取待领取的吃货豆失败,执行异常,请查阅日志!');
}
@@ -84,8 +103,8 @@ function GetPeaList(cookie, longitude, latitude){
}
// 领取吃货豆
-function DrawPea(cookie, peaId, longitude, latitude){
- return new Promise((resolve, reject)=>{
+function DrawPea(cookie, peaId, longitude, latitude) {
+ return new Promise((resolve, reject) => {
let options = {
url: `https://h5.ele.me/restapi/biz.svip_bonus/v1/users/supervip/pea/draw?peaId=${peaId}`,
headers: {
@@ -108,25 +127,25 @@ function DrawPea(cookie, peaId, longitude, latitude){
"latitude": latitude
})
}
- magicJS.post(options, (err, resp, data)=>{
- if (err){
+ magicJS.post(options, (err, resp, data) => {
+ if (err) {
magicJS.logError(`领取吃货豆失败,请求异常:${err}`);
reject('领取吃货豆失败,请求异常,请查阅日志!');
}
- else{
- try{
+ else {
+ try {
magicJS.logDebug(`领取吃货豆响应结果:${data}`);
- let obj = typeof data === 'string'? JSON.parse(data) : data;
- if (obj.success === true){
+ let obj = typeof data === 'string' ? JSON.parse(data) : data;
+ if (obj.success === true) {
magicJS.logInfo(`领取吃货豆成功:${data}`);
resolve(true);
}
- else{
+ else {
magicJS.logError(`领取吃货豆失败,响应异常:${data}`);
reject('领取吃货豆失败,响应异常,请查阅日志!');
}
}
- catch(err){
+ catch (err) {
magicJS.logError(`领取吃货豆失败,执行异常:${err},接口响应:${data}`);
reject('领取吃货豆失败,执行异常,请查阅日志!');
}
@@ -135,41 +154,48 @@ function DrawPea(cookie, peaId, longitude, latitude){
})
}
-;(async()=>{
- if (magicJS.isRequest){
- if (getCookieRegex.test(magicJS.request.url) && magicJS.request.method == "GET"){
- GetCookie();
+; (async () => {
+ if (magicJS.isRequest) {
+ if ((
+ getCoordinateRegex1.test(magicJS.request.url) ||
+ getCoordinateRegex2.test(magicJS.request.url) ||
+ getCoordinateRegex3.test(magicJS.request.url)
+ ) && magicJS.request.method == "GET") {
+ GetCoordinate();
+ }
+ else if (getCookies.test(magicJS.request.url)){
+ GetCookies();
}
}
- else{
+ else {
let subTitle = "";
let content = "";
let cookie = magicJS.read(elemeCookieKey);
let longitude = magicJS.read(elemeLongitudeKey);
let latitude = magicJS.read(elemeLatitudeKey);
- if (!!!cookie){
+ if (!!!cookie) {
magicJS.logWarning('没有读取到Cookie,请先从App中获取一次Cookie!');
content = '❓没有读取到有效Cookie,请先从App中获取Cookie!!';
}
- else{
+ else {
// 获取待领取的吃货豆
let [getPeaListErr, peaList] = await magicJS.attempt(GetPeaList(cookie, longitude, latitude), []);
content = '吃货豆领取结果:';
- if (getPeaListErr){
+ if (getPeaListErr) {
content += '\n获取待领取的吃货豆异常,请查阅日志';
}
- else if (peaList.length == 0){
+ else if (peaList.length == 0) {
content += '\n没有发现待领取的吃货豆';
}
- else{
+ else {
let peaCount = 0;
let drawPeaContent = '';
- for (let j=0;j{let t={};if(this.isSurge||this.isQuanX||this.isLoon){if(typeof e==="string"){if(this.isLoon)t={openUrl:e};else if(this.isQuanX)t={"open-url":e};else if(this.isSurge)t={url:e}}else if(typeof e==="object"){let s={Surge:{openUrl:"url","open-url":"url"},Loon:{url:"openUrl","open-url":"openUrl","media-url":"mediaUrl"},QuantumultX:{url:"open-url",openUrl:"open-url",mediaUrl:"media-url"}};let i=Object.keys(e);for(let o=0;o{})}if(this.isSurge||this.isLoon){$notification.post(e,t,s,i)}else if(this.isQuanX){$notify(e,t,s,i)}else if(this.isJSBox){let i={title:e,body:!!t?`${t}\n${s}`:s};$push.schedule(i)}}log(e,t="INFO"){if(!(this.logLevels[this._logLevel]{if(typeof i.body==="undefined")return"";return`${encodeURIComponent(e)}=${encodeURIComponent(i.body[e])}`}).join("&");if(i.url.indexOf("?")<0)i.url+="?";if(i.url.lastIndexOf("&")+1!=i.url.length&&i.url.lastIndexOf("?")+1!=i.url.length)i.url+="&";i.url+=e;delete i.body}if(this.isQuanX){if(i.hasOwnProperty("body")&&typeof i["body"]!=="string")i["body"]=JSON.stringify(i["body"]);i["method"]=t}else if(this.isNode){delete i.headers["Accept-Encoding"];if(typeof i.body==="object"){if(t==="GET"){i.qs=i.body;delete i.body}else if(t==="POST"){i["json"]=true;i.body=i.body}}}else if(this.isJSBox){i["header"]=i["headers"];delete i["headers"]}return i}get(e,t){let s=this.adapterHttpOptions(e,"GET");this.logDebug(`HTTP GET: ${JSON.stringify(s)}`);if(this.isSurge||this.isLoon){$httpClient.get(s,t)}else if(this.isQuanX){$task.fetch(s).then(e=>{e["status"]=e.statusCode;t(null,e,e.body)},e=>t(e.error,null,null))}else if(this.isNode){return this.node.request.get(s,t)}else if(this.isJSBox){s["handler"]=(e=>{let s=e.error?JSON.stringify(e.error):undefined;let i=typeof e.data==="object"?JSON.stringify(e.data):e.data;t(s,e.response,i)});$http.get(s)}}post(e,t){let s=this.adapterHttpOptions(e,"POST");this.logDebug(`HTTP POST: ${JSON.stringify(s)}`);if(this.isSurge||this.isLoon){$httpClient.post(s,t)}else if(this.isQuanX){$task.fetch(s).then(e=>{e["status"]=e.statusCode;t(null,e,e.body)},e=>{t(e.error,null,null)})}else if(this.isNode){return this.node.request.post(s,t)}else if(this.isJSBox){s["handler"]=(e=>{let s=e.error?JSON.stringify(e.error):undefined;let i=typeof e.data==="object"?JSON.stringify(e.data):e.data;t(s,e.response,i)});$http.post(s)}}done(e={}){if(typeof $done!=="undefined"){$done(e)}}isToday(e){if(e==null){return false}else{let t=new Date;if(typeof e=="string"){e=new Date(e)}if(t.getFullYear()==e.getFullYear()&&t.getMonth()==e.getMonth()&&t.getDay()==e.getDay()){return true}else{return false}}}isNumber(e){return parseFloat(e).toString()==="NaN"?false:true}attempt(e,t=null){return e.then(e=>{return[null,e]}).catch(e=>{this.logError(e);return[e,t]})}retry(e,t=5,s=0,i=null){return(...o)=>{return new Promise((r,n)=>{function a(...o){Promise.resolve().then(()=>e.apply(this,o)).then(e=>{if(typeof i==="function"){Promise.resolve().then(()=>i(e)).then(()=>{r(e)}).catch(e=>{this.logError(e);if(t>=1&&s>0){setTimeout(()=>a.apply(this,o),s)}else if(t>=1){a.apply(this,o)}else{n(e)}t--})}else{r(e)}}).catch(e=>{this.logError(e);if(t>=1&&s>0){setTimeout(()=>a.apply(this,o),s)}else if(t>=1){a.apply(this,o)}else{n(e)}t--})}a.apply(this,o)})}}formatTime(e,t="yyyy-MM-dd hh:mm:ss"){var s={"M+":e.getMonth()+1,"d+":e.getDate(),"h+":e.getHours(),"m+":e.getMinutes(),"s+":e.getSeconds(),"q+":Math.floor((e.getMonth()+3)/3),S:e.getMilliseconds()};if(/(y+)/.test(t))t=t.replace(RegExp.$1,(e.getFullYear()+"").substr(4-RegExp.$1.length));for(let e in s)if(new RegExp("("+e+")").test(t))t=t.replace(RegExp.$1,RegExp.$1.length==1?s[e]:("00"+s[e]).substr((""+s[e]).length));return t}now(){return this.formatTime(new Date,"yyyy-MM-dd hh:mm:ss")}today(){return this.formatTime(new Date,"yyyy-MM-dd")}sleep(e){return new Promise(t=>setTimeout(t,e))}}(e)}
+function MagicJS(e = "MagicJS", t = "INFO") { const s = { accept: "Accept", "accept-ch": "Accept-CH", "accept-charset": "Accept-Charset", "accept-features": "Accept-Features", "accept-encoding": "Accept-Encoding", "accept-language": "Accept-Language", "accept-ranges": "Accept-Ranges", "access-control-allow-credentials": "Access-Control-Allow-Credentials", "access-control-allow-origin": "Access-Control-Allow-Origin", "access-control-allow-methods": "Access-Control-Allow-Methods", "access-control-allow-headers": "Access-Control-Allow-Headers", "access-control-max-age": "Access-Control-Max-Age", "access-control-expose-headers": "Access-Control-Expose-Headers", "access-control-request-method": "Access-Control-Request-Method", "access-control-request-headers": "Access-Control-Request-Headers", age: "Age", allow: "Allow", alternates: "Alternates", authorization: "Authorization", "cache-control": "Cache-Control", connection: "Connection", "content-encoding": "Content-Encoding", "content-language": "Content-Language", "content-length": "Content-Length", "content-location": "Content-Location", "content-md5": "Content-MD5", "content-range": "Content-Range", "content-security-policy": "Content-Security-Policy", "content-type": "Content-Type", cookie: "Cookie", dnt: "DNT", date: "Date", etag: "ETag", expect: "Expect", expires: "Expires", from: "From", host: "Host", "if-match": "If-Match", "if-modified-since": "If-Modified-Since", "if-none-match": "If-None-Match", "if-range": "If-Range", "if-unmodified-since": "If-Unmodified-Since", "last-event-id": "Last-Event-ID", "last-modified": "Last-Modified", link: "Link", location: "Location", "max-forwards": "Max-Forwards", negotiate: "Negotiate", origin: "Origin", pragma: "Pragma", "proxy-authenticate": "Proxy-Authenticate", "proxy-authorization": "Proxy-Authorization", range: "Range", referer: "Referer", "retry-after": "Retry-After", "sec-websocket-extensions": "Sec-Websocket-Extensions", "sec-websocket-key": "Sec-Websocket-Key", "sec-websocket-origin": "Sec-Websocket-Origin", "sec-websocket-protocol": "Sec-Websocket-Protocol", "sec-websocket-version": "Sec-Websocket-Version", server: "Server", "set-cookie": "Set-Cookie", "set-cookie2": "Set-Cookie2", "strict-transport-security": "Strict-Transport-Security", tcn: "TCN", te: "TE", trailer: "Trailer", "transfer-encoding": "Transfer-Encoding", upgrade: "Upgrade", "user-agent": "User-Agent", "variant-vary": "Variant-Vary", vary: "Vary", via: "Via", warning: "Warning", "www-authenticate": "WWW-Authenticate", "x-content-duration": "X-Content-Duration", "x-content-security-policy": "X-Content-Security-Policy", "x-dnsprefetch-control": "X-DNSPrefetch-Control", "x-frame-options": "X-Frame-Options", "x-requested-with": "X-Requested-With", "x-surge-skip-scripting": "X-Surge-Skip-Scripting" }; return new class { constructor() { this.version = "2.2.3.3"; this.scriptName = e; this.logLevels = { DEBUG: 5, INFO: 4, NOTIFY: 3, WARNING: 2, ERROR: 1, CRITICAL: 0, NONE: -1 }; this.isLoon = typeof $loon !== "undefined"; this.isQuanX = typeof $task !== "undefined"; this.isJSBox = typeof $drive !== "undefined"; this.isNode = typeof module !== "undefined" && !this.isJSBox; this.isSurge = typeof $httpClient !== "undefined" && !this.isLoon; this.platform = this.getPlatform(); this.node = { request: undefined, fs: undefined, data: {} }; this.iOSUserAgent = "Mozilla/5.0 (iPhone; CPU iPhone OS 13_3_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.5 Mobile/15E148 Safari/604.1"; this.pcUserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.125 Safari/537.36 Edg/84.0.522.59"; this.logLevel = t; this._unifiedPushUrl = ""; if (this.isNode) { this.node.fs = require("fs"); this.node.request = require("request"); try { this.node.fs.accessSync("./magic.json", this.node.fs.constants.R_OK | this.node.fs.constants.W_OK) } catch (e) { this.node.fs.writeFileSync("./magic.json", "{}", { encoding: "utf8" }) } this.node.data = require("./magic.json") } else if (this.isJSBox) { if (!$file.exists("drive://MagicJS")) { $file.mkdir("drive://MagicJS") } if (!$file.exists("drive://MagicJS/magic.json")) { $file.write({ data: $data({ string: "{}" }), path: "drive://MagicJS/magic.json" }) } } } set unifiedPushUrl(e) { this._unifiedPushUrl = !!e ? e.replace(/\/+$/g, "") : "" } set logLevel(e) { this._logLevel = typeof e === "string" ? e.toUpperCase() : "DEBUG" } get logLevel() { return this._logLevel } get isRequest() { return typeof $request !== "undefined" && typeof $response === "undefined" } get isResponse() { return typeof $response !== "undefined" } get request() { return typeof $request !== "undefined" ? $request : undefined } get response() { if (typeof $response !== "undefined") { if ($response.hasOwnProperty("status")) $response["statusCode"] = $response["status"]; if ($response.hasOwnProperty("statusCode")) $response["status"] = $response["statusCode"]; return $response } else { return undefined } } getPlatform() { if (this.isSurge) return "Surge"; else if (this.isQuanX) return "QuantumultX"; else if (this.isLoon) return "Loon"; else if (this.isJSBox) return "JSBox"; else if (this.isNode) return "Node.js"; else return "unknown" } read(e, t = "") { let s = ""; if (this.isSurge || this.isLoon) { s = $persistentStore.read(e) } else if (this.isQuanX) { s = $prefs.valueForKey(e) } else if (this.isNode) { s = this.node.data } else if (this.isJSBox) { s = $file.read("drive://MagicJS/magic.json").string } try { if (this.isNode) s = s[e]; if (this.isJSBox) s = JSON.parse(s)[e]; if (!!t) { if (typeof s === "string") s = JSON.parse(s); s = !!s && typeof s === "object" ? s[t] : null } } catch (i) { this.logError(i); s = !!t ? {} : null; this.del(e) } if (typeof s === "undefined") s = null; try { if (!!s && typeof s === "string") s = JSON.parse(s) } catch (e) { } this.logDebug(`READ DATA [${e}]${!!t ? `[${t}]` : ""}(${typeof s})\n${JSON.stringify(s)}`); return s } write(e, t, s = "") { let i = !!s ? {} : ""; if (!!s && (this.isSurge || this.isLoon)) { i = $persistentStore.read(e) } else if (!!s && this.isQuanX) { i = $prefs.valueForKey(e) } else if (this.isNode) { i = this.node.data } else if (this.isJSBox) { i = JSON.parse($file.read("drive://MagicJS/magic.json").string) } if (!!s) { try { if (typeof i === "string") i = JSON.parse(i); i = typeof i === "object" && !!i ? i : {} } catch (t) { this.logError(t); this.del(e); i = {} } if (this.isJSBox || this.isNode) { if (!i.hasOwnProperty(e) || typeof i[e] !== "object" || i[e] === null) { i[e] = {} } if (!i[e].hasOwnProperty(s)) { i[e][s] = null } if (typeof t === "undefined") { delete i[e][s] } else { i[e][s] = t } } else { if (typeof t === "undefined") { delete i[s] } else { i[s] = t } } } else { if (this.isNode || this.isJSBox) { if (typeof t === "undefined") { delete i[e] } else { i[e] = t } } else { if (typeof t === "undefined") { i = null } else { i = t } } } if (typeof i === "object") i = JSON.stringify(i); if (this.isSurge || this.isLoon) { $persistentStore.write(i, e) } else if (this.isQuanX) { $prefs.setValueForKey(i, e) } else if (this.isNode) { this.node.fs.writeFileSync("./magic.json", i) } else if (this.isJSBox) { $file.write({ data: $data({ string: i }), path: "drive://MagicJS/magic.json" }) } this.logDebug(`WRITE DATA [${e}]${!!s ? `[${s}]` : ""}(${typeof t})\n${JSON.stringify(t)}`) } del(e, t = "") { this.logDebug(`DELETE KEY [${e}]${!!t ? `[${t}]` : ""}`); this.write(e, null, t) } notify(e = this.scriptName, t = "", s = "", i = "") { let o = e => { let t = {}; if (this.isSurge || this.isQuanX || this.isLoon) { if (typeof e === "string") { if (this.isLoon) t = { openUrl: e }; else if (this.isQuanX) t = { "open-url": e }; else if (this.isSurge) t = { url: e } } else if (typeof e === "object") { let s = { Surge: { openUrl: "url", "open-url": "url" }, Loon: { url: "openUrl", "open-url": "openUrl", "media-url": "mediaUrl" }, QuantumultX: { url: "open-url", openUrl: "open-url", mediaUrl: "media-url" } }; let i = Object.keys(e); for (let o = 0; o < i.length; o++) { if (!!s[this.platform][i[o]]) { t[s[this.platform][i[o]]] = e[i[o]] } else { t[i[o]] = e[i[o]] } } } } return t }; i = o(i); this.logNotify(`title:${e}\nsubTitle:${t}\nbody:${s}\noptions:${typeof i === "object" ? JSON.stringify(i) : i}`); if (arguments.length == 1) { e = this.scriptName; t = "", s = arguments[0] } if (!!this._unifiedPushUrl) { let i = encodeURI(`${e}/${t}${!!t ? "\n" : ""}${s}`); this.get(`${this._unifiedPushUrl}/${i}`, () => { }) } if (this.isSurge || this.isLoon) { $notification.post(e, t, s, i) } else if (this.isQuanX) { $notify(e, t, s, i) } else if (this.isJSBox) { let i = { title: e, body: !!t ? `${t}\n${s}` : s }; $push.schedule(i) } } log(e, t = "INFO") { if (!(this.logLevels[this._logLevel] < this.logLevels[t.toUpperCase()])) console.log(`[${t}] [${this.scriptName}]\n${e}\n`) } logDebug(e) { this.log(e, "DEBUG") } logInfo(e) { this.log(e, "INFO") } logNotify(e) { this.log(e, "NOTIFY") } logWarning(e) { this.log(e, "WARNING") } logError(e) { this.log(e, "ERROR") } adapterHttpOptions(e, t) { let i = typeof e === "object" ? Object.assign({}, e) : { url: e, headers: {} }; if (i.hasOwnProperty("header") && !i.hasOwnProperty("headers")) { i["headers"] = i["header"]; delete i["header"] } if (typeof i.headers === "object" && !!s) { for (let e in i.headers) { if (s[e]) { i.headers[s[e]] = i.headers[e]; delete i.headers[e] } } } if (!!!i.headers || typeof i.headers !== "object" || !!!i.headers["User-Agent"]) { if (!!!i.headers || typeof i.headers !== "object") i.headers = {}; if (this.isNode) i.headers["User-Agent"] = this.pcUserAgent; else i.headers["User-Agent"] = this.iOSUserAgent } let o = false; if (typeof i["opts"] === "object" && (i["opts"]["hints"] === true || i["opts"]["Skip-Scripting"] === true) || typeof i["headers"] === "object" && i["headers"]["X-Surge-Skip-Scripting"] === true) { o = true } if (!o) { if (this.isSurge) i.headers["X-Surge-Skip-Scripting"] = false; else if (this.isLoon) i.headers["X-Requested-With"] = "XMLHttpRequest"; else if (this.isQuanX) { if (typeof i["opts"] !== "object") i.opts = {}; i.opts["hints"] = false } } if (!this.isSurge || o) delete i.headers["X-Surge-Skip-Scripting"]; if (!this.isQuanX && i.hasOwnProperty("opts")) delete i["opts"]; if (this.isQuanX && i.hasOwnProperty("opts")) delete i["opts"]["Skip-Scripting"]; if (t === "GET" && !this.isNode && !!i.body) { let e = Object.keys(i.body).map(e => { if (typeof i.body === "undefined") return ""; return `${encodeURIComponent(e)}=${encodeURIComponent(i.body[e])}` }).join("&"); if (i.url.indexOf("?") < 0) i.url += "?"; if (i.url.lastIndexOf("&") + 1 != i.url.length && i.url.lastIndexOf("?") + 1 != i.url.length) i.url += "&"; i.url += e; delete i.body } if (this.isQuanX) { if (i.hasOwnProperty("body") && typeof i["body"] !== "string") i["body"] = JSON.stringify(i["body"]); i["method"] = t } else if (this.isNode) { delete i.headers["Accept-Encoding"]; if (typeof i.body === "object") { if (t === "GET") { i.qs = i.body; delete i.body } else if (t === "POST") { i["json"] = true; i.body = i.body } } } else if (this.isJSBox) { i["header"] = i["headers"]; delete i["headers"] } return i } get(e, t) { let s = this.adapterHttpOptions(e, "GET"); this.logDebug(`HTTP GET: ${JSON.stringify(s)}`); if (this.isSurge || this.isLoon) { $httpClient.get(s, t) } else if (this.isQuanX) { $task.fetch(s).then(e => { e["status"] = e.statusCode; t(null, e, e.body) }, e => t(e.error, null, null)) } else if (this.isNode) { return this.node.request.get(s, t) } else if (this.isJSBox) { s["handler"] = (e => { let s = e.error ? JSON.stringify(e.error) : undefined; let i = typeof e.data === "object" ? JSON.stringify(e.data) : e.data; t(s, e.response, i) }); $http.get(s) } } post(e, t) { let s = this.adapterHttpOptions(e, "POST"); this.logDebug(`HTTP POST: ${JSON.stringify(s)}`); if (this.isSurge || this.isLoon) { $httpClient.post(s, t) } else if (this.isQuanX) { $task.fetch(s).then(e => { e["status"] = e.statusCode; t(null, e, e.body) }, e => { t(e.error, null, null) }) } else if (this.isNode) { return this.node.request.post(s, t) } else if (this.isJSBox) { s["handler"] = (e => { let s = e.error ? JSON.stringify(e.error) : undefined; let i = typeof e.data === "object" ? JSON.stringify(e.data) : e.data; t(s, e.response, i) }); $http.post(s) } } done(e = {}) { if (typeof $done !== "undefined") { $done(e) } } isToday(e) { if (e == null) { return false } else { let t = new Date; if (typeof e == "string") { e = new Date(e) } if (t.getFullYear() == e.getFullYear() && t.getMonth() == e.getMonth() && t.getDay() == e.getDay()) { return true } else { return false } } } isNumber(e) { return parseFloat(e).toString() === "NaN" ? false : true } attempt(e, t = null) { return e.then(e => { return [null, e] }).catch(e => { this.logError(e); return [e, t] }) } retry(e, t = 5, s = 0, i = null) { return (...o) => { return new Promise((r, n) => { function a(...o) { Promise.resolve().then(() => e.apply(this, o)).then(e => { if (typeof i === "function") { Promise.resolve().then(() => i(e)).then(() => { r(e) }).catch(e => { this.logError(e); if (t >= 1 && s > 0) { setTimeout(() => a.apply(this, o), s) } else if (t >= 1) { a.apply(this, o) } else { n(e) } t-- }) } else { r(e) } }).catch(e => { this.logError(e); if (t >= 1 && s > 0) { setTimeout(() => a.apply(this, o), s) } else if (t >= 1) { a.apply(this, o) } else { n(e) } t-- }) } a.apply(this, o) }) } } formatTime(e, t = "yyyy-MM-dd hh:mm:ss") { var s = { "M+": e.getMonth() + 1, "d+": e.getDate(), "h+": e.getHours(), "m+": e.getMinutes(), "s+": e.getSeconds(), "q+": Math.floor((e.getMonth() + 3) / 3), S: e.getMilliseconds() }; if (/(y+)/.test(t)) t = t.replace(RegExp.$1, (e.getFullYear() + "").substr(4 - RegExp.$1.length)); for (let e in s) if (new RegExp("(" + e + ")").test(t)) t = t.replace(RegExp.$1, RegExp.$1.length == 1 ? s[e] : ("00" + s[e]).substr(("" + s[e]).length)); return t } now() { return this.formatTime(new Date, "yyyy-MM-dd hh:mm:ss") } today() { return this.formatTime(new Date, "yyyy-MM-dd") } sleep(e) { return new Promise(t => setTimeout(t, e)) } }(e) }
diff --git a/script/eleme/eleme_daily.lnplugin b/script/eleme/eleme_daily.lnplugin
new file mode 100644
index 000000000..02094ca76
--- /dev/null
+++ b/script/eleme/eleme_daily.lnplugin
@@ -0,0 +1,17 @@
+#!name= 饿了么
+#!desc= 饿了么每日自动领取任务及吃货豆
+#!openUrl=https://github.com/blackmatrix7/ios_rule_script/tree/master/script/eleme
+#!author= blackmatrix7
+#!homepage= https://github.com/blackmatrix7/ios_rule_script
+#!icon= https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/eleme/elem.png
+
+[Script]
+http-request ^https?:\/\/air\.tb\.ele\.me\/app\/conch-page\/svip-foodie-card\/home requires-body=1,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/eleme/eleme_daily.js,tag=饿了么_获取Cookie
+http-request ^https?:\/\/air\.tb\.ele\.me\/app\/conch-page\/svip-home-tasklist-new\/home requires-body=1,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/eleme/eleme_daily.js,tag=饿了么_获取坐标1
+http-request ^https?:\/\/tb\.ele\.me\/wow\/alsc\/mod requires-body=1,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/eleme/eleme_daily.js,tag=饿了么_获取坐标2
+http-request ^https?:\/\/h5\.ele\.me\/restapi\/biz\.svip_scene\/svip\/engine\/queryTrafficSupply requires-body=1,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/eleme/eleme_daily.js,tag=饿了么_获取坐标3
+cron "10 09 * * *" script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/eleme/eleme_daily.js,timeout=60,tag=饿了么_领取吃货豆
+cron "15 09 * * *" script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/eleme/eleme_mission.js,timeout=60,tag=饿了么_领取会员任务
+
+[MITM]
+hostname = air.tb.ele.me,tb.ele.me,h5.ele.me
\ No newline at end of file
diff --git a/script/eleme/eleme_daily.lnscript b/script/eleme/eleme_daily.lnscript
deleted file mode 100644
index fbeb89756..000000000
--- a/script/eleme/eleme_daily.lnscript
+++ /dev/null
@@ -1,7 +0,0 @@
-# 饿了么每日自动领取任务及吃货豆
-
-http-request ^https?:\/\/h5\.ele\.me\/restapi\/biz\.svip_scene\/svip\/engine\/queryTrafficSupply requires-body=1,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/eleme/eleme_daily.js,tag=饿了么_获取cookie
-cron "10 00 * * *" script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/eleme/eleme_daily.js,timeout=60,tag=饿了么_领取吃货豆
-cron "00 10 * * *" script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/eleme/eleme_mission.js,timeout=60,tag=饿了么_领取会员任务
-
-hostname = h5.ele.me
\ No newline at end of file
diff --git a/script/eleme/eleme_daily.qxrewrite b/script/eleme/eleme_daily.qxrewrite
index a061e6fe0..ea747cc16 100644
--- a/script/eleme/eleme_daily.qxrewrite
+++ b/script/eleme/eleme_daily.qxrewrite
@@ -1,5 +1,8 @@
# 饿了么每日自动领取任务及吃货豆
+^https?:\/\/air\.tb\.ele\.me\/app\/conch-page\/svip-foodie-card\/home url script-request-header https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/eleme/eleme_daily.js
+^https?:\/\/air\.tb\.ele\.me\/app\/conch-page\/svip-home-tasklist-new\/home url script-request-header https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/eleme/eleme_daily.js
+^https?:\/\/tb\.ele\.me\/wow\/alsc\/mod url script-request-header https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/eleme/eleme_daily.js
^https?:\/\/h5\.ele\.me\/restapi\/biz\.svip_scene\/svip\/engine\/queryTrafficSupply url script-request-header https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/eleme/eleme_daily.js
-hostname = h5.ele.me
\ No newline at end of file
+hostname = air.tb.ele.me,tb.ele.me,h5.ele.me
\ No newline at end of file
diff --git a/script/eleme/eleme_daily.sgmodule b/script/eleme/eleme_daily.sgmodule
index 89b70454b..733df797e 100644
--- a/script/eleme/eleme_daily.sgmodule
+++ b/script/eleme/eleme_daily.sgmodule
@@ -3,9 +3,12 @@
#!system=ios
[Script]
-饿了么_领取吃货豆 = type=cron,cronexp=10 00 * * *,timeout=60,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/eleme/eleme_daily.js
-饿了么_领取任务 = type=cron,cronexp=00 10 * * *,timeout=60,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/eleme/eleme_mission.js
-饿了么_获取cookie = type=http-request,pattern=^https?:\/\/h5\.ele\.me\/restapi\/biz\.svip_scene\/svip\/engine\/queryTrafficSupply,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/eleme/eleme_daily.js
+饿了么_领取吃货豆 = type=cron,cronexp=10 09 * * *,timeout=60,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/eleme/eleme_daily.js
+饿了么_领取任务 = type=cron,cronexp=15 09 * * *,timeout=60,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/eleme/eleme_mission.js
+饿了么_获取坐标1 = type=http-request,pattern=^https?:\/\/air\.tb\.ele\.me\/app\/conch-page\/svip-home-tasklist-new\/home,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/eleme/eleme_daily.js
+饿了么_获取坐标2 = type=http-request,pattern=^https?:\/\/tb\.ele\.me\/wow\/alsc\/mod,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/eleme/eleme_daily.js
+饿了么_获取坐标3 = type=http-request,pattern=^https?:\/\/h5\.ele\.me\/restapi\/biz\.svip_scene\/svip\/engine\/queryTrafficSupply,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/eleme/eleme_daily.js
+饿了么_Cookies = type=http-request,pattern=^https?:\/\/air\.tb\.ele\.me\/app\/conch-page\/svip-foodie-card\/home,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/eleme/eleme_daily.js
[MITM]
-hostname = %APPEND% h5.ele.me
\ No newline at end of file
+hostname = %APPEND% air.tb.ele.me,tb.ele.me,h5.ele.me
\ No newline at end of file
diff --git a/script/eleme/eleme_mission.js b/script/eleme/eleme_mission.js
index 77bdd96ec..b18db7b35 100644
--- a/script/eleme/eleme_mission.js
+++ b/script/eleme/eleme_mission.js
@@ -2,16 +2,18 @@ const scriptName = "饿了么";
const elemeCookieKey = "eleme_app_cookie";
const elemeLongitudeKey = "eleme_app_longitude";
const elemeLatitudeKey = "eleme_app_latitude";
-// 以下条件是AND的关系
-const taskKeywords = ["美食外卖"]; // 任务JSON中含有此关键字的任务才会领取
-const requiredOrderAmount = 4; // 需要完成订单数量小于等于此数的任务才会领取
+const elemeTaskKey = "eleme_task_keywords";
let magicJS = MagicJS(scriptName, "INFO");
-magicJS.unifiedPushUrl = magicJS.read("eleme_app_unified_push_url") || magicJS.read("magicjs_unified_push_url");
+magicJS.barkUrl = magicJS.read("bark_url");
// 获取超级会员任务列表
function GetSuperVipMissions(cookie, longitude, latitude) {
return new Promise((resolve, reject) => {
+ // 获取配置的任务关键词
+ const taskKeywords = magicJS.read(elemeTaskKey).split(';');
+ magicJS.logInfo(`只获取含有以下关键词的任务:${magicJS.read(elemeTaskKey)}`);
+
let options = {
url: `https://h5.ele.me/restapi/svip_biz/v1/supervip/query_mission_list?longitude=${longitude}&latitude=${latitude}`,
headers: {
@@ -42,7 +44,7 @@ function GetSuperVipMissions(cookie, longitude, latitude) {
let missionInfo = JSON.stringify(element);
let flag = false;
for (keyword of taskKeywords) {
- if (missionInfo.indexOf(keyword) >= 0 && element.required_order_amount <= requiredOrderAmount) {
+ if (missionInfo.indexOf(keyword) >= 0) {
flag = true;
break;
}
@@ -154,4 +156,4 @@ function AcceptMission(cookie, longitude, latitude, mission_id) {
})();
// prettier-ignore
-function MagicJS(e="MagicJS",t="INFO"){const s={accept:"Accept","accept-ch":"Accept-CH","accept-charset":"Accept-Charset","accept-features":"Accept-Features","accept-encoding":"Accept-Encoding","accept-language":"Accept-Language","accept-ranges":"Accept-Ranges","access-control-allow-credentials":"Access-Control-Allow-Credentials","access-control-allow-origin":"Access-Control-Allow-Origin","access-control-allow-methods":"Access-Control-Allow-Methods","access-control-allow-headers":"Access-Control-Allow-Headers","access-control-max-age":"Access-Control-Max-Age","access-control-expose-headers":"Access-Control-Expose-Headers","access-control-request-method":"Access-Control-Request-Method","access-control-request-headers":"Access-Control-Request-Headers",age:"Age",allow:"Allow",alternates:"Alternates",authorization:"Authorization","cache-control":"Cache-Control",connection:"Connection","content-encoding":"Content-Encoding","content-language":"Content-Language","content-length":"Content-Length","content-location":"Content-Location","content-md5":"Content-MD5","content-range":"Content-Range","content-security-policy":"Content-Security-Policy","content-type":"Content-Type",cookie:"Cookie",dnt:"DNT",date:"Date",etag:"ETag",expect:"Expect",expires:"Expires",from:"From",host:"Host","if-match":"If-Match","if-modified-since":"If-Modified-Since","if-none-match":"If-None-Match","if-range":"If-Range","if-unmodified-since":"If-Unmodified-Since","last-event-id":"Last-Event-ID","last-modified":"Last-Modified",link:"Link",location:"Location","max-forwards":"Max-Forwards",negotiate:"Negotiate",origin:"Origin",pragma:"Pragma","proxy-authenticate":"Proxy-Authenticate","proxy-authorization":"Proxy-Authorization",range:"Range",referer:"Referer","retry-after":"Retry-After","sec-websocket-extensions":"Sec-Websocket-Extensions","sec-websocket-key":"Sec-Websocket-Key","sec-websocket-origin":"Sec-Websocket-Origin","sec-websocket-protocol":"Sec-Websocket-Protocol","sec-websocket-version":"Sec-Websocket-Version",server:"Server","set-cookie":"Set-Cookie","set-cookie2":"Set-Cookie2","strict-transport-security":"Strict-Transport-Security",tcn:"TCN",te:"TE",trailer:"Trailer","transfer-encoding":"Transfer-Encoding",upgrade:"Upgrade","user-agent":"User-Agent","variant-vary":"Variant-Vary",vary:"Vary",via:"Via",warning:"Warning","www-authenticate":"WWW-Authenticate","x-content-duration":"X-Content-Duration","x-content-security-policy":"X-Content-Security-Policy","x-dnsprefetch-control":"X-DNSPrefetch-Control","x-frame-options":"X-Frame-Options","x-requested-with":"X-Requested-With","x-surge-skip-scripting":"X-Surge-Skip-Scripting"};return new class{constructor(){this.version="2.2.3.3";this.scriptName=e;this.logLevels={DEBUG:5,INFO:4,NOTIFY:3,WARNING:2,ERROR:1,CRITICAL:0,NONE:-1};this.isLoon=typeof $loon!=="undefined";this.isQuanX=typeof $task!=="undefined";this.isJSBox=typeof $drive!=="undefined";this.isNode=typeof module!=="undefined"&&!this.isJSBox;this.isSurge=typeof $httpClient!=="undefined"&&!this.isLoon;this.platform=this.getPlatform();this.node={request:undefined,fs:undefined,data:{}};this.iOSUserAgent="Mozilla/5.0 (iPhone; CPU iPhone OS 13_3_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.5 Mobile/15E148 Safari/604.1";this.pcUserAgent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.125 Safari/537.36 Edg/84.0.522.59";this.logLevel=t;this._unifiedPushUrl="";if(this.isNode){this.node.fs=require("fs");this.node.request=require("request");try{this.node.fs.accessSync("./magic.json",this.node.fs.constants.R_OK|this.node.fs.constants.W_OK)}catch(e){this.node.fs.writeFileSync("./magic.json","{}",{encoding:"utf8"})}this.node.data=require("./magic.json")}else if(this.isJSBox){if(!$file.exists("drive://MagicJS")){$file.mkdir("drive://MagicJS")}if(!$file.exists("drive://MagicJS/magic.json")){$file.write({data:$data({string:"{}"}),path:"drive://MagicJS/magic.json"})}}}set unifiedPushUrl(e){this._unifiedPushUrl=!!e?e.replace(/\/+$/g,""):""}set logLevel(e){this._logLevel=typeof e==="string"?e.toUpperCase():"DEBUG"}get logLevel(){return this._logLevel}get isRequest(){return typeof $request!=="undefined"&&typeof $response==="undefined"}get isResponse(){return typeof $response!=="undefined"}get request(){return typeof $request!=="undefined"?$request:undefined}get response(){if(typeof $response!=="undefined"){if($response.hasOwnProperty("status"))$response["statusCode"]=$response["status"];if($response.hasOwnProperty("statusCode"))$response["status"]=$response["statusCode"];return $response}else{return undefined}}getPlatform(){if(this.isSurge)return"Surge";else if(this.isQuanX)return"QuantumultX";else if(this.isLoon)return"Loon";else if(this.isJSBox)return"JSBox";else if(this.isNode)return"Node.js";else return"unknown"}read(e,t=""){let s="";if(this.isSurge||this.isLoon){s=$persistentStore.read(e)}else if(this.isQuanX){s=$prefs.valueForKey(e)}else if(this.isNode){s=this.node.data}else if(this.isJSBox){s=$file.read("drive://MagicJS/magic.json").string}try{if(this.isNode)s=s[e];if(this.isJSBox)s=JSON.parse(s)[e];if(!!t){if(typeof s==="string")s=JSON.parse(s);s=!!s&&typeof s==="object"?s[t]:null}}catch(i){this.logError(i);s=!!t?{}:null;this.del(e)}if(typeof s==="undefined")s=null;try{if(!!s&&typeof s==="string")s=JSON.parse(s)}catch(e){}this.logDebug(`READ DATA [${e}]${!!t?`[${t}]`:""}(${typeof s})\n${JSON.stringify(s)}`);return s}write(e,t,s=""){let i=!!s?{}:"";if(!!s&&(this.isSurge||this.isLoon)){i=$persistentStore.read(e)}else if(!!s&&this.isQuanX){i=$prefs.valueForKey(e)}else if(this.isNode){i=this.node.data}else if(this.isJSBox){i=JSON.parse($file.read("drive://MagicJS/magic.json").string)}if(!!s){try{if(typeof i==="string")i=JSON.parse(i);i=typeof i==="object"&&!!i?i:{}}catch(t){this.logError(t);this.del(e);i={}}if(this.isJSBox||this.isNode){if(!i.hasOwnProperty(e)||typeof i[e]!=="object"||i[e]===null){i[e]={}}if(!i[e].hasOwnProperty(s)){i[e][s]=null}if(typeof t==="undefined"){delete i[e][s]}else{i[e][s]=t}}else{if(typeof t==="undefined"){delete i[s]}else{i[s]=t}}}else{if(this.isNode||this.isJSBox){if(typeof t==="undefined"){delete i[e]}else{i[e]=t}}else{if(typeof t==="undefined"){i=null}else{i=t}}}if(typeof i==="object")i=JSON.stringify(i);if(this.isSurge||this.isLoon){$persistentStore.write(i,e)}else if(this.isQuanX){$prefs.setValueForKey(i,e)}else if(this.isNode){this.node.fs.writeFileSync("./magic.json",i)}else if(this.isJSBox){$file.write({data:$data({string:i}),path:"drive://MagicJS/magic.json"})}this.logDebug(`WRITE DATA [${e}]${!!s?`[${s}]`:""}(${typeof t})\n${JSON.stringify(t)}`)}del(e,t=""){this.logDebug(`DELETE KEY [${e}]${!!t?`[${t}]`:""}`);this.write(e,null,t)}notify(e=this.scriptName,t="",s="",i=""){let o=e=>{let t={};if(this.isSurge||this.isQuanX||this.isLoon){if(typeof e==="string"){if(this.isLoon)t={openUrl:e};else if(this.isQuanX)t={"open-url":e};else if(this.isSurge)t={url:e}}else if(typeof e==="object"){let s={Surge:{openUrl:"url","open-url":"url"},Loon:{url:"openUrl","open-url":"openUrl","media-url":"mediaUrl"},QuantumultX:{url:"open-url",openUrl:"open-url",mediaUrl:"media-url"}};let i=Object.keys(e);for(let o=0;o{})}if(this.isSurge||this.isLoon){$notification.post(e,t,s,i)}else if(this.isQuanX){$notify(e,t,s,i)}else if(this.isJSBox){let i={title:e,body:!!t?`${t}\n${s}`:s};$push.schedule(i)}}log(e,t="INFO"){if(!(this.logLevels[this._logLevel]{if(typeof i.body==="undefined")return"";return`${encodeURIComponent(e)}=${encodeURIComponent(i.body[e])}`}).join("&");if(i.url.indexOf("?")<0)i.url+="?";if(i.url.lastIndexOf("&")+1!=i.url.length&&i.url.lastIndexOf("?")+1!=i.url.length)i.url+="&";i.url+=e;delete i.body}if(this.isQuanX){if(i.hasOwnProperty("body")&&typeof i["body"]!=="string")i["body"]=JSON.stringify(i["body"]);i["method"]=t}else if(this.isNode){delete i.headers["Accept-Encoding"];if(typeof i.body==="object"){if(t==="GET"){i.qs=i.body;delete i.body}else if(t==="POST"){i["json"]=true;i.body=i.body}}}else if(this.isJSBox){i["header"]=i["headers"];delete i["headers"]}return i}get(e,t){let s=this.adapterHttpOptions(e,"GET");this.logDebug(`HTTP GET: ${JSON.stringify(s)}`);if(this.isSurge||this.isLoon){$httpClient.get(s,t)}else if(this.isQuanX){$task.fetch(s).then(e=>{e["status"]=e.statusCode;t(null,e,e.body)},e=>t(e.error,null,null))}else if(this.isNode){return this.node.request.get(s,t)}else if(this.isJSBox){s["handler"]=(e=>{let s=e.error?JSON.stringify(e.error):undefined;let i=typeof e.data==="object"?JSON.stringify(e.data):e.data;t(s,e.response,i)});$http.get(s)}}post(e,t){let s=this.adapterHttpOptions(e,"POST");this.logDebug(`HTTP POST: ${JSON.stringify(s)}`);if(this.isSurge||this.isLoon){$httpClient.post(s,t)}else if(this.isQuanX){$task.fetch(s).then(e=>{e["status"]=e.statusCode;t(null,e,e.body)},e=>{t(e.error,null,null)})}else if(this.isNode){return this.node.request.post(s,t)}else if(this.isJSBox){s["handler"]=(e=>{let s=e.error?JSON.stringify(e.error):undefined;let i=typeof e.data==="object"?JSON.stringify(e.data):e.data;t(s,e.response,i)});$http.post(s)}}done(e={}){if(typeof $done!=="undefined"){$done(e)}}isToday(e){if(e==null){return false}else{let t=new Date;if(typeof e=="string"){e=new Date(e)}if(t.getFullYear()==e.getFullYear()&&t.getMonth()==e.getMonth()&&t.getDay()==e.getDay()){return true}else{return false}}}isNumber(e){return parseFloat(e).toString()==="NaN"?false:true}attempt(e,t=null){return e.then(e=>{return[null,e]}).catch(e=>{this.logError(e);return[e,t]})}retry(e,t=5,s=0,i=null){return(...o)=>{return new Promise((r,n)=>{function a(...o){Promise.resolve().then(()=>e.apply(this,o)).then(e=>{if(typeof i==="function"){Promise.resolve().then(()=>i(e)).then(()=>{r(e)}).catch(e=>{this.logError(e);if(t>=1&&s>0){setTimeout(()=>a.apply(this,o),s)}else if(t>=1){a.apply(this,o)}else{n(e)}t--})}else{r(e)}}).catch(e=>{this.logError(e);if(t>=1&&s>0){setTimeout(()=>a.apply(this,o),s)}else if(t>=1){a.apply(this,o)}else{n(e)}t--})}a.apply(this,o)})}}formatTime(e,t="yyyy-MM-dd hh:mm:ss"){var s={"M+":e.getMonth()+1,"d+":e.getDate(),"h+":e.getHours(),"m+":e.getMinutes(),"s+":e.getSeconds(),"q+":Math.floor((e.getMonth()+3)/3),S:e.getMilliseconds()};if(/(y+)/.test(t))t=t.replace(RegExp.$1,(e.getFullYear()+"").substr(4-RegExp.$1.length));for(let e in s)if(new RegExp("("+e+")").test(t))t=t.replace(RegExp.$1,RegExp.$1.length==1?s[e]:("00"+s[e]).substr((""+s[e]).length));return t}now(){return this.formatTime(new Date,"yyyy-MM-dd hh:mm:ss")}today(){return this.formatTime(new Date,"yyyy-MM-dd")}sleep(e){return new Promise(t=>setTimeout(t,e))}}(e)}
+function MagicJS(e="MagicJS",t="INFO"){const s={accept:"Accept","accept-ch":"Accept-CH","accept-charset":"Accept-Charset","accept-features":"Accept-Features","accept-encoding":"Accept-Encoding","accept-language":"Accept-Language","accept-ranges":"Accept-Ranges","access-control-allow-credentials":"Access-Control-Allow-Credentials","access-control-allow-origin":"Access-Control-Allow-Origin","access-control-allow-methods":"Access-Control-Allow-Methods","access-control-allow-headers":"Access-Control-Allow-Headers","access-control-max-age":"Access-Control-Max-Age","access-control-expose-headers":"Access-Control-Expose-Headers","access-control-request-method":"Access-Control-Request-Method","access-control-request-headers":"Access-Control-Request-Headers",age:"Age",allow:"Allow",alternates:"Alternates",authorization:"Authorization","cache-control":"Cache-Control",connection:"Connection","content-encoding":"Content-Encoding","content-language":"Content-Language","content-length":"Content-Length","content-location":"Content-Location","content-md5":"Content-MD5","content-range":"Content-Range","content-security-policy":"Content-Security-Policy","content-type":"Content-Type",cookie:"Cookie",dnt:"DNT",date:"Date",etag:"ETag",expect:"Expect",expires:"Expires",from:"From",host:"Host","if-match":"If-Match","if-modified-since":"If-Modified-Since","if-none-match":"If-None-Match","if-range":"If-Range","if-unmodified-since":"If-Unmodified-Since","last-event-id":"Last-Event-ID","last-modified":"Last-Modified",link:"Link",location:"Location","max-forwards":"Max-Forwards",negotiate:"Negotiate",origin:"Origin",pragma:"Pragma","proxy-authenticate":"Proxy-Authenticate","proxy-authorization":"Proxy-Authorization",range:"Range",referer:"Referer","retry-after":"Retry-After","sec-websocket-extensions":"Sec-Websocket-Extensions","sec-websocket-key":"Sec-Websocket-Key","sec-websocket-origin":"Sec-Websocket-Origin","sec-websocket-protocol":"Sec-Websocket-Protocol","sec-websocket-version":"Sec-Websocket-Version",server:"Server","set-cookie":"Set-Cookie","set-cookie2":"Set-Cookie2","strict-transport-security":"Strict-Transport-Security",tcn:"TCN",te:"TE",trailer:"Trailer","transfer-encoding":"Transfer-Encoding",upgrade:"Upgrade","user-agent":"User-Agent","variant-vary":"Variant-Vary",vary:"Vary",via:"Via",warning:"Warning","www-authenticate":"WWW-Authenticate","x-content-duration":"X-Content-Duration","x-content-security-policy":"X-Content-Security-Policy","x-dnsprefetch-control":"X-DNSPrefetch-Control","x-frame-options":"X-Frame-Options","x-requested-with":"X-Requested-With","x-surge-skip-scripting":"X-Surge-Skip-Scripting"};return new class{constructor(){this.version="2.2.3.3";this.scriptName=e;this.logLevels={DEBUG:5,INFO:4,NOTIFY:3,WARNING:2,ERROR:1,CRITICAL:0,NONE:-1};this.isLoon=typeof $loon!=="undefined";this.isQuanX=typeof $task!=="undefined";this.isJSBox=typeof $drive!=="undefined";this.isNode=typeof module!=="undefined"&&!this.isJSBox;this.isSurge=typeof $httpClient!=="undefined"&&!this.isLoon;this.platform=this.getPlatform();this.node={request:undefined,fs:undefined,data:{}};this.iOSUserAgent="Mozilla/5.0 (iPhone; CPU iPhone OS 13_3_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.5 Mobile/15E148 Safari/604.1";this.pcUserAgent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.125 Safari/537.36 Edg/84.0.522.59";this.logLevel=t;this._unifiedPushUrl="";if(this.isNode){this.node.fs=require("fs");this.node.request=require("request");try{this.node.fs.accessSync("./magic.json",this.node.fs.constants.R_OK|this.node.fs.constants.W_OK)}catch(e){this.node.fs.writeFileSync("./magic.json","{}",{encoding:"utf8"})}this.node.data=require("./magic.json")}else if(this.isJSBox){if(!$file.exists("drive://MagicJS")){$file.mkdir("drive://MagicJS")}if(!$file.exists("drive://MagicJS/magic.json")){$file.write({data:$data({string:"{}"}),path:"drive://MagicJS/magic.json"})}}}set barkUrl(e){this._unifiedPushUrl=!!e?e.replace(/\/+$/g,""):""}set logLevel(e){this._logLevel=typeof e==="string"?e.toUpperCase():"DEBUG"}get logLevel(){return this._logLevel}get isRequest(){return typeof $request!=="undefined"&&typeof $response==="undefined"}get isResponse(){return typeof $response!=="undefined"}get request(){return typeof $request!=="undefined"?$request:undefined}get response(){if(typeof $response!=="undefined"){if($response.hasOwnProperty("status"))$response["statusCode"]=$response["status"];if($response.hasOwnProperty("statusCode"))$response["status"]=$response["statusCode"];return $response}else{return undefined}}getPlatform(){if(this.isSurge)return"Surge";else if(this.isQuanX)return"QuantumultX";else if(this.isLoon)return"Loon";else if(this.isJSBox)return"JSBox";else if(this.isNode)return"Node.js";else return"unknown"}read(e,t=""){let s="";if(this.isSurge||this.isLoon){s=$persistentStore.read(e)}else if(this.isQuanX){s=$prefs.valueForKey(e)}else if(this.isNode){s=this.node.data}else if(this.isJSBox){s=$file.read("drive://MagicJS/magic.json").string}try{if(this.isNode)s=s[e];if(this.isJSBox)s=JSON.parse(s)[e];if(!!t){if(typeof s==="string")s=JSON.parse(s);s=!!s&&typeof s==="object"?s[t]:null}}catch(i){this.logError(i);s=!!t?{}:null;this.del(e)}if(typeof s==="undefined")s=null;try{if(!!s&&typeof s==="string")s=JSON.parse(s)}catch(e){}this.logDebug(`READ DATA [${e}]${!!t?`[${t}]`:""}(${typeof s})\n${JSON.stringify(s)}`);return s}write(e,t,s=""){let i=!!s?{}:"";if(!!s&&(this.isSurge||this.isLoon)){i=$persistentStore.read(e)}else if(!!s&&this.isQuanX){i=$prefs.valueForKey(e)}else if(this.isNode){i=this.node.data}else if(this.isJSBox){i=JSON.parse($file.read("drive://MagicJS/magic.json").string)}if(!!s){try{if(typeof i==="string")i=JSON.parse(i);i=typeof i==="object"&&!!i?i:{}}catch(t){this.logError(t);this.del(e);i={}}if(this.isJSBox||this.isNode){if(!i.hasOwnProperty(e)||typeof i[e]!=="object"||i[e]===null){i[e]={}}if(!i[e].hasOwnProperty(s)){i[e][s]=null}if(typeof t==="undefined"){delete i[e][s]}else{i[e][s]=t}}else{if(typeof t==="undefined"){delete i[s]}else{i[s]=t}}}else{if(this.isNode||this.isJSBox){if(typeof t==="undefined"){delete i[e]}else{i[e]=t}}else{if(typeof t==="undefined"){i=null}else{i=t}}}if(typeof i==="object")i=JSON.stringify(i);if(this.isSurge||this.isLoon){$persistentStore.write(i,e)}else if(this.isQuanX){$prefs.setValueForKey(i,e)}else if(this.isNode){this.node.fs.writeFileSync("./magic.json",i)}else if(this.isJSBox){$file.write({data:$data({string:i}),path:"drive://MagicJS/magic.json"})}this.logDebug(`WRITE DATA [${e}]${!!s?`[${s}]`:""}(${typeof t})\n${JSON.stringify(t)}`)}del(e,t=""){this.logDebug(`DELETE KEY [${e}]${!!t?`[${t}]`:""}`);this.write(e,null,t)}notify(e=this.scriptName,t="",s="",i=""){let o=e=>{let t={};if(this.isSurge||this.isQuanX||this.isLoon){if(typeof e==="string"){if(this.isLoon)t={openUrl:e};else if(this.isQuanX)t={"open-url":e};else if(this.isSurge)t={url:e}}else if(typeof e==="object"){let s={Surge:{openUrl:"url","open-url":"url"},Loon:{url:"openUrl","open-url":"openUrl","media-url":"mediaUrl"},QuantumultX:{url:"open-url",openUrl:"open-url",mediaUrl:"media-url"}};let i=Object.keys(e);for(let o=0;o{})}if(this.isSurge||this.isLoon){$notification.post(e,t,s,i)}else if(this.isQuanX){$notify(e,t,s,i)}else if(this.isJSBox){let i={title:e,body:!!t?`${t}\n${s}`:s};$push.schedule(i)}}log(e,t="INFO"){if(!(this.logLevels[this._logLevel]{if(typeof i.body==="undefined")return"";return`${encodeURIComponent(e)}=${encodeURIComponent(i.body[e])}`}).join("&");if(i.url.indexOf("?")<0)i.url+="?";if(i.url.lastIndexOf("&")+1!=i.url.length&&i.url.lastIndexOf("?")+1!=i.url.length)i.url+="&";i.url+=e;delete i.body}if(this.isQuanX){if(i.hasOwnProperty("body")&&typeof i["body"]!=="string")i["body"]=JSON.stringify(i["body"]);i["method"]=t}else if(this.isNode){delete i.headers["Accept-Encoding"];if(typeof i.body==="object"){if(t==="GET"){i.qs=i.body;delete i.body}else if(t==="POST"){i["json"]=true;i.body=i.body}}}else if(this.isJSBox){i["header"]=i["headers"];delete i["headers"]}return i}get(e,t){let s=this.adapterHttpOptions(e,"GET");this.logDebug(`HTTP GET: ${JSON.stringify(s)}`);if(this.isSurge||this.isLoon){$httpClient.get(s,t)}else if(this.isQuanX){$task.fetch(s).then(e=>{e["status"]=e.statusCode;t(null,e,e.body)},e=>t(e.error,null,null))}else if(this.isNode){return this.node.request.get(s,t)}else if(this.isJSBox){s["handler"]=(e=>{let s=e.error?JSON.stringify(e.error):undefined;let i=typeof e.data==="object"?JSON.stringify(e.data):e.data;t(s,e.response,i)});$http.get(s)}}post(e,t){let s=this.adapterHttpOptions(e,"POST");this.logDebug(`HTTP POST: ${JSON.stringify(s)}`);if(this.isSurge||this.isLoon){$httpClient.post(s,t)}else if(this.isQuanX){$task.fetch(s).then(e=>{e["status"]=e.statusCode;t(null,e,e.body)},e=>{t(e.error,null,null)})}else if(this.isNode){return this.node.request.post(s,t)}else if(this.isJSBox){s["handler"]=(e=>{let s=e.error?JSON.stringify(e.error):undefined;let i=typeof e.data==="object"?JSON.stringify(e.data):e.data;t(s,e.response,i)});$http.post(s)}}done(e={}){if(typeof $done!=="undefined"){$done(e)}}isToday(e){if(e==null){return false}else{let t=new Date;if(typeof e=="string"){e=new Date(e)}if(t.getFullYear()==e.getFullYear()&&t.getMonth()==e.getMonth()&&t.getDay()==e.getDay()){return true}else{return false}}}isNumber(e){return parseFloat(e).toString()==="NaN"?false:true}attempt(e,t=null){return e.then(e=>{return[null,e]}).catch(e=>{this.logError(e);return[e,t]})}retry(e,t=5,s=0,i=null){return(...o)=>{return new Promise((r,n)=>{function a(...o){Promise.resolve().then(()=>e.apply(this,o)).then(e=>{if(typeof i==="function"){Promise.resolve().then(()=>i(e)).then(()=>{r(e)}).catch(e=>{this.logError(e);if(t>=1&&s>0){setTimeout(()=>a.apply(this,o),s)}else if(t>=1){a.apply(this,o)}else{n(e)}t--})}else{r(e)}}).catch(e=>{this.logError(e);if(t>=1&&s>0){setTimeout(()=>a.apply(this,o),s)}else if(t>=1){a.apply(this,o)}else{n(e)}t--})}a.apply(this,o)})}}formatTime(e,t="yyyy-MM-dd hh:mm:ss"){var s={"M+":e.getMonth()+1,"d+":e.getDate(),"h+":e.getHours(),"m+":e.getMinutes(),"s+":e.getSeconds(),"q+":Math.floor((e.getMonth()+3)/3),S:e.getMilliseconds()};if(/(y+)/.test(t))t=t.replace(RegExp.$1,(e.getFullYear()+"").substr(4-RegExp.$1.length));for(let e in s)if(new RegExp("("+e+")").test(t))t=t.replace(RegExp.$1,RegExp.$1.length==1?s[e]:("00"+s[e]).substr((""+s[e]).length));return t}now(){return this.formatTime(new Date,"yyyy-MM-dd hh:mm:ss")}today(){return this.formatTime(new Date,"yyyy-MM-dd")}sleep(e){return new Promise(t=>setTimeout(t,e))}}(e)}
diff --git a/script/eleme/images/bark_conf.jpg b/script/eleme/images/bark_conf.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..319ccc11fe116fbd6656ac16acfa2ccd5faaaa67
GIT binary patch
literal 99903
zcmeFY2~-nHw=dp^fQS$o1Q{cuq5>i^ih-!82nZ37dB{Nyvk(!G03q?H%#(_Mf`E!l
zGKmZk2#JsYDk8`zgFwPjWRgTAv?L_2J>Pflcivn7d%wHhyYH-f*Z*}^x_7#(cGs>{
z?b^ey_#gPwz;??s7H0qf0RZ>_eE>ckxON&F;0plO*1$mk0JZ=^0#bk=LU%vvP1q_!T?zle?T
zzg&OP|2Wvgf3zJK(E7=1aib{RD9)T3T;Ga{9^0w?k8=N?)Ye~p!n~m;TwymjEvy3fKjl2Xz09@_K)i
zHv=$G=_ud|RL>9a2g0E`C!jk&Iru=d1rP#w1BU=jh&}=whQ3FB_A^u$I@m*h??26d
z+`BOa045YZpWpJ2dzKUcs5JzDtxf;9x8Dc=B*g&WRnuj!D_(!F`#Baj`9dS~TPXmD
zy8wW6A5_OJ%vblwAI}B0odf`(Nj`sN9{`AC0>H*CKA-cL&)+Bl0Ko|Wcp1Wf2}o|)
zG{1=?C?E-Jk`xe>6yVbUIMh=@0)HHTFoI43n*=ut35#qI-6{qZXxI*H5)c&Jv{_I{
z=;weGh=ra5n<*PV^4sl4Thvb0w(YQc&)lPX@yd14t+H}Egq0v!evs0(fn4h(P6GrxcO
zJo{yCp7m|z`zm`4{IUL1E&)LBZ(>2`ze)DL$OUzRz^2Wc1viWQluKY!KdNmLRnxU&?znj6{Z`pMdi1@lpQ8OC*?&y1>;GGl{i|UA
zkZT+;gJ$^u*};dH{GV}vYV$ur3e1^525b`)fCiJGB!C2XYF~hdo33pI_W#$r@caHt
zx9obhHRfS=j#Gj9u^3neJIi=a9jwG5tzcN(fw$YBtKg?%v2e7inYc*
z(V$Sn-GzqXFf)|J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