This repo now holds the legacy version of Blackbox.
Blackbox, an amalgamation of Blackboard and Dropbox, magically albeit hackily syncs your NTUlearn files (well, most of them) just like how Dropbox seamlessly does so.
For the uninitiated, Blackbox is written in Python and uses Selenium to automate a special Chrome browser (called the Chrome web driver) that is built for web testing.
It logs you into Blackboard, iterates through all your courses and then downloads all uploaded documents for you.
Open blackbox.py
and look for the following:
BLACKBOARD_USERNAME = "REPLACE_ME"
BLACKBOARD_PASSWORD = "REPLACE_ME"
CHROMEDRIVER_PATH = "REPLACE_ME"
Edit the above with your information accordingly.
Windows:
$ pip install selenium
$ cd path/to/working/directory
$ python blackbox.py
Mac:
$ sudo pip3 install selenium
$ cd path/to/working/directory
$ python3 blackbox.py
Blackbox kills all unfinished downloads per module within 15 seconds.
-
Analyzing file size to determine whether a (large) file should be downloaded or not.
-
Preventing duplicate downloads for previously-downloaded files.
-
Notifies you when new files have been synced.
-
Run as an compiled executable on all platforms.
This is a code snippet used in a workshop and is not meant to be production-ready.
It is only meant to demonstrate how Selenium works; using a headless web driver is definitely a more elegant solution.
The author is not liable for any damages suffered by your machine in your course of using Blackbox.