我有一份资料如下:
<div class="ds-list">
<b>1. </b>
A domesticated carnivorous mammal
<i>(Canis familiaris)</i>
related to the foxes and wolves and raised in a wide variety of breeds.
</div>
我想得到类ds-list
(没有<b>
和<i>
标记)中的所有内容。目前我的代码是doc.cssselect('div.ds-list')
,但所有这些都是<b>
之前的新行。我怎样才能让它做我想做的事?
也许您正在寻找
text_content
方法?以下内容:收益率
相关问题 更多 >
编程相关推荐