"Why is my urlparse output not splitting the URL correctly?"
Hey folks!
I’m trying to use urlparse to break down a URL, but it’s not splitting things the way I expected. Like, the netloc is empty or the path is weirdly merged with something else.
Here’s an example:
`urlparse("https://example.com/path?query=123")`
But sometimes it just... doesn’t work? Am I missing something obvious?
Also, does urlparse handle stuff like weird characters or missing schemes? Or do I need to preprocess the URL first?
Thanks in advance!
(PS: Python 3.10, if that matters.)
Hey folks!
I’m trying to use urlparse to break down a URL, but it’s not splitting things the way I expected. Like, the netloc is empty or the path is weirdly merged with something else.
Here’s an example:
`urlparse("https://example.com/path?query=123")`
But sometimes it just... doesn’t work? Am I missing something obvious?
Also, does urlparse handle stuff like weird characters or missing schemes? Or do I need to preprocess the URL first?
Thanks in advance!
(PS: Python 3.10, if that matters.)
