当前位置:网站首页>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
边栏推荐
- Gets the time range of the current week
- Special effects case collection: mouse planet small tail
- .104History
- C language array processing batch data
- 纳米技术+AI赋能蛋白质组学|珞米生命科技完成近千万美元融资
- Add animation to the picture under V-for timing
- 2022 Shanghai safety officer C certificate operation certificate examination question bank and simulation examination
- JS high frequency interview questions
- Clion installation tutorial
- Excel opens large CSV format data
猜你喜欢
Data stream encryption and decryption of C
ArcGIS license error -15 solution
C1 notes [task training chapter I]
cv_ Solution of mismatch between bridge and opencv
In JS, t, = > Analysis of
[appium] write scripts by designing Keyword Driven files
Yolov4 pruning [with code]
Flask项目的部署详解
C language loop structure program
ArcGIS table to excel exceeds the upper limit, conversion failed
随机推荐
SystemVerilog (VI) - variable
20222 return to the workplace
Summary of common server error codes
2022 Shanghai safety officer C certificate operation certificate examination question bank and simulation examination
Element calculation distance and event object
Classes and objects
2022 Jiangxi Photovoltaic Exhibition, China distributed Photovoltaic Exhibition, Nanchang solar energy utilization Exhibition
Welcome to the markdown editor
Romance in C language
Summary of floating point double precision, single precision and half precision knowledge
Go的Gin框架学习
On the problem of V-IF display and hiding
ROS package NMEA_ navsat_ Driver reads GPS and Beidou Positioning Information Notes
Secure credit
I / O multiplexing and its related details
How to install jsonpath package
Fashion classification case based on keras
Nanotechnology + AI enabled proteomics | Luomi life technology completed nearly ten million US dollars of financing
Amount input box, used for recharge and withdrawal
Timestamp to formatted date