【问题标题】:Access Fastmail CalDAV with Python使用 Python 访问 Fastmail CalDAV
【发布时间】:2018-10-28 08:41:37
【问题描述】:

我正在尝试通过 Python 访问我的 Fastmail 日历。我正在使用this answer 建议的caldav 模块。这是我的代码的样子:

def main():
    auth = HTTPBasicAuth(username='mail@domain.com', password='myapplicationpassword')
    client = caldav.DAVClient('https://caldav.fastmail.com', auth=auth)
    try:
        client.principal()
    except Exception as e:
        print(e)

client.principal() 引发异常:

404 Not Found

b'<html>\r\n<head><title>404 Not Found</title></head>\r\n<body bgcolor="white">\r\n<center><h1>404 Not Found</h1></center>\r\n<hr><center>nginx</center>\r\n</body>\r\n</html>\r\n'

我也尝试了client = caldav.DAVClient('https://caldav.fastmail.com', username='mail@domain.com', password='myapplicationpassword') 并获得了相同的结果。

最后,我查看了caldav example using iCloud,并尝试用 fastmail 重现相同的想法。我遇到了同样的问题(principal_response 有一个 404 状态码)。

我错过了什么?

【问题讨论】:

    标签: python caldav


    【解决方案1】:

    正确的 URL 是 https://caldav.fastmail.com/dav。这在服务器和端口文档中并不明显。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-11-28
      • 1970-01-01
      • 2017-12-08
      • 1970-01-01
      相关资源
      最近更新 更多