支持AI总结的社交媒体聚合解析器
Project description
ParseHub
支持AI总结的社交媒体聚合解析器
视频总结会调用
whisper-1
模型
支持的平台:
Twitter 视频|图文
Instagram 视频|图文
微博 视频|图文
贴吧 视频|图文
小红书 视频|图文
Youtube 视频|音乐
Facebook 视频
Bilibili 视频|动态
抖音|TikTok 视频|图文
......
安装
pip install parsehub
安装yt-dlp
: wiki
[!IMPORTANT]
注意
Linux用户在导入skia-python包时可能会遇到以下报错
libGL.so.1: cannot open shared object file: No such file or directoryWindows用户在缺少Microsoft Visual C++ Runtime时可能会遇到以下报错
ImportError: DLL load failed while importing skia: The specified module could not be found.解决方法
ubuntu用户
apt install libgl1-mesa-glxArchLinux用户
pacman -S libglcentos用户
yum install mesa-libGL -yWindows用户
使用
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.0.5.tar.gz
(56.8 kB
view details)
Built Distribution
parsehub-1.0.5-py3-none-any.whl
(79.8 kB
view details)
File details
Details for the file parsehub-1.0.5.tar.gz
.
File metadata
- Download URL: parsehub-1.0.5.tar.gz
- Upload date:
- Size: 56.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.4.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ad7de376876879acd4d2c7b129ac1b5cf5d8d1d135805c5f0f37f900fc4594e |
|
MD5 | 2f3d13715f6217af71484d95735b6154 |
|
BLAKE2b-256 | 6af923a95e9428045025706769a787453c9999b81ff99bfc4a2435fdde88fb61 |
File details
Details for the file parsehub-1.0.5-py3-none-any.whl
.
File metadata
- Download URL: parsehub-1.0.5-py3-none-any.whl
- Upload date:
- Size: 79.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.4.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 93e7191935051cff55524e0d60be3b15f6c76def1229ed7321c228b9e2132f52 |
|
MD5 | a60f7d6a7816deb201e1c9ad4e5e14c1 |
|
BLAKE2b-256 | 242d5552118af01c58ca8bad3f3ff45f3aee5b5ac908c7558d2a7858ebaeb6b7 |