The HTTP clients provided by many libraries (httplib in the Standard Library, asynchttp, Twisted) do not deal with absolute URLs but instead with the three component parts of host, port, and request URL. However these are not the parts returned by either urlparse.urlsplit or urlparse.urlparse. I therefore suggest it might be useful to have in the Standard Library a function that splits an absolute URL into host, port, and request URL. So for the following URL: "http://www.python.org/cgi-bin/moinmoin/FrontPage?action=edit" the function would return ("www.python.org", 80, "/cgi-bin/moinmoin/FrontPage?action=edit") An optional parameter could specify which port to use as default. Hamish Lawson
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4