【发布时间】:2017-06-08 01:48:19
【问题描述】:
我正在使用 BeautifulSoup 来抓取网页。
我正在尝试获取没有 id 或类但它前面有一个具有不同类的跨度的 p 标记的内容:
<p> uninteresting content here...</p>
<span class="description">DESCRIPTION:</span>
<p>Hi ! This is the content which I am interested in.</p>
<p> another uninteresting content to be discarded.</p>
那么,我如何根据之前的 span class="description" 获取该 p 内容?
提前致谢,
【问题讨论】:
标签: python beautifulsoup