/ Published in: Python
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
def get_text(node_list): text = [] for node in node_list: if node.nodeType == node.TEXT_NODE: text.append(node.data) return "".join(text).strip()