ncdlww 发表于 2022-9-1 21:16

爬取英雄联盟全皮肤

import os
import requests as sgbyg

def _(j):
    for i in j:
      yield i["name"], i["mainImg"]

path = os.path.expanduser("~").replace('\\', '/') + '/Desktop/英雄联盟全皮肤'
if not os.path.exists(path): os.makedirs(path)
for sg in sgbyg.get("https://game.gtimg.cn/images/lol/act/img/js/heroList/hero_list.js").json()["hero"]:
    for __ in }.js').json()["skins"])]:
      print("正在下载:", __, __)
      with open(f"{path}/{__}.jpg", "wb") as f:
            f.write(sgbyg.get(__).content)



已打包 成品下载地址回复可见--->    **** Hidden Message *****

hys001 发表于 2022-9-1 21:16

多谢楼主分享

若有生 发表于 2022-9-1 21:24

谢谢大佬

若雨鱼 发表于 2022-9-1 21:47

谢谢大牛

唯爱丶雪 发表于 2022-9-1 21:48

6666666666

woaina229 发表于 2022-9-1 21:59

先收藏了,万一用到呢

acaidipan 发表于 2022-9-1 22:01

感谢楼主分享!大牛有你更精彩!

呵呵哒哒 发表于 2022-9-1 22:23

谢谢分享!

不搭落俗笑忘书 发表于 2022-9-1 22:24

纯顶贴!本回复没有任何技术含量。

chihe8 发表于 2022-9-1 22:24

谢谢@Thanks!
页: [1] 2 3 4 5
查看完整版本: 爬取英雄联盟全皮肤