gpt4 book ai didi

Python olefile 提取正文文本

转载 作者:太空宇宙 更新时间:2023-11-04 05:56:52 25 4
gpt4 key购买 nike

我一直在尝试使用 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()

关于Python olefile 提取正文文本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27305221/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com