A Python Bunkr downloader that fetches images and videos from URLs. It supports both Bunkr albums and individual file URLs, logs issues, and enables concurrent downloads for efficiency.
- Downloads multiple files from an album concurrently.
- Supports batch downloading via a list of URLs.
- Supports selective files downloading based on filename criteria.
- Supports custom download location.
- Provides minimal UI for notebook environments.
- Provides progress indication during downloads.
- Automatically creates a directory structure for organized storage.
- Logs URLs that encounter errors for troubleshooting.
- Python 3.11+
BeautifulSoup(bs4) - for HTML parsingrequests- for HTTP requestsrich- for progress display in the terminal
Open a terminal in the folder where you want to install the tool, then follow the steps below.
- Clone the repository:
git clone https://github.com/Lysagxra/BunkrDownloader.git- Navigate to the project directory:
cd BunkrDownloader- Install the required dependencies:
pip install -r requirements.txtTo download a single media from an URL, you can use downloader.py, running the script with a valid album or media URL.
python3 downloader.py <bunkr_url>You can either download an entire album or a specific file:
python3 downloader.py https://bunkr.si/a/PUK068QE # Download album
python3 downloader.py https://bunkr.fi/f/gBrv5f8tAGlGW # Download single mediaBy default the downloader may generate filenames based on the URL. Use the --clean-name flag to preserve the original filename found on the item page.
python3 downloader.py <bunkr_url> --clean-namepython3 downloader.py --dry-run --clean-name <bunkr_url>The script supports selective file downloads from an album, allowing you to exclude files using the Ignore List and include specific files with the Include List.
The Ignore List is specified using the --ignore argument in the command line.
This allows you to skip the download of any file from an album if its filename contains at least one of the specified strings in the list.
Item in the list should be separated by a space.
python3 downloader.py <bunkr_album_url> --ignore <ignore_list>This feature is particularly useful when you want to skip files with certain extensions, such as .zip files. For instance:
python3 downloader.py https://bunkr.si/a/PUK068QE --ignore .zipThe Include List is specified using the --include argument in the command line.
This allows you to download a file from an album only if its filename contains at least one of the specified strings in the list.
Items in the list should be separated by a space.
python3 downloader.py <bunkr_album_url> --include <include_list>python3 downloader.py https://bunkr.si/a/PUK068QE --include FullSizeRenderTo batch download from multiple URLs, you can use the main.py script.
This script reads URLs from a file named URLs.txt and downloads each one using the media downloader.
- Create a file named
URLs.txtin the root of your project, listing each URL on a new line.
- Example of
URLs.txt:
https://bunkr.si/a/PUK068QE
https://bunkr.fi/f/gBrv5f8tAGlGW
https://bunkr.fi/a/kVYLh49Q
- Ensure that each URL is on its own line without any extra spaces.
- You can add as many URLs as you need, following the same format.
- Run the batch download script:
python3 main.py
If the --custom-path <custom_path> argument is used, the downloaded files will be saved in <custom_path>/Downloads.
Otherwise, the files will be saved in a Downloads folder created within the script's directory
Within that folder, each album gets its own <album_title> (<album_id>) subfolder. Use --no-album-folder to skip it and save the files directly into the download directory (--no-download-folder skips the Downloads folder itself; the two can be combined).
python3 main.py --custom-path <custom_path>When the script is executed in a notebook environment (such as Jupyter), excessive output may lead to performance issues or crashes.
You can run the script with the --disable-ui argument to disable the progress bar and minimize log messages.
To disable the UI, use the following command:
python3 main.py --disable-ui
If a download fails, the downloader will retry up to 5 times by default.
You can change the maximum number of retry attempts with the --max-retries argument.
Allowed values: 0 (don't re-download) and larger.
python3 downloader.py <bunkr_url> --max-retries 3The application logs any issues encountered during the download process in a file named session.log.
Check this file for any URLs that may have been blocked or had errors.
