Python获取HTTP请求的状态码(200,404等),不访问整个页面源码,那样太浪费资源:
输入:segmentfault.com 输出:200
输入:segmentfault.com/nonexistant 输出:404
Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
温故而知新,可以为师矣。博客:www.ouyangke.com