This repository was archived by the owner on Jan 25, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 55
LiveChat
taizan-hokuto edited this page Nov 11, 2019
·
30 revisions
LiveChat object
- fetches chat data and stores them in buffer with ThreadpoolExecutor
- responds to user inquiries of get().
- invokes callback function with processed chat data.
from pytchat import LiveChat
chat = LiveChat("gb01h_eT0pw")
| 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 |
| description | return value |
|---|---|
| Get processed chat data from buffer. | processed chat data |
| description | return value |
|---|---|
| Check if livechat stream is alive. | bool |
| description | return value |
|---|---|
| Terminate fetching livechat. | - |