当前位置:网站首页>A few lines of code teach you to crawl lol skin pictures
A few lines of code teach you to crawl lol skin pictures
2022-04-23 18:00:00 【Round programmer】
Environmental Science win10+ython3.8
import requests
import re
import json
base_url = 'https://game.gtimg.cn/images/lol/act/img/skin/big'
url = 'https://lol.qq.com/biz/hero/champion.js'
respon = requests.get(url=url).text
data = re.search(r'"ID":(.*?),"NAME":',respon).group(1)
data = json.loads(data)
for id,name in data.items():
for number in range(15):
iamge_url = base_url +id + '%03d'%number + '.jpg'
if requests.get(iamge_url).status_code == 200:
iamge = requests.get(iamge_url).content
with open('lol/%s%d' % (name,number) + '.jpg','wb') as f:
f.write(iamge)
effect
版权声明
本文为[Round programmer]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230545315586.html
边栏推荐
- _ FindText error
- Implementation of object detection case based on SSD
- Crawling mobile game website game details and comments (MQ + multithreading)
- 纳米技术+AI赋能蛋白质组学|珞米生命科技完成近千万美元融资
- ArcGIS table to excel exceeds the upper limit, conversion failed
- C byte array (byte []) and string are converted to each other
- k8s之实现redis一主多从动态扩缩容
- [UDS unified diagnostic service] (Supplement) v. detailed explanation of ECU bootloader development points (2)
- Solving the problem of displaying too many unique values in ArcGIS partition statistics failed
- 极致体验,揭晓抖音背后的音视频技术
猜你喜欢
Error in created hook: "referenceerror:" promise "undefined“
String function in MySQL
Batch export ArcGIS attribute table
2022 judgment questions and answers for operation of refrigeration and air conditioning equipment
2022 Jiangxi energy storage technology exhibition, China Battery exhibition, power battery exhibition and fuel cell Exhibition
Implementation of object detection case based on SSD
re正则表达式
k8s之实现redis一主多从动态扩缩容
Halo 开源项目学习(二):实体类与数据表
positioner
随机推荐
Scikit learn sklearn 0.18 official document Chinese version
C1 notes [task training part 2]
_ FindText error
油猴网站地址
极致体验,揭晓抖音背后的音视频技术
C1小笔记【任务训练篇二】
Svn simple operation command
Element calculation distance and event object
纳米技术+AI赋能蛋白质组学|珞米生命科技完成近千万美元融资
高德地图搜索、拖拽 查询地址
Encapsulate a timestamp to date method on string prototype
Classes and objects
C language implements memcpy, memset, strcpy, strncpy, StrCmp, strncmp and strlen
Read excel, int digital time to time
cartographer_ There is no problem compiling node, but running the bug that hangs directly
Nanotechnology + AI enabled proteomics | Luomi life technology completed nearly ten million US dollars of financing
Anchor location - how to set the distance between the anchor and the top of the page. The anchor is located and offset from the top
[UDS unified diagnostic service] IV. typical diagnostic service (4) - online programming function unit (0x34-0x38)
The ultimate experience, the audio and video technology behind the tiktok
Nat commun | current progress and open challenges of applied deep learning in Bioscience