def decompress_bz2(filepath):
download_photo(filepath)
try:
# Open the BZ2 file
zipfile = bz2.BZ2File(filepath)
# Get the decompressed data
data = zipfile.read()
# Assuming the filepath ends with .bz2
newfilepath = filepath[:-4]
# Write an uncompressed file
open(newfilepath, 'wb').write(data)
return newfilepath
except IOError as e:
print "[!] Please verifiy you entered the correct cookie value.\n"
print e
评论列表
文章目录