On 22 Okt, 03:53, Tim Chase <[EMAIL PROTECTED]> wrote:
>
> This seems to be intentional, rather than a bug. In my
> python2.4/urlparse.py file, there's a uses_netloc list which
> clearly does not have 'mailto' in it. I can't give an
> explanation/justification for it, but it seems to me (IMHO) th
>> there are some goodies in urllib for doing some of this splitting.
>> Example code at the bottom of my reply (though it seems to choke on
>> certain protocols such as "mailto:"; and "ssh:" because urlparse doesn't
>> return the netloc properly)
>
> It doesn't? That's... bad. But for my applica
On Sun, 21 Oct 2007 14:55:01 -0500, Tim Chase wrote:
> there are some goodies in urllib for doing some of this splitting.
> Example code at the bottom of my reply (though it seems to choke on
> certain protocols such as "mailto:"; and "ssh:" because urlparse doesn't
> return the netloc properly)
> URL = 'http://steve:[EMAIL PROTECTED]:82/dir" + \
> 'ectory/file.html;params?query#fragment'
>
> If I split the URL, I would like to get the following components:
>
> scheme = 'http'
> netloc = 'steve:[EMAIL PROTECTED]:82'
> username = 'steve'
> password = 'secret'
> hostname = 'www.domain.
I'm trying to split a URL into components. For example:
URL = 'http://steve:[EMAIL PROTECTED]:82/dir" + \
'ectory/file.html;params?query#fragment'
(joining the strings above with plus has no significance, it's just to
avoid word-wrapping)
If I split the URL, I would like to get the followi