我正在使用 Scrapy,我正在尝试抓取这样的内容:
<html>
<div class='hello'>
some elements
.
.
.
</div>
<div class='hi there'>
<div>
<h3> title </h3>
<h4> another title </h4>
<p> some text ..... </p>
"some text without any tag"
<div class='article'>
some elements
.
.
</div>
<div class='article'>
some elements
.
.
</div>
<div class='article'>
some elements
.
.
</div>
</div>
</div>
</html>
如果我想从类名“hi There”的 div 下以及类名“article”的 div 之前的所有元素中提取文本,是否有任何可能的方法使用 XPath 或 CSS 选择器进行枯萎?
倚天杖
相关分类