# crawl a image import urllib.request response = urllib.request.urlopen("http://placekitten.com/200/300") #load html with open("C:/Users/Mike1/Desktop/mykitten.jpg","wb") as f: # open a file f.write(response.read()) # write byte
原文:https://www.cnblogs.com/zijidefengge/p/11785256.html