# coding=utf-8
from __future__ import absolute_import, unicode_literals, print_function

import urlparse


def get_url_info(url):
    """根据url获取相关信息。"""

    up = urlparse.urlparse(url)

    return {
        "scheme": up.scheme,
        "host": up.netloc,
        "path": up.path,
        "query": urlparse.parse_qsl(up.query)
    }
