Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
This is a simple python script for downloading all of the files in your cloud app. Caveats: "bookmarks" can't be downloaded, so they'll be outputted in the log. All files will be downloaded into the same directory as the python script. It requires pycloudapp, which you can find here: https://github.com/originell/pycloudapp.
# requires https://github.com/originell/pycloudapp
from cloudapp.cloud import Cloud
import urllib
mycloud = Cloud()
mycloud.auth("username", "password")
current_page = 1
total_count = 0;
while True:
items = mycloud.list_items(page=current_page, per_page=20)
for item in items:
try:
urllib.urlretrieve(item["content_url"], item["name"])
except:
print item["content_url"]
total_count += len(items)
print current_page
current_page += 1
if len(items) != 20:
break
print "done"
print total_count
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.