sclass WebChatBotMsg { S fullHTML; bool fromUser; S msgHTML, msgText; } static L webBotTester_extractMsgs(S html) { new L out; LLS msgs = findContainerTagWithClass(htmlTok(html), "span", "chat_msg_item"); for (LS tokMsg : msgs) { new WebChatBotMsg msg; msg.fullHTML = trimJoin(tokMsg); LS tokMsg2 = dropFirstTwoAndLastTwo(tokMsg); for (LS srSpan : findContainerTagWithClass(tokMsg2, "span", "sr-only")) setAllToEmptyString(dropFirstAndLast2(srSpan)); msg.fromUser = tagHasClass(tokMsg, "chat_msg_item_user"); msg.msgHTML = trimJoin(tokMsg2); msg.msgText = htmldecode_dropAllTags(msg.msgHTML); out.add(msg); } ret out; }