def __save_page(self, data, url, outputdir):
        '''
        save the page content with the specific url to the local path.
        '''
        if(not os.path.exists(outputdir)):
            os.makedirs(outputdir)
        filename = self.__validate_name(url)
        f = open(outputdir + os.sep + filename, 'w')
        f.writelines(data)
        f.close()