带宽限制”urllib.request.urlopen“不是”urllib.request.urlretrieve"

2024-06-28 11:10:40 发布

您现在位置:Python中文网/ 问答频道 /正文

怎么做?在

例如,我想限制urllib.request.urlopen下载速度为10KB/s或文件上传速度为10KB/s

我已经读过关于带宽限制的所有线程,但还没有答案,所有这些都是关于urllib.request.urlretrieve。在

关于urlopen和urlretrieve:https://docs.python.org/3.4/library/urllib.request.html

回答urllib.request.urlretrieve:Throttling with urllib2Python URLRetrieve Limit Rate and Resume Partial Download


Tags: 文件答案httpsorgdocsrequesthtmlwith