-
Notifications
You must be signed in to change notification settings - Fork 0
Downloader
codemicro edited this page Dec 30, 2019
·
5 revisions
Requirements: Python 3.7 or above
Setup:
- Run
pip install -r requirements.txtto install all required dependencies (orpip3on Linux). - Copy settings.json.example to settings.json, remove the first line, and fill in the appropriate details.
-
download_diris the path to the folder all downloads will be downloaded into. This can be either relative or absolute. -
endpointshould be left alone -
auth_keyis your internal API authentication key
-
- Run
dlclient.py, assudoif on Linux to ensure the script has write permission to the downloads directory. If you do so, you must ensure you ranpip3assudotoo.
What it does
Every 10 (?) seconds, the program will poll the internal API to retrieve the next available download link. If one is found, it will download that link using the provided information, and immediately move onto the next link. If no links are found, the program will wait another 10 seconds.
Errors and logging
If any error is thrown, it will be picked up by loguru, and logged in a file called error.log which will be created in the same directory as the script. The script then quits. It is important to monitor if the script has failed or not, and restart it if possible.