Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nikolai2038/moodle-downloader
Bash-script to download videos from moodle page
https://github.com/nikolai2038/moodle-downloader
bash curl downloader moodle parsing
Last synced: about 2 months ago
JSON representation
Bash-script to download videos from moodle page
- Host: GitHub
- URL: https://github.com/nikolai2038/moodle-downloader
- Owner: Nikolai2038
- License: agpl-3.0
- Created: 2023-11-05T18:45:55.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-04-21T23:42:35.000Z (9 months ago)
- Last Synced: 2024-04-22T03:06:31.432Z (9 months ago)
- Topics: bash, curl, downloader, moodle, parsing
- Language: Shell
- Homepage:
- Size: 32.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Moodle Downloader
**EN** | [RU](README_RU.md)
## Description
This Bash-script allows you to download videos from Moodle page.
## Requirements
- Linux or WSL;
- Bash;
- `libxml-xpath-perl` apt-package installed (it will be installed automatically, if not already installed).Script was tested in WSL Debian on Windows 10.
## Usage
1. Clone the repository:
```bash
git pull https://github.com/Nikolai2038/moodle-downloader.git
cd moodle-downloader
```2. Copy file `env.sh.example` to `env.sh`;
3. Open browser. Authorize in moodle service and open course you want to download videos from;
4. Copy link to the course and insert it in `env.sh` file - change the `LINK` variable value;
5. In the browser open DevTools via `F12` key;
6. Reload page;
7. On the `Network` tab filter the requests by response type - set `HTML`. There should be one request left;
8. Right click the request and select `Headers` tab for it;
9. Copy `Cookie` header value and insert it in `env.sh` file - change the `COOKIE` variable value;
10. Run script:```bash
./moodle_downloader.sh
```
After executing command, script will start to download all videos into `./downloads/courses// - ` directory (this directories will be created automatically).
Videos will be named ` - .mp4`.Additionally, script cache all html pages inside `./downloads/cache` directory to reduce the number of requests for repeated script calls.
Script also does not download video, if it's filename exists.
So if you want to redownload videos - just delete them.
Same for html files.## Contribution
Feel free to contribute via [pull requests](https://github.com/Nikolai2038/moodle-downloader/pulls) or [issues](https://github.com/Nikolai2038/moodle-downloader/issues)!