闲来无事,扒一扒那些美女们的照片
import urllib.request url = "http://img1.mm131.com/pic/2537/" for i in range(1,50,1): page_url = url + str(i) + '.jpg' response = urllib.request.urlopen(page_url) cat_img = response.read() filename = page_url.split('/')[-1] with open(filename,'wb') as f: f.write(cat_img)
是不是好无聊哈