This repository has been archived by the owner on Jan 25, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 48
ReplayChatAsync
taizan-hokuto edited this page Jan 2, 2020
·
8 revisions
ReplayChatAsync object
- fetches past chat data of archived videos and stores them in buffer with aiohttp on asyncio context.
- responds to user inquiries of get().
- invokes callback function with processed chat data.
- can retrieve chat data disabled by editing video.
from pytchat import ReplayChatAsync
chat = ReplayChatAsync("gb01h_eT0pw", seektime = 1000)
name | type | required | remarks | default value |
---|---|---|---|---|
video_id | str | * | ID of youtube video. | - |
processor | ChatProcessor | DefaultProcessor | ||
buffer | Buffer | buffer of chat data fetched background. | Buffer(maxsize=20) | |
interruptable | bool | True | ||
callback | func | [optional] function called from _listen() periodically. | None | |
done_callback | func | [optional] function called when listener ends. | None | |
direct_mode | bool | If True, invoke specified callback function without using buffer. | False | |
seektime | int | seek time of chat (seconds). | 0 (start of chat) |
description | return value |
---|---|
Get processed chat data from buffer. | processed chat data |
description | return value |
---|---|
pause chat fetching to buffer. | - |
description | return value |
---|---|
resume chat fetching to buffer. | - |
description | return value |
---|---|
Check if chat stream is alive. | bool |
description | return value |
---|---|
Terminate fetching chat. | - |