python – 我应该使用哪一个:urlparse或urlsplit?

我应该使用哪个URL parsing function pair,为什么?

> urlparseurlunparse,或
> urlspliturlunsplit

直接从the docs you linked yourself

urllib.parse.urlsplit(urlstring, scheme='', allow_fragments=True)
This is similar to urlparse(), but does not split the params from the URL. This should generally be used instead of urlparse() if the more recent URL syntax allowing parameters to be applied to each segment of the path portion of the URL (see RFC 2396) is wanted.

翻译自:https://stackoverflow.com/questions/5472160/which-should-i-be-using-urlparse-or-urlsplit

转载注明原文:python – 我应该使用哪一个:urlparse或urlsplit?