闲来无事,扒一扒那些美女们的照片
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)
是不是好无聊哈
本文出自 “IT--小哥” 博客,请务必保留此出处http://402753795.blog.51cto.com/10788998/1795012
原文地址:http://402753795.blog.51cto.com/10788998/1795012