parse_hub_bot

parse_hub_bot

支持 AI 总结和内联模式的多平台解析 Bot

Stars: 268

Visit
 screenshot

ParseHubBot is a Telegram aggregation analysis Bot that supports AI summary and inline mode. It currently supports various platforms like Douyin, Bilibili, YouTube, TikTok, Twitter, Baidu Tieba, Facebook, Weibo, Instagram, etc. Users can deploy the bot by modifying environment variables and platform configurations. Deployment can be done using Docker or by running the bot directly. The bot can be started by running a script in the project root directory. Users can interact with the bot by sending share links or using the command '/jx' for regular use, and by mentioning the bot username followed by a link for inline use.

README:

ParseHubBot


Telegram聚合解析Bot, 支持AI总结, 支持内联模式
Telegram aggregation analysis Bot, supports AI summary, supports inline mode

实例: @ParseHubBot

目前支持的平台:

  • 抖音视频|图文
  • 哔哩哔哩视频|动态
  • YouTube
  • YouTube Music
  • TikTok视频|图文
  • 小红书视频|图文
  • Twitter视频|图文
  • 百度贴吧图文|视频
  • Facebook视频
  • 微博视频|图文
  • Instagram视频|图文
  • 查看更多...

部署Bot

修改配置

配置优先级: 平台配置 > 环境变量

修改环境变量:

.env.exa 复制为 .env, 并修改配置

参数 说明
API_HASH, API_ID 登录 https://my.telegram.org 获取
BOT_TOKEN 在 @BotFather 获取
BOT_PROXY 海外服务器无需填写
PARSER_PROXY 解析时使用的代理
DOWNLOADER_PROXY 下载时使用的代理
DOUYIN_API 你部署的抖音API地址, 默认: https://douyin.wtf
AI_SUMMARY 是否开启AI总结
API_KEY openai 密钥
BASE_URL openai api地址
MODEL AI总结使用的模型
PROMPT AI总结提示词
TRANSCRIPTIONS_PROVIDER 语音转文本模型提供商 支持: openai,azure,fast_whisper
TRANSCRIPTIONS_BASE_URL 语音转文本 API端点
TRANSCRIPTIONS_API_KEY 语音转文本 API密钥
CACHE_TIME 解析结果缓存时间, 单位: 秒, 0为不缓存, 默认缓存 24 小时

修改平台配置:

platform_config.yaml.exa 复制为 platform_config.yaml

配置说明:

platforms:
  twitter: # 平台id
    disable_parser_proxy: false # 解析时是否禁用代理
    disable_downloader_proxy: false # 下载时是否禁用代理
    parser_proxies: [ ] # 解析代理池, 多个代理会随机选择
    downloader_proxies: [ ] # 下载代理池, 多个代理会随机选择
    cookies: [ ] # 平台 cookies, 部分平台的部分帖子需要登录后才能获取到内容

配置示例:

platforms:
  twitter:
    cookies:
      - auth_token=xxxx; ct0=xxxx
      - auth_token=xxxx; ct0=xxxx

  bilibili:
    disable_parser_proxy: true
    downloader_proxies:
      - http://127.0.0.1:7890
      - http://127.0.0.1:7891

开始部署

Docker (推荐):

在项目根目录运行:

sudo sh start.sh # 构建并运行 Bot
# 其他命令:
sudo sh start.sh -h # 查看帮助
sudo sh start.sh stop  # 停止 Bot
sudo sh start.sh restart # 重启 Bot

直接运行:

[!IMPORTANT]

注意

Linux用户在导入skia-python包时可能会遇到以下报错

libGL.so.1: cannot open shared object file: No such file or directory

Windows用户在缺少Microsoft Visual C++ Runtime时可能会遇到以下报错

ImportError: DLL load failed while importing skia: The specified module could not be found.

解决方法

ubuntu用户

# Ubuntu 22 安装
apt install libgl1-mesa-glx
# Ubuntu 24 安装
apt install libgl1 libglx-mesa0

ArchLinux用户

pacman -S libgl

centos用户

yum install mesa-libGL -y

Windows用户

下载链接Microsoft Visual C++ 2015 Redistributable Update 3 RC

在项目根目录运行:

apt install python3-pip -y
pip install uv --break-system-packages
uv venv --python 3.12
uv sync

启动bot

uv run bot.py

设置命令列表
私聊bot发送指令 /menu

使用

普通使用: 发送分享链接给bot或使用指令 /jx
内联使用: 任意聊天窗口输入: @bot用户名 链接

相关项目

鸣谢

For Tasks:

Click tags to check more tools for each tasks

For Jobs:

Alternative AI tools for parse_hub_bot

Similar Open Source Tools

For similar tasks

For similar jobs