A Python script designed to bulk download items from an Opac online library efficiently. This script automates the process of fetching all PDFs from an Opac website, saving you time and effort while being highy configurable.
- An active account to access the Opac online library.
- Python 3.10+
- Clone the repository:
git clone https://github.com/naghim/OpacMultiFetcher.git
cd OpacMultiFetcher
- Install the required Python packages:
pip install -r requirements.txt
-
Configure the script and add your credentials (see Configuration section). Ensure you have filled out the
settings.json
file with the correct details. -
Run the script:
python download.py
- The script will log in using your credentials and start downloading PDFs based on your configuration.
Create a file named settings.json
in the root folder with the following structure:
{
"url": "http://opac3.ms.sapientia.ro",
"tenant": "marosvasarhely",
"lastRecord": 116323,
"cookies": {
"access_token": "...",
"JSESSIONID": "...."
}
}
url
: The base URL of the Opac online library.tenant
: The tenant identifier for the library.lastRecord
: The last record number you want to fetch. Adjust this based on your requirements.cookies
: Your authentication cookies for accessing the library. You need to include youraccess_token
andJSESSIONID
obtained from logging into the library. Note: Some websites are public and work without cookies set.