如何UNO读取http格式的文件内容?

2024-05-16 18:30:17 发布

您现在位置:Python中文网/ 问答频道 /正文

我用UNO在本地机器上读取文件的内容。没关系。但是当UNO以http格式读取文件内容时,会显示错误:

Error (<class '__main__.com.sun.star.lang.IllegalArgumentException'>) during conversion:Unsupported URL <http://crypto.stanford.edu/DRM2002/darknet5.doc>: "type detection failed".

如何UNO读取http格式的文件内容? 这是http://www.openoffice.org/udk/python/python-bridge.html中的代码

^{pr2}$

我是这样执行程序的:

1. openoffice.org --accept="socket,host=0.0.0.0,port=2002;urp;StarOffice.ServiceManager"
2. python ooextract.py --stdout /home/tungdq/hello.doc -> ok
3. python ooextract.py --stdout http://crypto.stanford.edu/DRM2002/darknet5.doc -> error

Tags: 文件pyorghttp内容doc格式crypto