您包含在问题中的链接只是执行urllib的read()函数的包装程序,该函数可以为您捕获所有不完整的读取异常。如果您不想实施整个补丁程序,则总是可以在尝试读取链接的地方插入try
/ catch循环。例如:
try: page = urllib2.urlopen(urls).read()except httplib.IncompleteRead, e: page = e.partial
对于python3
try: page = request.urlopen(urls).read()except (http.client.IncompleteRead) as e: page = e.partial



