Skip to main content

支持AI总结的社交媒体聚合解析器

Project description

ParseHub

支持AI总结的社交媒体聚合解析器

视频总结会调用 whisper-1 模型

基于该项目开发的 Tg Bot:
@ParsehubBot | https://github.com/z-mio/parse_hub_bot

支持的平台:
Twitter 视频|图文
Instagram 视频|图文
微博 视频|图文
贴吧 视频|图文
小红书 视频|图文
Youtube 视频|音乐
Facebook 视频
Bilibili 视频|动态
抖音|TikTok 视频|图文
......

安装

pip install parsehub


[!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

使用

from parsehub import ParseHub
from parsehub.config import ParseConfig, DownloadConfig
import asyncio


async def main():
    ph = ParseHub(config=ParseConfig())
    result = await ph.parse('https://twitter.com/aobuta_anime/status/1827284717848424696')
    print(result)

    # dr = await result.download()
    # print(dr.media)
    # sr = await dr.summary()
    # await dr.delete()

    sr = await result.summary(download_config=DownloadConfig())
    print(sr.content)


if __name__ == '__main__':
    asyncio.run(main())

环境变量

名称 描述 默认值
PROVIDER 模型提供商, 暂只支持openai openai
API_KEY API Key
BASE_URL API 地址 https://api.openai.com/v1
MODEL AI总结使用的模型 gpt-4o-mini
PROMPT AI总结提示词 You are a useful assistant to summarize the main points of articles and video captions. Summarize 3 to 8 points in "Simplified Chinese" and summarize them all at the end.

参考项目

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

parsehub-1.1.5.tar.gz (58.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

parsehub-1.1.5-py3-none-any.whl (81.7 kB view details)

Uploaded Python 3

File details

Details for the file parsehub-1.1.5.tar.gz.

File metadata

  • Download URL: parsehub-1.1.5.tar.gz
  • Upload date:
  • Size: 58.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.4.16

File hashes

Hashes for parsehub-1.1.5.tar.gz
Algorithm Hash digest
SHA256 6ecf7b30d5191565c0f13d89228aa085be6e2b2f5625123ba89e6b20ee520d68
MD5 4d8c754f31977e00eb64d1401da5988e
BLAKE2b-256 6c63a4c6351988d7bb7d8e319f3efddbeaa7f8dd861a42a1d6bbc76872381e7c

See more details on using hashes here.

File details

Details for the file parsehub-1.1.5-py3-none-any.whl.

File metadata

  • Download URL: parsehub-1.1.5-py3-none-any.whl
  • Upload date:
  • Size: 81.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.4.16

File hashes

Hashes for parsehub-1.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 dba3bd860bec24cc3bde6fc8968ef943b3b9ee9ba07c9fd0d95ca537ce61708e
MD5 51d90a217dae78558fdaacce1a77b920
BLAKE2b-256 01f6f36b9df904915b4d21c2371fad6c8aa44182c40d4362eb60dc7545931290

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page