update url parsing code from damus
