Chat messages are parsed into JSON objects (dictionaries). Each item contains metadata about the message, the author, and timing information.
Key fields include:
message_id: Unique identifier for the message.message: The actual text content.message_type: The type of message (e.g., text_message).timestamp: The message timestamp.time_in_seconds: Time in seconds.time_text: Formatted time string (e.g., 20:34).author: An object containing id, name, images, and badges.
Example structure:
{
"message_id": "xxxxxxxxxx",
"message": "actual message goes here",
"message_type": "text_message",
"timestamp": 1613761152565924,
"time_in_seconds": 1234.56,
"time_text": "20:34",
"author": {
"id": "UCxxxxxxxxxxxxxxxxxxxxxxx",
"name": "username_of_sender",
"images": [...],
"badges": [...]
}
}
{
"message_id": "xxxxxxxxxx",
"message": "actual message goes here",
"message_type": "text_message",
"timestamp": 1613761152565924,
"time_in_seconds": 1234.56,
"time_text": "20:34",
"author": {
"id": "UCxxxxxxxxxxxxxxxxxxxxxxx",
"name": "username_of_sender",
"images": [...],
"badges": [...]
}
}