【发布时间】:2021-11-03 02:37:58
【问题描述】:
def progress_Check(stream = None, chunk = None, file_handle = None, remaining = None):
global file_size
#Gets the percentage of the file that has been downloaded.
percent = (100*(file_size-remaining))/file_size
print("{:00.0f}% downloaded".format(percent))
调用上述函数返回下载百分比时
yt = YouTube(link,on_progress_callback=progress_Check)
但我得到一个错误,比如不能减去整数和无,那么函数参数是什么/如何获取它们?
有什么想法吗??
【问题讨论】: