Used urlparse to split url instead of plain string parsing