php - snoopy crawler reports error 405 Not Allowed
高洛峰
高洛峰 2017-05-16 12:58:40
0
2
614

Code

$httpClass = new Snoopy();
$httpClass->fetch('https://v.qq.com/');
$url = $httpClass->results;
print_r($url);die();

Crawling https://www.baidu.com/ keeps reporting 405 errors

Crawling https://v.qq.com/ is running normally

Looking for an answer, I’ve been working on it all afternoon and still can’t solve it

高洛峰
高洛峰

拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...

reply all(2)
淡淡烟草味

Baidu probably has a crawler-like setting. You need to disguise it and define a UA or something like that
Reference: http://www.4wei.cn/archives/396

Peter_Zhu

This is not a Snoopy-type problem. It's because you don't know much about crawlers. Since there are crawlers, of course there will be anti-crawler technology. The simplest is based on the browser identifier or the referer in the request header, etc. Big websites like Baidu and Tencent will not want us to crawl data, so they must have taken many preventive measures. Therefore, it is recommended to understand the knowledge of crawlers before crawling data.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template