[python] What’s the best way to get an HTTP response code from a URL?