URL parser helper function