1.什么是爬虫
请求网站并提取数据的自动化程序
2.爬虫的基本流程

3.Resquest & Response

3.1Request
3.1.1GET请求
get请求中,提交的信息包含在网址中,无请求体

3.1.2POST请求
以表单的形式提交信息,相关信息不会在网址中体现出来,有请求体(form data)
3.2Response

4.能抓取什么样的数据

5.解析方式
5.1直接处理:简单处理一下格式等
5.2Json解析:解析Ajax的请求
。。。

6.抓取的数据和浏览器(审查元素)显示的不同?
网页经过了JavaScript渲染
7.如何解决JS渲染的问题
7.1分析Ajax请求:返回的是Json格式
7.2selenium/WebDriver:模拟浏览器(自动化测试)
。。。

8如何保存数据
8.1文本
8.2关系型数据库:有固定的格式
8.3非关系型数据库:无固定的格式

网友评论