This robot will log in by your credentials into MaktabKhoone and try to extract the download links of given course.
- Clone the repository from GitHub:
git clone https://github.com/Amirmahdikahdouii/MaktabKhooneCrawler.git
- Install requirements:
cd MaktabKhooneCrawler
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
- Setup
.env
:
cp .env.example .env
- Fill .env variables with your own credentials
- Run bot:
python main.py
Important
Before pass the course URL to the bot, make sure that you have signed up for the course, otherwise the bot will raise an excception.
Note that links.txt
and file_names.txt
files, will be updated and the new links will append to the end of the files, so make sure after crawled completely, handle this by yourself.
Remember after extracting links, you will have 2 files:
- links.txt
- file_names.txt
You can use links.txt
for downloading using IDM, and after downloading completed, you will need file_names.txt
to
rename downloaded files.
python rename_files.py
and for first input, give path where all the downloaded movies are there, then for second input give the path for
file_names.txt
/home/user/Downloads/course/
/home/user/Desktop/MaktabKhooneCrawler/file_names.txt