如何仅选择容器内的文本,而不获取子元素的文本?例如,如何选择下面HTML中的文本
Toshiba Satellite Pro C850-1GR Satellite Pro, 1.8 GHz
我的尝试
short_description=soup.find('div',{'class':'info-item description product-short-desc c_both'}).text
print short_description
HTML
<div id="product-short-summary-wrap">
<b class="tip-anchor tip-anchor-wrap">Short summary description Toshiba Satellite Pro C850-1GR</b>ev
:
<br/>
<div class="tooltip-text">This short summary of the data-sheet.</div>
Toshiba Satellite Pro C850-1GR Satellite Pro, 1.8 GHz
</div>