我下载了一些zip文件,但我无法使用zipfile模块解压缩它们。
import zipfile
z = zipfile.ZipFile("00951999AP.wtl","r")
BadZipfile: File is not a zip file
文件说它是一个多文件拉链,但我知道它不是因为我可以在b1freearchiver上解压缩它
file 00951999AP.wtl
00951999AP.wtl: Zip multi-volume archive data, at least PKZIP v2.50 to extract
我该怎么办?
In [11]: zipfile.ZipFile("00951999AP.wtl")
---------------------------------------------------------------------------
BadZipfile Traceback (most recent call last)
<ipython-input-11-05921d85d623> in <module>()
----> 1 zipfile.ZipFile("00951999AP.wtl")
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/zipfile.pyc in __init__(self, file, mode, compression, allowZip64)
710
711 if key == 'r':
--> 712 self._GetContents()
713 elif key == 'w':
714 # set the modified flag so central directory gets written
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/zipfile.pyc in _GetContents(self)
744 is bad."""
745 try:
--> 746 self._RealGetContents()
747 except BadZipfile:
748 if not self._filePassed:
/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/zipfile.pyc in _RealGetContents(self)
759 raise BadZipfile("File is not a zip file")
760 if not endrec:
--> 761 raise BadZipfile, "File is not a zip file"
762 if self.debug > 1:
763 print endrec
BadZipfile: File is not a zip file