'

你没有看错 就是爬取LOL官网全英雄皮肤【的图片】
嘿嘿嘿,以为可以有全英雄,全皮肤了?

爬虫实战
用到的模块:requests、re、json
安装:pip isntall requests
首先让咱们来看一下这个网站


如何找到图片的地址

当你找到图片地址的时候不难发现规律
big81001.jpg 81005.jpg 很明显 81是英雄的ID地址 001是皮肤顺序
整体流程思路
获取JS源代码 获取英雄的ID拼接URL地址获取下载图片的地址下载图片
Python代码

整个代码也就60行不到,就搞定了!
网友评论