Skip to content
This repository has been archived by the owner on Jan 25, 2022. It is now read-only.

HTMLArchiver

taizan-hokuto edited this page Jan 11, 2021 · 4 revisions
  • archives chat data as an HTML file, with embedded custom emojis.

parameter

  • save_path : str

path for save file.

sample code

  • archive live chat data
import asyncio
from pytchat import HTMLArchiver, LiveChatAsync

video_id = "**********"
async def main():
    livechat = LiveChatAsync(video_id, processor=HTMLArchiver("v:/test.html"))
    while livechat.is_alive():
        await livechat.get()
        await asyncio.sleep(1)

asyncio.run(main())