我正在用刮擦来刮东西。 我尝试了很多如何刮这个网站有2列。 网站代码:
<div>
<div class="something">
<article>
<h2>
<a href="somelinks">
<article>
<h2>
<a href="somelinks">
<article>
<h2>
<a href="somelinks">
<div class="something">
<article>
<h2>
<a href="somelinks">
<article>
<h2>
<a href="somelinks">
<article>
<h2>
<a href="somelinks">
</div>
我的代码:
for href in response.xpath("//div[@class='something']/article/h2/a/@href"):
url = response.urljoin(href.extract())
yield scrapy.Request(url, callback=self.parse_dir_contents)
我的密码错了吗?我好像跑不了。呼吸管自动关闭。你知道吗
您可以使用下面的spider从http://www.bebizzy.com/the-bebizzy-blog/中删除所有博客文章
蜘蛛收到的日志:
只需在
#TODO:
注释后添加项填充逻辑相关问题 更多 >
编程相关推荐