我已经提取了下面的HTML内容从一个网址使用刮
<div id="data">
<div style="position:absolute">
<h4 class="course">Python</h4>
<h4 class="count">45</h4>
</div>
<h1 style="position:absolute">Available</h1>
<h2 style="position:absolute">Weekend</h1>
<h1 style="position:absolute">Paid Version</h1>
</div>
以及使用xpath
headerResponse = response.xpath('//div[@id="data"]').extract()
我已经将它们加载到headerResponse变量中。现在我想获取值,因为它没有id或类如何提取它们?你知道吗
目前没有回答
相关问题 更多 >
编程相关推荐