, 下载地址是%s' % (count, len(self.ts_parts), ts_url))
count += 1
def auto_down(self, url, filename..., headers): # 下载失败后,自调用从新下载
try:
opener = urllib.request.build_opener() # 创建opener...self.auto_down(url, filename, headers)
def auto_keydown(self, url, filename, headers, key): # 下载失败后...files = self.down_path + '/' + 'tsm{:0>5}.ts'.format(i)
if os.path.exists(files): # 判断文件是已下载...if not sz:
os.remove(files) # 删除空文件
print("删除空字节视频文件