Python Download League of Legends Skin Pictures

Source: Internet
Author: User

Import Urllib.request
Import JSON
Import OS



Save_dir ="D:\ League of Legends Skin"
If not os.path.exists (Save_dir):
Os.mkdir (Save_dir)

For IInchRange99,143):
For CNTInchRange0,9):
#save_file_name = "D:\ League of Legends skin \ \" +str (hero_json[i][' ename ') + '-' + hero_json[i][' cname '] + '-' + skin_name[cnt] + '. jpg '
Save_file_name ="D:\ League of Legends Skin\\" +STR (i) +' 00 ' +STR (CNT) +'. jpg '
#http://ossweb-img.qq.com/images/lol/web201310/skin/big143000.jpg
Skin_url =' Http://ossweb-img.qq.com/images/lol/web201310/skin/big ' +STR (i) +str (CNT) +". jpg '
print ( "Downloading%d pictures ..."% i)
print ( Skin_url)
if not Os.path.exists (save_file_name):
try:
Urllib.request.urlretrieve (skin_url,save_file_name)
except:
continue #发生异常仍继续

print ( "Picture Download complete ...)

Python download League of Legends Skin Pictures

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.