The urlparser module is used to split an url into 6
fields, acording to the pertinent spec.
The fields are:
- scheme
- net location
- path
- params
- query
- frag id
The netloc of http://www.google.es/index.html is:
"www.google.es" and the path is "/index.html", ok?
But if you try this:
>>> urlparse("www.google.es")
the answer is:
('', '', 'www.google.es', '', '', '')
instead of
('', 'www.google.es', '', '', '', '')
On the other hand, if you try this:
>>> urlparse("http://www.google.es")
the answer is:
('http', 'www.google.es', '', '', '', '')
which is correct.
The pytho header is: Python 2.4.4c0 (#2, Jul 30 2006,
15:43:58)
[GCC 4.1.2 20060715 (prerelease) (Debian 4.1.1-9)] on
linux2
and I downloaded the latest version of that lib
(urlparse.py, at 2006 08 30)
Thats all. Thanks.
|