如何在 Python 中加速 mp4 文件的流下载?

问题描述

我有一些代码可以下载一个非常大的 .mp4 文件并写入内容,但这样做需要很长时间。如何使用 Python 加快速度?代码如下:

myfile = requests.get(stepAssetURL,stream=True,auth=HTTPBasicAuth(UserID,UserPassword))

destPath = path + assetFileName

with open(destPath,'wb') as d:
   for chunk in myfile.iter_content(chunk_size=None):
        if chunk:
            d.write(chunk)

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)