update readme file
This commit is contained in:
parent
ccc41dc706
commit
ff5b2334b9
65
README.md
65
README.md
@ -23,11 +23,14 @@ Please exercise good judgement when using this script. The folks at Linux Academ
|
|||||||
|
|
||||||
Tested on a fresh install of CentOS 7.6 Your installation packet-names 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 -i
|
```
|
||||||
# yum install python3 python3-pip git unzip ffmpeg -y
|
$ sudo -i
|
||||||
# pip3 install selenium youtube-dl
|
|
||||||
# cd /opt && git clone https://code.michu-it.com/michael/selenium-linuxacademy-dl.git
|
# yum install python3 python3-pip git unzip ffmpeg -y
|
||||||
# cd selenium-linuxacademy-dl && chmod +x linuxacademy-dl.py
|
# pip3 install selenium youtube-dl
|
||||||
|
# cd /opt && git clone https://code.michu-it.com/michael/selenium-linuxacademy-dl.git
|
||||||
|
# cd selenium-linuxacademy-dl && chmod +x linuxacademy-dl.py
|
||||||
|
```
|
||||||
|
|
||||||
### Browser
|
### Browser
|
||||||
|
|
||||||
@ -37,36 +40,46 @@ You will need Chrome or Firefox and its matching driver.
|
|||||||
|
|
||||||
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`).
|
||||||
|
|
||||||
# wget https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm
|
```
|
||||||
# yum install ./google-chrome-stable_current_*.rpm
|
# wget https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm
|
||||||
# wget https://chromedriver.storage.googleapis.com/78.0.3904.105/chromedriver_linux64.zip
|
# yum install ./google-chrome-stable_current_*.rpm
|
||||||
# unzip chromedriver_linux64.zip
|
|
||||||
# cp chromedriver /usr/bin/
|
# wget https://chromedriver.storage.googleapis.com/78.0.3904.105/chromedriver_linux64.zip
|
||||||
|
# unzip chromedriver_linux64.zip
|
||||||
|
# cp chromedriver /usr/bin/
|
||||||
|
```
|
||||||
|
|
||||||
#### Firefox example for Debian
|
#### 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).
|
||||||
|
|
||||||
# apt install firefox
|
```
|
||||||
# tar xzf geckodriver-*-linux64.tar.gz
|
# apt install firefox
|
||||||
# cp geckodriver /usr/bin/
|
|
||||||
|
# tar xzf geckodriver-*-linux64.tar.gz
|
||||||
|
# cp geckodriver /usr/bin/
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
This will only work with an active Linux Academy subscription. If you do not have one, please get one [here](https://linuxacademy.com/pricing/).
|
This will only work with an active Linux Academy subscription. If you do not have one, please get one [here](https://linuxacademy.com/pricing/).
|
||||||
|
|
||||||
Usage:
|
```
|
||||||
./linuxacademy-dl.py [-u|--username] [-p|--password] [-d|--download-dir] [-c|--cookies-file] COURSE_URL
|
Usage:
|
||||||
|
./linuxacademy-dl.py [-u|--username] [-p|--password] [-d|--download-dir] [-c|--cookies-file] COURSE_URL
|
||||||
Options may be replaced with environment variables. Command line options take precedence.
|
|
||||||
LADL_USERNAME, LADL_PASSWORD, LADL_DIR, LADL_COOKIES
|
Options may be replaced with environment variables. Command line options take precedence.
|
||||||
|
LADL_USERNAME, LADL_PASSWORD, LADL_DIR, LADL_COOKIES
|
||||||
Examples:
|
|
||||||
$ ./linuxacademy-dl.py -u person@exmple.com -p p@ssw0rd https://linuxacademy.com/cp/modules/view/id/346
|
Examples:
|
||||||
|
$ ./linuxacademy-dl.py -u person@exmple.com -p p@ssw0rd https://linuxacademy.com/cp/modules/view/id/346
|
||||||
$ export LADL_USERNAME=person@example.com
|
|
||||||
$ export LADL_PASSWORD=p@ssw0rd
|
$ export LADL_USERNAME=person@example.com
|
||||||
$ export LADL_DIR=/opt/linux-academy-videos
|
$ export LADL_PASSWORD=p@ssw0rd
|
||||||
$ ./linuxacademy-dl.py https://linuxacademy.com/cp/modules/view/id/346
|
$ export LADL_DIR=/opt/linux-academy-videos
|
||||||
|
$ ./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.
|
||||||
|
Loading…
Reference in New Issue
Block a user