import os
import zipfile
import shutil
path_in='D:\\Desktop\\个人\\账单审计\\微信支付\\' # 要解压的压缩包所在路径
path_out='D:\\Desktop\\个人\\账单审计\\微信支付\\zip\\' # 解压后文件存放的路径
pwd_list=["552301",
"771001",
"519086",
"560709",
"090671",
"686612",
"534704",
"096263",
"641623",
"012746",
"789074",
"501322",
"558837",
"303407",
"887710"] # 密码与文件的顺序和数量需一致
if __name__ == "__main__":
file_name_list = os.listdir(path_in)
j = 0
for i in file_name_list[1:]:
zip_file = zipfile.ZipFile(path_in+i)
ss = zip_file.namelist()
zip_file.extract(ss[1], path_out, (pwd_list[j]).encode())
j += 1