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

DefaultProcessor

taizan-hokuto edited this page Jan 2, 2020 · 26 revisions

DefaultProcessor object

  • is a default chat processor of pytchat.

Usage

chat = LiveChat("xxxxxxxxxxx") #video_id

while True:
    data = chat.get() #get processed data.
    items = data.items()
    for c in items:
        print(c.author.name, c.message)
        data.tick()

items()

description return value
Get list of chat items. List of chat items

tick()

description return value
wait for next chat. -

[await] tick_async()

description return value
wait for next chat on asyncio context. -

#Members of Chat Item

name type remarks
type str "superChat","textMessage","superSticker","newSponsor"
id str
message str Emojis are represented by ":(shortcut text):"
message str List of messages and emojis: emojis are represented by URL for image.
timestamp int unixtime milliseconds
datetime str e.g. "2019-10-10 12:34:56"
elapsedTime str elapsed time. (e.g. "1:02:27") *Replay Only.
amountValue float ex. 1,234.0
amountString str e.g. "$ 1,234"
currency str ISO 4217 currency codes (e.g. "USD")
bgColor int RGB Int
author object see below

Members of author object.

name type remarks
name str
channelId str *chatter's channel ID.
channelUrl str
imageUrl str
badgeUrl str
isVerified bool
isChatOwner bool
isChatSponsor bool
isChatModerator bool
Clone this wiki locally