我想在Linux上使用Python编程从SkyDrive下载一个文件。在
我的理解是SD支持Webdav,有很多例子表明人们使用davfs2挂载SD文件夹,但我只希望能够在不挂载的情况下抓取特定的文件。在
我可以使用API来获取文档所有者的cid,所以不需要jump through any windows based hoops但是我——可能是蹩脚的,没有真正研究过webdav——下载文件的努力总是出错。在
例如,使用easywebdav:import easywebdav
webdav = easywebdav.connect("d.docs.live.net/mycid")
webdav.download('me/skydrive/Documents/Getting\ Started', '/tmp/foo')
#this gives the 302 error mentioned in the comments at the end of the the 'jumping through windows hoops' link I posted above.
对于我所看到的重定向问题,有什么解决方法吗?在
我有错吗?当访问webdav共享上的文件时,将其作为文件系统挂载是有意义的,而且确实是必要的?在