httpx包的bug…
改源码的这个文件lib/python3.9/site-packages/httpx/_urlparse.py:149行左右:
def urlparse(url: str = "", **kwargs: typing.Optional[str]) -> ParseResult:
url = url.replace("::", ":")
# Initial basic checks on allowable URLs.
# ---------------------------------------
# Hard limit the maximum allowable URL length.
if len(url) > MAX_URL_LENGTH:
raise InvalidURL("URL too long")
加了一行==url = url.replace(“::”, “:”)==就行了