希望有人能在这里帮我。试图只从下面的截图中提取文本。当我使用:
document.getElementsByClassName("heading-2 color-blue")[0].textContent
我得到:“SEALYON游艇待售”(我只需要"SEALYON")
谢谢!

发布于 2022-03-29 18:23:49
这做了以下工作:
document.getElementsByClassName("heading-2 color-blue")[0].childNodes[0].innerText
https://stackoverflow.com/questions/71665892
复制相似问题