支持AI总结的社交媒体聚合解析器
Project description
ParseHub
支持AI总结的社交媒体聚合解析器
Social Media Aggregation Analyzer Supported by AI Summarization
视频总结使用
whisper-1模型
基于该项目开发的 Tg Bot:
@ParsehuBot | https://github.com/z-mio/parse_hub_bot
支持的平台:
Twitter 视频|图文
Instagram 视频|图文
微博 视频|图文
贴吧 视频|图文
小红书 视频|图文
Youtube 视频|音乐
Facebook 视频
Bilibili 视频|动态
抖音|TikTok 视频|图文
微信公众号 图文
最右 视频|图文
酷安 视频|图文
皮皮虾 视频|图文
快手 视频
Threads 视频|图文
......
安装
pip install parsehub
[!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用户
# Ubuntu 22 安装 apt install libgl1-mesa-glx # Ubuntu 24 安装 apt install libgl1 libglx-mesa0ArchLinux用户
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)
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总结提示词 | Use "Simplified Chinese" to summarize the key points of articles and video subtitles. Summarize it in one sentence at the beginning and then write out n key points. |
TRANSCRIPTIONS_PROVIDER |
语音转文本模型提供商 支持: openai,azure,fast_whisper |
|
TRANSCRIPTIONS_BASE_URL |
语音转文本 API端点 | |
TRANSCRIPTIONS_API_KEY |
语音转文本 API密钥 |
关于登录
- 为什么需要登录?
- 部分平台的内容有限制,需要登录才能查看。
通过 Cookie 登录:
from parsehub.config import ParseConfig
pc = ParseConfig(cookie="从浏览器中获取的cookie")
目前支持的平台:
twitterinstagramkuaishoubilibiliyoutube
参考项目
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file parsehub-1.5.13.tar.gz.
File metadata
- Download URL: parsehub-1.5.13.tar.gz
- Upload date:
- Size: 56.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a19745ae04cad0e30e03a330f64e6d0fe1363285e2751b98add06b0b7ca15770
|
|
| MD5 |
8bb425269e4361b3a994f0f056be089c
|
|
| BLAKE2b-256 |
4591081aa44afde52b2ee2e65ddc7f358ab05823efd67db599eb8a8d9cd30591
|
Provenance
The following attestation bundles were made for parsehub-1.5.13.tar.gz:
Publisher:
python-publish.yml on z-mio/ParseHub
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
parsehub-1.5.13.tar.gz -
Subject digest:
a19745ae04cad0e30e03a330f64e6d0fe1363285e2751b98add06b0b7ca15770 - Sigstore transparency entry: 930474686
- Sigstore integration time:
-
Permalink:
z-mio/ParseHub@4b25fd892a76595ac21a3f5ee4f983a2dab57737 -
Branch / Tag:
refs/tags/v1.5.13 - Owner: https://github.com/z-mio
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@4b25fd892a76595ac21a3f5ee4f983a2dab57737 -
Trigger Event:
release
-
Statement type:
File details
Details for the file parsehub-1.5.13-py3-none-any.whl.
File metadata
- Download URL: parsehub-1.5.13-py3-none-any.whl
- Upload date:
- Size: 75.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d64ee8d1c5b1d9e551fc28153c12033cc56832ad134eb91d8c87b6524dd903a7
|
|
| MD5 |
b4f71e88ff6a48e3acd37ff268ff61fe
|
|
| BLAKE2b-256 |
c9d16f519bfedea1637d386ac259341594898b533cc179d331464a4242156a99
|
Provenance
The following attestation bundles were made for parsehub-1.5.13-py3-none-any.whl:
Publisher:
python-publish.yml on z-mio/ParseHub
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
parsehub-1.5.13-py3-none-any.whl -
Subject digest:
d64ee8d1c5b1d9e551fc28153c12033cc56832ad134eb91d8c87b6524dd903a7 - Sigstore transparency entry: 930474690
- Sigstore integration time:
-
Permalink:
z-mio/ParseHub@4b25fd892a76595ac21a3f5ee4f983a2dab57737 -
Branch / Tag:
refs/tags/v1.5.13 - Owner: https://github.com/z-mio
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@4b25fd892a76595ac21a3f5ee4f983a2dab57737 -
Trigger Event:
release
-
Statement type: