python下载图片的代码块
import urllib.request
imgurl="https://ss3.baidu.com/9fo3dSag_xI4khGko9WTAnF6hhy/image/h%3D300/sign=84337ed7c7134954611eee64664f92dd/ac6eddc451da81cbe337459b5e66d01608243197.jpg"
response = urllib.request.urlopen(imgurl)
cat_img = response.read()
with open('cat_500_600.jpg','wb') as f:
f.write(cat_img)
耐得住寂寞,才能登得顶
Gitee码云:https://gitee.com/lyc96/projects