Skip to content

Instantly share code, notes, and snippets.

@vifon
Created April 3, 2014 15:39
Show Gist options
  • Save vifon/9956803 to your computer and use it in GitHub Desktop.
Save vifon/9956803 to your computer and use it in GitHub Desktop.
Warsaw University of Technology FEIT/WEiTI course dumper
#!/bin/zsh
#########################################################################
# Copyright (C) 2014 Wojciech Siewierski #
# #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation, either version 3 of the License, or #
# (at your option) any later version. #
# #
# This program is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
# along with this program. If not, see <http://www.gnu.org/licenses/>. #
#########################################################################
USER=
PASS=
SEM=${1:-14L}
IFS=$'\n'
COURSES=($(perl -nE 'say $1 if /<th class="nagl" colspan="2">(.*?)<\/th>/' <(wget -O - -c --user $USER --password $PASS https://studia.elka.pw.edu.pl/en/$SEM/index.html)))
unset IFS
for i in $COURSES; do
wget -c --user $USER --password $PASS -r -np https://studia.elka.pw.edu.pl/priv/$SEM/$i/
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment