Skip to main content

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

Project description

ParseHub

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

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

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

安装

pip install parsehub

使用

from parsehub import ParseHub
from parsehub.config import ParseHubConfig
import asyncio


async def main():
    # ParseHubConfig.api_key = 'your_api_key'
    # ParseHubConfig.base_url = 'your_base_url'
    # ParseHubConfig.prompt = '...'

    ph = ParseHub()
    result = await ph.parse('https://twitter.com/aobuta_anime/status/1827284717848424696')
    print(result)

    # download_result = await result.download()
    # print(download_result.media)
    # summary_result = await download_result.summary()
    # await download_result.delete()

    summary_result = await result.summary()
    print(summary_result.content)


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

环境变量

名称 描述 默认值
DOUYIN_API 抖音解析API地址, 项目地址: https://github.com/Evil0ctal/Douyin_TikTok_Download_API https://douyin.wtf
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.
YT_DLP_DURATION_LIMIT 使用yt-dlp下载超过指定时长的视频时, 下载最低画质, 单位秒, 0为不限制 0

Project details


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.3.tar.gz (55.4 kB view details)

Uploaded Source

Built Distribution

parsehub-1.0.3-py3-none-any.whl (78.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for parsehub-1.0.3.tar.gz
Algorithm Hash digest
SHA256 8674aa2f4d138fb1f3c8ec70bec9890e244af5033e585a6fbeab180ad87d43c8
MD5 9fd6bd8c7402e5abf9e025515a809c97
BLAKE2b-256 008f4f23401e01350789d41fd62897a798428753f7d1c7e125bf23317d9dd5c1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for parsehub-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 1f55ccc7fd85779d0e5156043eb6d2ed28fa3c26e110aac614bebe90a20f5cb4
MD5 184730a2ad243ff95da19ff80613eea7
BLAKE2b-256 f9076cc89709605673a753478e3a256390c94d432c0b639994ebc7128879e585

See more details on using hashes here.

Supported by

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