import


import









‘user-agent’
‘the Mozilla / 5.0 (the device; CPU OS 11_0 like Mac OS X) AppleWebKit/604.1.34 (KHTML, like Gecko) Version/11.0 Mobile/15A5341f Safari/604.1’




# so the hero URL

‘https://lol.qq.com/biz/hero/champion.js’







len
‘if(! LOLherojs)var LOLherojs={}; LOLherojs.champion=’
1





‘data’


for
in


# Hero’s name

print
‘[Hero’s Name]’

[

‘title’

] +

The ‘-‘

+item[

‘name’

])



# Mage – Mage

# Assassin – Assassin

# Fighter – Fighter

# Tank – Tank

# Support – Support

# Marksman – striker

dat = {

‘Mage’

:

‘master’

.

‘Assassin’

:

‘the assassin’

.

‘Fighter’

:

‘soldiers’

.

‘Tank’

:

‘the tanks’

.

‘Support’

:

‘secondary’

.

‘Marksman’

:

‘striker’

}

tags=

‘[Classification of heroes]’

for

a

in

item[

‘tags’

] :

tags+=(dat[a]+

‘ ‘

)

print

(tags)



# hero image address

print

(

‘[hero image address]’

+

‘ https://ossweb-img.qq.com/images/lol/img/champion/’

+item[

‘image’

] [

‘full’

])

Hero details page address

# print (‘ details page address [hero] ‘+’ {} https://lol.qq.com/biz/hero/. Js’. The format (item[‘id’]))



# Get hero skin

img_data= requests.get(

url

=

‘https://lol.qq.com/biz/hero/{}.js’

.format(item[

‘id’

]),

headers

=headers)

imgs = img_data.content.decode()

img = json.loads(imgs[img_data.content.decode().find(

‘data’

) –

2

: –

1

])



for

i

in

img[

‘data’

] [

‘skins’

] :

if

i[

‘name’

] = =

‘default’

:

i[

‘name’

] =

‘default’

print

(

‘[] {} skin’

.format(i[

‘name’

]) +

‘ http://ossweb-img.qq.com/images/lol/web201310/skin/big{}.jpg’

.format(i[

‘id’

]))



# Hero skills

for

i

in

img[

‘data’

] [

‘spells’

] :



print

(

‘[Skill image] ‘

+

‘https://ossweb-img.qq.com/images/lol/img/spell/’

+i[

‘image’

] [

‘full’

])

print

(

‘[Skill name] ‘

+i[

‘name’

])

# print(‘[description] ‘+ I [‘description’])

print

(

‘[Skill Description] ‘

+i[

‘tooltip’

])

try

:

print

(

‘[Skill Damage] ‘

+i[

‘leveltip’

] [

‘effect’

] [

0

])



print

(

‘[Skill cost] ‘

+i[

‘leveltip’

] [

‘effect’

] [

1

])

except

:

pass

# The hero’s passive ability

print

(

‘[passive image] ‘

+

‘https://ossweb-img.qq.com/images/lol/img/passive/’

+img[

‘data’

] [

‘passive’

] [

‘description’

])

print

(

‘[passive name] ‘

+img[

‘data’

] [

‘passive’

] [

‘name’

])

print

(

‘[passive description] ‘

+img[

‘data’

] [

‘passive’

] [

‘description’

])

print

(a)

print

(

‘[Back Story] ‘

+img[

‘data’

] [

‘lore’

])

print

(a)

print

(

‘[Use tips – When you use a Nine-tailed Fox] ‘

+img[

‘data’

] [

‘lore’

])

print

(a)

print

(

‘[Use skill – Enemies use nine-tailed Fox] ‘

+

str

(img[

‘data’

] [

‘enemytips’

]))





# Recommended equipment

for

i

in

img[

‘data’

] [

‘blocks’

] [

0

] [

‘recommended’

] :

for

ii

in

i[

‘items’

] :

print

(

‘[Summoner canyon] ‘

+

‘https://ossweb-img.qq.com/images/lol/img/item/’

+ ii[

‘id’

] +

‘.png’

)



for

ii

in

img[

‘data’

] [

‘blocks’

] [

0

] [

‘recommended’

] :

for

ii

in

i[

‘items’

] :

print

(

‘Polar Brawl’

+

‘https://ossweb-img.qq.com/images/lol/img/item/’

+ ii[

‘id’

] +

‘.png’

)



print

(a)

For more technical information: Gzitcast