Skip to content

Latest commit

 

History

History
108 lines (61 loc) · 2.23 KB

README.md

File metadata and controls

108 lines (61 loc) · 2.23 KB

Blackbox (Legacy)

Dropbox for Blackboard


Update 04/08/2019

This repo now holds the legacy version of Blackbox.


Description

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.


Mechanics

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.


How to Use

Step 1 - Input Your Username, Password and Directory Path

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.

Step 2 - Install Dependencies

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

Screenshots

1. Executing the Script

1.JPG

2. Initializing Chrome Web Driver

2.JPG

3. Automating Downloads on Chrome Web Driver

3.JPG

4. Course Directory on Local Machine

4.JPG

5. Course File Downloads on Local Machine

5.JPG


Limitations

Blackbox kills all unfinished downloads per module within 15 seconds.


Potential Improvements

  • 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.


Disclaimer

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.