我正在使用 python 脚本来访问我的 nextcloud 服务器,一切都很酷,没有问题,但我决定使用 SSL 自签名加密 nextcloud,然后我的脚本就完成了…… Nextcloud 在 Apache 中被显示,它有指令
重定向“/”“ https://IP ”
使所有请求转到 https。
我在 python 中使用 webdav 客户端和这个选项
self.options = {'webdav_login':'user', 'webdav_password':'pass', 'webdav_hostname': http://ip, 'webdav_root': 'nextcloud/remote.php/webdav'}
这些选项与 http 完美搭配,但是当我尝试使用这些选项向 nextcloud 发出任何请求时,我得到 webdav 异常,例如 RemoteParentNotFound。
我试图将http://ip更改为https://ip,但如果我这样做,pycurl 会引发异常 NotConnection。
有人可以帮我让它工作或推荐我使用 python 上传、删除等到 nextcloud 的任何方法吗?