From 10f59c120dc0dd392c257dcca2642300c370b4da Mon Sep 17 00:00:00 2001 From: kdxcxs Date: Sun, 1 Nov 2020 13:07:10 +0800 Subject: [PATCH] fix(umooc_simulator): add table into reply consideration --- umooc/umooc_client.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/umooc/umooc_client.py b/umooc/umooc_client.py index 1b29f2f..f32ec6b 100644 --- a/umooc/umooc_client.py +++ b/umooc/umooc_client.py @@ -81,6 +81,9 @@ class TopicPage(object): elif content.name == 'p': contents.append( {'type': 'text', 'content': emoji_re.sub('[emoji]', content.text.replace('\xa0 ', ''))}) + elif content.name == 'table': + # TODO: support tables + contents.append({'type': 'table', 'content': content.__str__()}) else: # pure text contents.append({'type': 'text', 'content': emoji_re.sub('[emoji]', content.string)}) self.replies.append(