Skip to content

[小技巧]安装go并自建iphone13的有货监控服务+bark通知到iphone

Problem Definition

Solution

安装Go – 依赖Go环境

# 参考 https://golang.org/doc/install
wget https://golang.org/dl/go1.17.1.linux-amd64.tar.gz
rm -rf /usr/local/go && tar -C /usr/local -xzf go1.17.1.linux-amd64.tar.gz
echo "export PATH=$PATH:/usr/local/go/bin" >> ~/.zshrc && source ~/.zshrc
# test it out
go version

mv go1.17.1.linux-amd64.tar.gz

安装Bark并获得notification url

参考 https://github.com/Finb/bark-serverhttps://github.com/Finb/Bark

启动监控器

mkdir -p /data/cisasntyi_iphone13 && cd /data/cisasntyi_iphone13 
git clone https://github.com/SealinGp/cisasntyi .
# 先run一次
bash dev.sh

vi app_dev.yml
# 修改配置文件
#查询间隔 单位:s
searchInterval: 30

#线下店地址区域
#location: "广东 深圳 南山区"
location: "上海 上海 静安区"

#手机型号, 通过访问官网,选择机型 可在uri中得到 比如 MLE93CH/A (iphone 13 512GB 粉色)
#modals: ["MLDW3CH/A","MLDV3CH/A"]
modals: ["MLHJ3CH/A","MLHL3CH/A","MLHK3CH/A","MLHH3CH/A","MLTN3CH/A","MLTF3CH/A","MLTL3CH/A"]


#推送url 需要下载Bark app 在ios可得到 https://api.day.app/xxx
#notifyUrl: ["https://api.day.app/xxx"]
notifyUrl: ["https://api.day.app/pvowvTdd-your-own-notification-url"]

# 大功告成
bash dev.sh

有货就会自动通过bark来通知

Leave a Reply

Your email address will not be published.