decode_bilibili_uwp_download_video icon indicating copy to clipboard operation
decode_bilibili_uwp_download_video copied to clipboard

感谢up,我是下载的一整段视频,但是文件的名字都是数字,我更改了一点,如果需要自取

Open wyf1996 opened this issue 1 year ago • 0 comments

def changeFile(path, all_files): file_list = os.listdir(path) for file in file_list: cur_path = os.path.join(path, file) if os.path.isdir(cur_path): changeFile(cur_path, all_files) else: if os.path.splitext(file)[-1] == '.info': file = open(cur_path, "rb") fileJson = json.load(file) mp4 = fileJson['Aid']+'_'+os.path.basename(path)+'_0.mp4' mp4Path = os.path.join(path, mp4) pfile = open(mp4Path, 'rb') pfile.seek(3) byte = pfile.read() pfile.close() outName = '(' + \ os.path.basename(path)+')' + fileJson['PartName']+'.mp4' pfile = open(os.path.join(outpath, outName), 'wb') pfile.seek(0) pfile.write(byte) pfile.close()

wyf1996 avatar Jun 04 '23 14:06 wyf1996