Use `shlex_quote` from six
Use `shlex_quote`, `urlparse` from six. Double to single quotes