use Python for King glory wallpaper Download
python version: 3.5+
related modules: Urllib module, JSON module, OS module
Reference Program:
Import urllib.request
Import JSON
import os
response = Urllib.request.urlopen ("http://pvp.qq.com/ Web201605/js/herolist.json ")
Hero_json = Json.loads (Response.read ())
hero_num = Len (hero_json)
save_ dir = ' I:\heroskin\\ '
if not os.path.exists (save_dir):
os.mkdir (Save_dir) to
I in range (hero_num):
Skin_names = hero_json[i][' skin_name '].split (' | ')
For CNT in range (len (skin_names)):
save_file_name = Save_dir + str (hero_json[i][' ename ']) + '-' +hero_json[i][' CNAME ']+ '-' +skin_names[cnt] + '. jpg '
skin_url = ' http://game.gtimg.cn/images/yxzj/img201606/skin/hero-info/' + Str (hero_json[i][' ename ']) + '/' +str (hero_json[i][' ename ']) + '-bigskin-' + str (cnt+1) + '. jpg '
if not Os.path.exists (save_file_name):
urllib.request.urlretrieve (Skin_url, Save_file_name)
Reference program:
Link: https://pan.baidu.com/s/1vqtKRpthXLeg4QoG_c9Gow Password: j86g