import urllib.request #python3中用urllib.request代替urllib2 import re response = urllib.request.urlopen("http://jandan.net/ooxx") html=response.read().decode('utf-8') #decode:解码,转换成Unicode编码 p=r'<img src="(.+\.jpg)"' imglist=re.findall(p,html) for each in imglist: print(each) filename=each.split('/')[-1] urllib.request.urlretrieve(each,filename,None)
基于python的煎蛋网静态页面妹子图爬取
最新推荐文章于 2020-11-28 14:57:53 发布