破解91视频的播放限制、理论上可以无限下载
切除长视频(4分钟)播放开始的静态帧(10秒)
为标题添加中文分词,解决电报对中文搜索的问题
重试机制,网络超时重试
bot采用 webhook 方式,并发(同时可以做负载均衡)
向机器人(@porn_91Bot)发送链接,可以 获取视频真实地址
并 下载视频
docker预装环境,方便更换服务,一键启动
自定义关键字删除
ffmeg转换长视频会随机卡住,手动杀死进程后,自动重试正常
iOS电报的视频会显示方形(已修复)
2021-10-12 优化获取方式,cookie
2021-09-26 优化大文件上传,取消切割视频
2021-09-13 重复消息直接回复,速度超快
2021-09-12 解决验证问题
2021-09-11 增加分层构建镜像,减小镜像体积
curl -fsSL get.docker.com -o get-docker.sh && sh get-docker.sh --mirror Aliyun&&systemctl enable docker&&systemctl start docker
curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose &&chmod +x /usr/local/bin/docker-compose
删除容器
docker rm -f pornbot
删除镜像
docker rmi jwstar/pornbot_tg
进入容器
docker exec -it pornbot /bin/bash
创建目录 /porn
mkdir /porn
注意事项参考 https://core.telegram.org/bots/api#setwebhook
1.只要设置了传出 webhook,您就无法使用getUpdates接收更新。
2.要使用自签名证书,您需要使用证书参数上传您的公钥证书。请上传为 InputFile,发送字符串将不起作用。3. Webhooks当前支持的端口:443, 80, 88, 8443。
证书申请 根据 cloudflare dns申请 ,其他方法参考 https://github.com/acmesh-official/acme.sh/wiki/%E8%AF%B4%E6%98%8E
curl https://get.acme.sh | sh -s [email protected]
export CF_Key="xxxxxx"
export CF_Email="[email protected]"
acme.sh --issue --dns dns_cf -d xxxx.xxxx.com
//设置证书位置到项目下
acme.sh --installcert -d xxxx.xxxx.com \
--key-file /porn/server.key \
--fullchain-file /porn/server.crt
#telegram Token
token: "***:*********"
webhook_url: "https://****************"
webhook_port: ":443"
max_connections: 4
#群组或自己的id
telegram_id: 22222
#定时任务表达式
spec: "0 0 6 * * ?"
version: "3.7"
services:
pornbot:
image: jwstar/pornbot_tg
container_name: pornbot
volumes:
- /porn:/config
ports:
- "443:443" #端口号和conf.yml一致
docker-compose up
发送 /hello 到机器人
得到回复 Hello World!
https://github.com/acmesh-official/acme.sh/wiki/%E8%AF%B4%E6%98%8E
https://github.com/tucnak/telebot
https://github.com/gocolly/colly