Created
May 11, 2012 01:49
-
-
Save anroots/2656998 to your computer and use it in GitHub Desktop.
Download ITK student images
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
#!/bin/bash | |
kasutajanimi=foobar # User | |
salasona=foobar # Pass | |
kaust="itk-pic" # Folder name | |
min_pic_id="440" # Min pic ID | |
max_pic_id="1000" # Max pic ID | |
wget --user-agent "ITK Notifier" --no-check-certificate --keep-session-cookies --save-cookies cookies.txt | |
--post-data="username=$kasutajanimi&pw=$salasona&Login=Logi sisse" https://itcollege.ois.ee/auth/login -O login | |
for i in `seq $min_pic_id $max_pic_id`; | |
do | |
file="$kaust/$i.jpg" | |
echo "Download $file" | |
echo "" | |
wget --user-agent "ITK Notifier" --no-check-certificate | |
--load-cookies cookies.txt "https://itcollege.ois.ee/et/file/user-picture?user_id=$i" -O $file | |
done | |
rm -f login cookies.txt | |
echo "All done!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment