Last active
October 28, 2015 01:54
-
-
Save myui/c5fd3a45b1dc98dcf706 to your computer and use it in GitHub Desktop.
Kaggle data get script
This file contains hidden or 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
curl -s https://www.kaggle.com/c/titanic/data | pup 'tbody tr td a attr{href}' | awk '{print "https://kaggle.com" $1}' > urls.txt | |
# pup is required | |
# https://github.com/ericchiang/pup | |
for f in `cat urls.txt`; | |
do | |
echo "downloading file: ${f}" | |
wget -O `basename ${f}` https://www.kaggle.com/account/login?ReturnUrl=${f} --post-data "username=${KAGGLE_USER}&password=${KAGGLE_PASSWD}" | |
echo | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment