Use urlparse, not regex to check url

As in title. Will remove old issue.