Skip to content

Instantly share code, notes, and snippets.

@myui
Last active October 28, 2015 01:54
Show Gist options
  • Save myui/c5fd3a45b1dc98dcf706 to your computer and use it in GitHub Desktop.
Save myui/c5fd3a45b1dc98dcf706 to your computer and use it in GitHub Desktop.
Kaggle data get script
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