https://rarfile.readthedocs.io/api.html
pip install rarfile
import rarfile rf = rarfile.RarFile("myarchive.rar") for f in rf.infolist(): print(f.filename, f.file_size) if f.filename == "README": print(rf.read(f))
原文:https://www.cnblogs.com/profesor/p/14770635.html