MAC系统下用pydev环境找不到下载的图片
# coding:UTF8
import urllib2#导入模块
import re
import os
req = urllib2.urlopen('http://www.imooc.com/course/list')
buf = req.read()
listurl = re.findall(r'http:.+\.jpg',buf)
i=0
for url in listurl:
f = open(str(i)+'.jpg','w')
req = urllib2.urlopen(url)
buf = req.read()
f.write(buf)
i += 1