def parse_url(url, encoding=None):
    return url if isinstance(url, urlparse.ParseResult) else \
        urlparse.urlparse(unicode_to_str(url, encoding))
Return urlparsed url from the given argument (which could be an already
dataset/ETHPy150Open scrapinghub/frontera/frontera/utils/url.py/parse_url