Scrapy学习篇(十三)之scrapy-selenum

之前我们学习的都是抓取静态页面数据,但是某些页面是js动态加载出来的,直接请求无法拿到网页的数据,只能得到js源码,无法解析出网页数据,此时,需要借助于自动化测试工具-selenum,它可以完全模仿人的行为,直接输出网页源代码,无需关心js代码加载问题。

以scrapy+selelum为例子,抓取京东商城商品数为例,详细代码见:https://gitee.com/liangxinbin/Scrpay/tree/master/scrapyseleniumtest/scrapyseleniumtest

猜你喜欢

转载自www.cnblogs.com/lxbmaomao/p/10363409.html