Use Webdav en Linux para obtener un archivo de SkyDrive *sin* montaje

I want to download a file from SkyDrive programmatically using Python on Linux.

I can't use the API as it's a OneNote file and the API can't be used to download these.

My understanding is that SD supports Webdav and there are plenty of examples where people have mounted an SD folder using davfs2 but I just want to be able to grab a specific file without mounting.

I can use the API to get the document owner's cid so don't need to jump through any windows based hoops but my - probably lame, have not really researched webdav - efforts to download the file always resort in an error.

For example using easywebdav:

import easywebdav
webdav = easywebdav.connect("")'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.

Is there any workaround for the redirection problem I've seen mentioned?

Do I have this wrong and when accessing files on a webdav share it makes sense, and indeed it's essential, to mount it as a file system?

preguntado el 11 de septiembre de 13 a las 23:09

1 Respuestas

If you are downloading a specific file, and already know the exact path/URL to that file (as per your example), I'm not sure that you really need to worry about the DAV extensions. Have you tried downloading the file using a simple HTTP GET, through something like urllib2?

Respondido el 11 de Septiembre de 13 a las 23:09

Useful, thanks. Using the link that one can read from the document metadata using the API urllib2 did actually download something. Unfortunately it's not the file (but that's a different problem related to how Skydrive handles Skydrive documents). I was hoping that using Webdav it might actually give me the target file not the placeholder for the file. I think I'll tinker with Cadaver to see if I can get it using the CLI. - Darren beale

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.