The urllib
and urllib2
libraries have been cleaned up for Python 3, moving various disparate parts into a clear package hierarchy. The APIs themselves haven't changed all that much. It's mostly a tightening of the naming conventions.
You only need to compare the Python 2 urllib2
documentation with the urllib.request
page for Python 3 (with only exceptions moved to request.error
) to see that the basic functionality has not been updated.
requests
itself remains the better choice for handling your HTTP client needs in Python 3.