下载一只猫的图片(其中500和600可以替换成其他的数字)

import urllib.request
reponse = urllib.request.urlopen('http://placekitten.com/g/500/600')
cat_img = reponse.read()
with open('E:\图片\cat_500_600.jpg','wb') as f:
f.write(cat_img)
print('success')

posted on 2018-11-08 08:45  天源  阅读(296)  评论(0编辑  收藏  举报

导航