如何使用python批量处理rar文件,rarfile
https://pypi.org/project/rarfile/
https://python-unrar.readthedocs.io/en/v0.3/rarfile.html
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))