Message16379
| Author |
sjones |
| Recipients |
| Date |
2003年06月14日.02:39:05 |
| SpamBayes Score |
| Marked as misclassified |
| Message-id |
| In-reply-to |
| Content |
Logged In: YES
user_id=589306
Sorry, previous comment got cut off...
urlparse.urlparse takes a url of the format:
<scheme>://<netloc>/<path>;<params>?<query>#<fragment>
And returns a 6-tuple of the format:
(scheme, netloc, path, params, query, fragment).
An example from the library refrence takes:
urlparse('http://www.cwi.nl:80/%7Eguido/Python.html')
And produces:
('http', 'www.cwi.nl:80', '/%7Eguido/Python.html', '',
'', '')
--------------------------------
Note that there isn't a field for the port number in the
6-tuple. Instead, it is included in the netloc. Urlparse
should handle your example as:
>>> urlparse.urlparse('1.2.3.4:80','http')
('http', '1.2.3.4:80', '', '', '', '')
Instead, it gives the incorrect output as you indicated.
|
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2007年08月23日 14:13:54 | admin | link | issue754016 messages |
| 2007年08月23日 14:13:54 | admin | create |
|