アットウィキロゴ

aruji

import zipfile
 
post=zipfile.ZipFile('508.zip', 'r')
 
x=[]    
for info in post.infolist():
    x.append(info.filename)
 
zipFile = zipfile.ZipFile('ren.cbz', 'w', zipfile.ZIP_STORED)
tr=0
for x1 in x:
    tr=tr+1
    de=str(tr)+".jpg"
    if tr<100:de="0"+str(tr)+".jpg"
    if tr<10:de="00"+str(tr)+".jpg"
    inf = zipfile.ZipInfo(de)
    f1=post.read(x1)
    zipFile.writestr(inf, f1)
zipFile.close()
最終更新:2018年02月12日 22:10