use urllib.parse and string split instead of regular expression