Update readme file

This commit is contained in:
Michael Reber 2019-11-21 13:08:53 +01:00
parent d088d935f0
commit 293f3c2972

View File

@ -21,31 +21,35 @@ Please exercise good judgement when using this script. The folks at Linux Academ
## Installation ## Installation
Tested on a fresh install of Ubuntu 18.04 desktop. Your mileage may vary depending on your OS. Tested on a fresh install of CentOS 7.6 Your installation packet-names may vary depending on your OS.
sudo apt update $ sudo -i
sudo apt install python3 python3-pip git unzip ffmpeg # yum install python3 python3-pip git unzip ffmpeg -y
sudo pip3 install selenium youtube-dl # pip3 install selenium youtube-dl
# cd /opt && git clone https://code.michu-it.com/michael/selenium-linuxacademy-dl.git
# cd selenium-linuxacademy-dl
### Browser ### Browser
You will need Chrome or Firefox and its matching driver. You will need Chrome or Firefox and its matching driver.
#### Chrome #### Chrome example for CentOS
Install [Google Chrome](https://www.google.com/chrome/) and download the appropriate [ChromeDriver](https://chromedriver.chromium.org/downloads) version. Make sure the `chromedriver` executable is in your PATH (e.g., `/usr/local/bin`). Install [Google Chrome](https://www.google.com/chrome/) and download the appropriate [ChromeDriver](https://chromedriver.chromium.org/downloads) version. Make sure the `chromedriver` executable is in your PATH (e.g., `/usr/local/bin`).
sudo dpkg -i google-chrome-stable_current_amd64.deb # wget https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm
unzip chromedriver_linux64.zip # yum install ./google-chrome-stable_current_*.rpm
sudo mv chromedriver /usr/local/bin # wget https://chromedriver.storage.googleapis.com/78.0.3904.105/chromedriver_linux64.zip
# unzip chromedriver_linux64.zip
# cp chromedriver /usr/bin/
#### Firefox #### Firefox example for Debian
Install Mozilla Firefox and download [geckodriver](https://github.com/mozilla/geckodriver/releases). Install Mozilla Firefox and download [geckodriver](https://github.com/mozilla/geckodriver/releases).
sudo apt install firefox # apt install firefox
tar xzf geckodriver-*-linux64.tar.gz # tar xzf geckodriver-*-linux64.tar.gz
sudo mv geckodriver /usr/local/bin # cp geckodriver /usr/bin/
## Usage ## Usage
@ -62,7 +66,7 @@ This will only work with an active Linux Academy subscription. If you do not hav
$ export LADL_USERNAME=person@example.com $ export LADL_USERNAME=person@example.com
$ export LADL_PASSWORD=p@ssw0rd $ export LADL_PASSWORD=p@ssw0rd
$ export LADL_DIR=/home/jdoe/linux-academy $ export LADL_DIR=/opt/linux-academy-videos
$ ./linuxacademy-dl.py https://linuxacademy.com/cp/modules/view/id/346 $ ./linuxacademy-dl.py https://linuxacademy.com/cp/modules/view/id/346
The username/email and password fields are required. The cookie file will opt to `$PWD/cookies.txt` and the download directory will default to `$SCRIPT_DIR/download`, where `$SCRIPT_DIR` is the path of the `linuxacademy-dl.py` script. The username/email and password fields are required. The cookie file will opt to `$PWD/cookies.txt` and the download directory will default to `$SCRIPT_DIR/download`, where `$SCRIPT_DIR` is the path of the `linuxacademy-dl.py` script.