Created
June 10, 2023 10:54
-
-
Save lmmsoft/72c4d2376288f987f21210b53b9074c8 to your computer and use it in GitHub Desktop.
把百度云 .livp 格式的备份照片,解压成 jpg 和 mov 格式
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import zipfile | |
def unzip_files(dir_path): | |
"""解压指定目录下的所有 .livp 文件""" | |
files = os.listdir(dir_path) | |
for file_name in files: | |
if file_name.endswith('.livp'): | |
file_path = os.path.join(dir_path, file_name) | |
zip_file = zipfile.ZipFile(file_path) | |
zip_file.extractall(dir_path) | |
zip_file.close() | |
if __name__ == '__main__': | |
dir_path = input('请输入文件目录:') | |
unzip_files(dir_path) | |
print('所有 .lvip 文件解压完成!') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment