urlparse(url, scheme='', allow_fragments=True)
<scheme>://<netloc>/<path>;<params>?<query>#<fragment>
返回一个6-tuple: (scheme, netloc, path, params, query, fragment).
导入
python2
from urlparse import urlparse
python3
from urllib.parse import urlparse