一、源代码
第一步:导入库

第二步:写主函数,首先构建了一个for循环,爬取第二页到第100页数据

第三步:数据展示

爬取用了7分钟,可能因为速度比较慢(用了time.sleep),导致重复数据较多

二、存在问题
1.爬取的数据较乱,不知道如何处理,便于分析
2.每次爬的数据次序不同,不知道什么原因
3.之前因为每次打开运行结果都不同,而且没有报错,不知道哪里有问题,后卸载重装才能出结果
一、源代码
第一步:导入库
第二步:写主函数,首先构建了一个for循环,爬取第二页到第100页数据
第三步:数据展示
爬取用了7分钟,可能因为速度比较慢(用了time.sleep),导致重复数据较多
二、存在问题
1.爬取的数据较乱,不知道如何处理,便于分析
2.每次爬的数据次序不同,不知道什么原因
3.之前因为每次打开运行结果都不同,而且没有报错,不知道哪里有问题,后卸载重装才能出结果
本文标题:第一次爬虫练习:房天下二手房
本文链接:https://www.haomeiwen.com/subject/jqvzittx.html
网友评论