python爬取王者荣耀人物皮肤高清图片

it2023-09-18  75

import requests import json resp = requests.get('https://pvp.qq.com/web201605/js/herolist.json') # print(resp.text) hero_array = json.loads(resp.text) for hero in hero_array: name = hero['cname'] id = hero['ename'] skin_url = 'https://game.gtimg.cn/images/yxzj/img201606/skin/hero-info/'+str(id)+'/'+str(id)+'-bigskin-1.jpg' img = requests.get(skin_url).content with open('我的屏保/'+name+"2.jpg", 'wb') as f: f.write(img)
最新回复(0)