Skip to main content

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

Project description

ParseHub

支持AI总结的社交媒体聚合解析器
Social Media Aggregation Analyzer Supported by AI Summarization

视频总结使用 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)
    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.
TRANSCRIPTIONS_PROVIDER 语音转文本模型提供商 支持: openai,azure,fast_whisper
TRANSCRIPTIONS_BASE_URL 语音转文本 API端点
TRANSCRIPTIONS_API_KEY 语音转文本 API密钥

关于登录

配置登录:

from parsehub.config import ParseConfig

pc = ParseConfig(cookie="从浏览器中获取的cookie")

目前支持的平台:

  • twitter

参考项目

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.3.3.tar.gz (66.7 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.3.3-py3-none-any.whl (93.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: parsehub-1.3.3.tar.gz
  • Upload date:
  • Size: 66.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for parsehub-1.3.3.tar.gz
Algorithm Hash digest
SHA256 399dcb751bd85ddcf4dfdb10349a90d962f5f849dbc37557a62bb2ae431f23b0
MD5 1d5618de0246aae506421c2c07cf2ca2
BLAKE2b-256 f4484332f3a0dbae78e3af3beae9cc3a3c0c8b71607c1ee5729a5d5a4774e3a5

See more details on using hashes here.

Provenance

The following attestation bundles were made for parsehub-1.3.3.tar.gz:

Publisher: python-publish.yml on z-mio/ParseHub

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: parsehub-1.3.3-py3-none-any.whl
  • Upload date:
  • Size: 93.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for parsehub-1.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 23a9c20278b27503d72a9ff7c505f0a2ec772f1786092904ca2b27340bbeab31
MD5 a1f2d4a443bed2f65f01d7d5b4fd8f94
BLAKE2b-256 7bedba8736fe479db9216e100c1d073efda83d7217da5b00d00b33e6d1c7b08a

See more details on using hashes here.

Provenance

The following attestation bundles were made for parsehub-1.3.3-py3-none-any.whl:

Publisher: python-publish.yml on z-mio/ParseHub

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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