diff --git a/README.md b/README.md
index bc04b23..2ae6c59 100644
--- a/README.md
+++ b/README.md
@@ -137,6 +137,11 @@ Structure of each item which got from items() function.
str |
emojis are represented by ":(shortcut text):" |
+
+ | messageEx |
+ str |
+ list of message texts and emoji URLs. |
+
| timestamp |
int |
@@ -149,7 +154,7 @@ Structure of each item which got from items() function.
timestampText |
str |
- elapsed time. (ex. "1:02:27") |
+ elapsed time. (ex. "1:02:27") *Replay Only. |
| amountValue |
@@ -193,7 +198,7 @@ Structure of author object.
| channelId |
str |
- |
+ *chatter's channel ID. NOT broadcasting video's channel ID. |
| channelUrl |
diff --git a/pytchat/__init__.py b/pytchat/__init__.py
index 797adcf..706caf6 100644
--- a/pytchat/__init__.py
+++ b/pytchat/__init__.py
@@ -2,7 +2,7 @@
pytchat is a python library for fetching youtube live chat without using yt api, Selenium, or BeautifulSoup.
"""
__copyright__ = 'Copyright (C) 2019 taizan-hokuto'
-__version__ = '0.0.3.1'
+__version__ = '0.0.3.3'
__license__ = 'MIT'
__author__ = 'taizan-hokuto'
__author_email__ = '55448286+taizan-hokuto@users.noreply.github.com'
diff --git a/pytchat/parser/replay.py b/pytchat/parser/replay.py
index bec801d..c120fe3 100644
--- a/pytchat/parser/replay.py
+++ b/pytchat/parser/replay.py
@@ -36,9 +36,7 @@ class Parser:
raise NoContentsException('チャットデータを取得できませんでした。')
interval = self.get_interval(actions)
metadata.setdefault("timeoutMs",interval)
- chatdata = []
- for action in actions:
- chatdata.append(action["replayChatItemAction"]["actions"][0])
+ chatdata = [action["replayChatItemAction"]["actions"][0] for action in actions]
return metadata, chatdata
def get_interval(self, actions: list):
diff --git a/pytchat/processors/default/renderer/base.py b/pytchat/processors/default/renderer/base.py
index 507a949..61e7d4c 100644
--- a/pytchat/processors/default/renderer/base.py
+++ b/pytchat/processors/default/renderer/base.py
@@ -20,6 +20,7 @@ class BaseRenderer:
self.timestampText = ""
self.datetime = self.get_datetime(timestampUsec)
self.message = self.get_message(self.renderer)
+ self.messageEx = self.get_message_ex(self.renderer)
self.id = self.renderer.get('id')
self.amountValue= 0.0
self.amountString = ""
@@ -54,6 +55,19 @@ class BaseRenderer:
message += r.get('text','')
return message
+ def get_message_ex(self,renderer):
+ message = []
+ if renderer.get("message"):
+ runs=renderer["message"].get("runs")
+ if runs:
+ for r in runs:
+ if r:
+ if r.get('emoji'):
+ message.append(r['emoji']['image']['thumbnails'][1].get('url'))
+ else:
+ message.append(r.get('text',''))
+ return message
+
def get_badges(self,renderer):
isVerified = False
isChatOwner = False