Updated version, Added support for URL containing Space in their name.