Closed docmeth02 closed 10 years ago
I actually did have it using the bitcasa streaming api but it was corrupting files. You can look at that here
Also, your first commit perhaps is fixing the wrong issue. I believe the check should be here instead. The problem is on first run path
is always empty so it will always generate /foldername
. Instead it should check for a empty path
and just recurse using foldername
.
What do you think?
Yes you are absolutely right. I fixed the issue at the wrong spot. I'll send you another pull request to fix this.
Yes the Bitcasa api is horrible. What i meant was not to use the wget module to download the files, but instead use the requests module and do streaming get requests to save on ram.
I will give requests a try. When I first switched from the bitcasa stream I went for what was easiest. But you are right, requests should work a whole heck of a lot better in this regard.
Hi, Some fixes i had to apply for the whole thing to work: You joined two absolute paths when building your destination paths. Pythons os.path.join function will always return the latter path in this case resulting in all subdirectories to go straight to the root of your drive. The other bug was simply adding two strings together instead of properly joining them as path components.
I really dislike the use of wget in this, because no matter what you do it will always put a temp file into your cwd. If shitcasa wasn't on its way out, i'd be happy to convert this to streaming requests for the donwloads.