我一直在尝试使用 python 模块 olefile 提取磁盘中 msg 文件的文本内容。但是得到 AttributeError: OleFileIO instance has no attribute 'read'。试图阅读 olefile API 但无法获得任何线索。谢谢。
import sys,olefile
x=olefile.OleFileIO('dkd.msg')
print x.read()
请您参考如下方法:
尝试
y = x.openstream('WordDocument'); print y.read()
