网页抓取时如何处理HTTP 410?

问题描述 投票:0回答:1

例如,我可以通过浏览器访问网站:

https://waset.org/conferences-in-february-2020-in-london

......但是,如果我尝试通过Web抓取该网站(我使用的是php simplehtmldom),则会收到HTTP错误410(这意味着该页面已消失,但是可以通过浏览器看到它) 。

[其他网站(来自同一个家族,例如https://waset.org/conferences-in-february-2021-in-london),我可以很好地抓取。

有人知道为什么我得到410时,网页在那里,以及我能做什么。

php http web-scraping
1个回答
0
投票

该网站也许试图阻止报废,但您甚至可以对其进行爬网。

Chrome也向我发送了410错误代码:

enter image description here

继续处理您的内容,就像是200代码一样。

© www.soinside.com 2019 - 2024. All rights reserved.