#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 def getHtml(url): req = urllib2.Request(url) res = urllib2.urlopen(req) html = res.read() return html