摘要: kv = {‘user-agent’:‘Mozilla/5.0’} 代表通用浏览器 kv = {'wd':'Python'} 代表搜索内容 params=kv https://www.baidu.com/s?wd + 关键字// 百度关键词接口 爬取图片 import requests import 阅读全文
posted @ 2020-09-09 23:38 _年少无知 阅读(101) 评论(0) 推荐(0)
摘要: 爬虫的尺寸 网络爬虫的限制: 通过判断user-agent进行审查限制 发布Robots协议 Robots协议: 网络爬虫排除标准。形式:在网站根目录创建。有user-agent和Disallow 阅读全文
posted @ 2020-09-09 23:05 _年少无知 阅读(114) 评论(0) 推荐(0)
摘要: 在IDLE中输入以下,确认request >>> import requests>>> r = requests.get("http://www.baidu.com")>>> r.status_code200 //表示访问成功************************************* 阅读全文
posted @ 2020-09-09 21:25 _年少无知 阅读(192) 评论(0) 推荐(0)