Last active
June 22, 2022 12:19
-
-
Save LeaveNhA/8b7f9009dee11ae2d0022c18e7b86482 to your computer and use it in GitHub Desktop.
OMÜ Exam Result Fetcher and Informer!
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
# Go and login on UBS. | |
# Use your browser's development tools to get the | |
# NET_SessionId cookie information. | |
# Place the information in '!!!' part of the code. | |
# Run the code on MacOS as it is or replace "say" | |
# call with something else like ringing the shell or etc. | |
$LOGINSECRET=!!! watch -n 10 'if [[ $(http https://ubs.omu.edu.tr/Ogrenci/Ogr0201/Default.aspx\?lang\=tr-TR Cookie:ASP.NET_SessionId=$LOGINSECRET |grep "_tdBn" |egrep -o ">[0-9]+<" |cut -c 2-3 |wc -w |egrep -o "[0-9]+") == "10" ]]; then | |
say "Congrats\! The exams results are online\!" | |
else | |
: | |
fi;' | |
# Thank you to all of my classmates for their passion and patience during this hard emotion and mental endurance test. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Update:
Updated from the version I used to use to expect my final exam's result.
Q:
What is it?
A:
It's simply a listener that requesting the Web Page and parse it's context and filter the grades' of the lectures and check if they are completed (there must be 10 of them) and run the desired bash command if they are completed (published, 10 --all-- of them).
Love you fellas! Thanks again for the great memories!