35 Star 266 Fork 75

Bygones / PHP-DouyinRobot

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
index.php 1.33 KB
一键复制 编辑 原始数据 按行查看 历史
Bygones 提交于 2019-06-16 16:47 . 修复bug
<?php
include __DIR__ . "/AI.php";
include __DIR__ . "/Adb.php";
include __DIR__ . "/DyImg.php";
$config = include __DIR__ . "/config/redmi.php";
//咳咳,由于我的测试 = =,我劝大家把年龄调到0(通吃,是女的就点赞关注),因为我测试到很多女生检测到12岁,明明都20多岁了 ,好了不多说了,自行脑补啦
$gender = 50;//小于50为女
$age = 0;//最小年龄为18,
$beauty = 80;//颜值最低80
fwrite(STDOUT,'是否开始你的表演 [y/n] ');
if(trim(fgets(STDIN)) != "y") {
echo "感谢您的使用,再见".PHP_EOL;exit();
}
$AI = new AI();
$Adb = new Adb((array) $config);
$DyImg = new DyImg();
while (true){
try{
$dir = $Adb->Screenshot();
$img = $DyImg->compressedImage($dir,$dir);
$res = $AI->get($img);
if($res["code"] == 1){
if($res["data"]["gender"] <= $gender && $res["data"]["age"] >= $age && $res["data"]["beauty"] >= $beauty){
$Adb->Follow();
$Adb->Fabulous();
echo "遇到好看的小姐姐,点赞加关注✧(≖ ◡ ≖✿)嘿嘿".PHP_EOL;
$Swipe = $Adb->Slide();
}else{
$Swipe = $Adb->Slide();
}
} else {
$Swipe = $Adb->Slide();
}
}catch (\Exception $e){
echo "感谢您的使用,再见".PHP_EOL;exit();
}
}
PHP
1
https://gitee.com/Bygones/PHP-DouyinRobot.git
git@gitee.com:Bygones/PHP-DouyinRobot.git
Bygones
PHP-DouyinRobot
PHP-DouyinRobot
master

搜索帮助