抖音自动关注小姐姐小哥哥神器
创作来源:https://github.com/wangshub/Douyin-Bot 源作者用python实现,这里用node实现一个版本,修改了一些东西
- [x] 自动翻页
- [x] 颜值检测
- [x] 人脸识别
- [x] 自动点赞
- [x] 自动关注
原理
- 打开《抖音短视频》APP,进入主界面
- 获取手机截图,并对截图进行压缩 (Size < 1MB);
- 请求 人脸识别 API;
- 解析返回的人脸 Json 信息,对人脸检测切割;
- 当颜值大于门限值
BEAUTY_THRESHOLD
时,点赞并关注; - 下一页,返回第一步;
使用教程
- 相关软件工具安装和使用步骤请参考 wechat_jump_game 和 Android 操作步骤
- 上述环境事python,这里是使用的node,所以需要在本地装一下nodejs
- 在 ai.qq.com 免费申请
AppKey
和AppID
- 获取源码:
git clone git@github.com:sunlandong/douyin_bot_node.git
- 进入源码目录:
cd douyin_bot_node
- 安装依赖:
npm install
- 运行程序:
node index.js
- 获取源码:
源码
var images = require("images");
var rp = require("request-promise");
var md5 = require("crypto-js/md5");
const url = 'https://api.ai.qq.com/fcgi-bin/face/face_detectface'
class DouyinGril {
constructor() {
const _ts = this,
{ execFile } = require('child_process');
_ts.m = {
path: require('path'),
fs: require('fs'),
os: require('os'),
chalk: require('chalk'),
execFile: execFile
};
_ts.config = {};
_ts.screenData = {};
_ts.config.os = (() => {
let osName = _ts.m.os.type();
return osName === 'Darwin' ? 'mac' : osName === 'Linux' ? 'linux' : 'win';
})();
}
async init() {
const _ts = this
try {
const v = await _ts.screenSize()
let status = v.status,
data = v.data || {};
if (status === 'success') {
_ts.screenData.width = data.width;
_ts.screenData.height = data.height;
}
} catch (e) {
_ts.log('error', e.status);
_ts.log('error', e.msg);
_ts.log('error', '请检查手机是否已经成功连接电脑并已经开启USB调试模式');
}
}
/**
* 截取手机屏幕并保存到项目的目录中
* @param {string} imgName 图片名称
*/
sc