iamkroot / ilc-scraper

A scraper for Impartus Lecture Capture videos for BITS Hyderabad
67 stars 30 forks source link
hacktoberfest impartus scraper

Impartus Scraper

This is a scraper for the Impartus Lecture Capture system deployed in BITS Pilani Hyderabad Campus. No more crying when Impartus servers crash during exam time because of overload. You can even access lectures from previous years in case your current prof sucks :P

Features

Installation

Recommended:

Go to the Releases page and download the latest version according to your OS. Just double click and run!

Manual method:

  1. Ensure you have Python 3.7 or higher installed, and available in your system PATH. To check, run python --version from command line/terminal.
  2. Install ffmpeg from here. Ensure it is in your PATH variable. To check, run ffmpeg -version from command line/terminal.
  3. Install poetry using pip install --user poetry. Restart your PC.
  4. Clone this repo if you know git, or click Download as ZIP and extract it to some location.
  5. Open terminal and cd to download/clone directory.
  6. Run poetry install --no-dev -E gui for the default installation. (If you don't want the GUI, which takes up a lot of extra space, omit the -E gui from the command.)

Configuration (Optional)

In case you plan to use the script multiple times, it'll be useful to not have to type the Impartus creds and download location everytime. You can store these for future use.

  1. Duplicate the sample_config.json file and rename it to imp_config.json.
  2. Enter your Impartus credentials (Username, Password) in the fields. Required to be able to access Impartus.
  3. Specify the Download Location for the lectures in the save_fold field. If you leave this blank, it will default to Impartus Lectures folder inside the download location of this script.

IMP: For Windows, you need to use double \\ in paths. Eg: C:\\Users\\Student\\Downloads\\Lectures or D:\\Impartus.

Running (manual method)

How it works

Help

Fixing URL unrecognized errors

Specifying Ranges

The range pattern follows the format of Python Slices.

12 (Only 12 will be downloaded),
1:4 (1 included, 4 excluded),
:10 (Download lecture numbers 1 to 9),
3: (Download all lectures from number 3 onwards). 

You can also specify multiple ranges using commas. 12, 4:6, 15:, :2 will download lectures 1, 4, 5, 12, 15, 16, 17, ... until the latest one.

Contributing

See CONTRIBUTING.md.