0
有了元素,你如何用BeautifulSoup将它清空?如何用Python中的BeautifulSoup清除元素的内容(元素和||文本)?
例如,我有一个div(如下图所示),我需要做些什么来清除它的内容?
mydiv = soup.find("div", { "id" : "TopMostInfoBlockContent" })
mydiv.?? #Something here to clear the div contents?
完美,谢谢。应该猜到:P – James