python urllib2 下载闪存头像
test code:
#coding=utf-8 import os,re,time import urllib import urllib2 def getNewDir(dir_name): curr_dir = os.getcwd() curr_dir = curr_dir.replace('\\','/') file_dir = curr_dir + '/' + dir_name + '/' return file_dir