Created
March 28, 2017 22:14
-
-
Save stg7/e8e129959912cb4451cce72b2784fbd6 to your computer and use it in GitHub Desktop.
download dropbox folder if it is too large for a direct download
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# if someone send you a link to a dropbox shared folder and you don't want to install the dropbox client | |
# and it is not possible to download the whole folder via dropbox, than the following script could help you | |
# change DROPBOXURL to your link url | |
wget "DROPBOXURL" -O down.html | |
# where DROPBOX URL is something like: https://www.dropbox.com/sh/ID?dl=0 | |
cat down.html \ | |
| sed "s|href|\\nhref=|g" \ | |
| grep "href=\":" \ | |
| grep "https://www.dropbox.com" \ | |
| sed "s|?dl=0.*|?dl=0|g" \ | |
| sed "s|href=\": \"||g" > links.list | |
wget -i links.list --directory-prefix download | |
# all files will be stored in the directory `download` |
yes, sorry, this is a piece of code 6 years old, and it will definitively not work anymore, it may be a good starting point for a new script. Unfortunately, I do not use dropbox anymore.
OK, this works:
curl -L -o download.zip "DROPBOXURL"
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
this didn't work for me