×

注意!页面内容来自https://github.com/redandreyoshi/eromedownloader,本站不储存任何内容,为了更好的阅读体验进行在线解析,若有广告出现,请及时反馈。若您觉得侵犯了您的利益,请通知我们进行删除,然后访问 原网页

Skip to content
<> /* Override primer focus outline color for marketing header dropdown links for better contrast */ [data-color-mode="light"] .HeaderMenu-dropdown-link:focus-visible, [data-color-mode="light"] .HeaderMenu-trailing-link a:focus-visible { outline-color: var(--color-accent-fg); }

redandreyoshi/eromedownloader

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

eromedownloader

A Python-based downloader for erome.comallowing users to download media from albums on the platform.

Features

  • Download images and videos from erome.com albums.
  • Support for concurrent requests to speed up downloads.
  • Customizable options for skipping images or videos.

Installation

Prerequisites

  • Python 3.11+ (recommended version).
  • Poetry (for dependency management and packaging).

1. Install Dependencies

Follow the installation instructions from the official Poetry website.

On Linux/macOSyou can use the following command:

curl -sSL https://install.python-poetry.org | python3 -

On Windowsyou can follow the installation guide for respective steps.

2. Install Project dependencies

Once Poetry is installedrun the following command to install all project dependencies:

poetry install

This will create a virtual environment and install all the necessary packages specified in the pyproject.toml fileincluding beautifulsoup4requestsaiohttpand others.

3. Running the Application

After the environment is set upyou can run the application with:

poetry run python main.py --url <your_album_url> --path <your_save_path> --concurrent-requests-max <number> --skip-images <True/False> --skip-videos <True/False>

or

poetry run python main.py --album-id <your_album_id> --path <your_save_path> --concurrent-requests-max <number> --skip-images <True/False> --skip-videos <True/False>

4. Generating a requirements.txt (Optional)

If you need to generate a requirements.txt file (for examplefor compatibility reasons)you can export it with:

poetry export --without-hashes --format=requirements.txt > requirements.txt

5. Directory Structure

eromedownloader/
├── eromedownloader/                  # Main source folder
│   ├── __init__.py
│   ├── __main__.py                  # Entry point for the command line tool
│   ├── config.py                    # Configuration settings (e.g.user agentdefault paths)
│   ├── downloader.py                # Handles downloading of media
│   ├── scraper.py                   # Scraping logic for extracting media URLs
│   ├── save_manager.py              # Manages the save directory and file saving
│   ├── url_processor.py             # Processes URLs for scraping
│   ├── album_id_processor.py        # Processes album IDs for scraping
│   └── logger.py                    # Logger setup for handling log messages
├── pyproject.toml                   # Poetry configuration
├── README.md                        # Project documentation
└── poetry.lock                      # Dependency lock file
  • eromedownloader/: Contains all the source code files.
  • __main__.py: This is the entry point for the command-line interface (CLI). It allows you to run the tool using python -m eromedownloader.
  • config.py: Contains configuration details like the user agent and default save paths.
  • downloader.py: Handles the actual downloading of media files from the URLs.
  • scraper.py: Contains the scraping logic for extracting image and video URLs from the album.
  • save_manager.py: Manages the directory where media is savedhandling path generation and folder creation.
  • url_processor.py: Responsible for processing albums by URL.
  • album_id_processor.py: Responsible for processing albums by album ID.
  • logger.py: Configures the logger used across the app for consistent log management.
  • pyproject.toml: The Poetry configuration file containing package and dependency details.
  • poetry.lock: The file that locks the dependencies to specific versions for consistency.

Notes

  • Dependencies: The project uses aiohttpbeautifulsoup4and other libraries. Poetry will automatically handle these dependencies when you run poetry install.
  • Concurrency: The program allows setting the maximum number of concurrent requests for downloading media files. The default is 4but you can change it using the --concurrent-requests-max argument.
  • Skipping Media: You can choose to skip downloading images or videos with the --skip-images and --skip-videos flags.

Usage

Once the package is installedyou can use it as a CLI tool to download media from erome.com.

1. Using URL

To download an album using its URLrun:

python -m eromedownloader --url <album_url>

This will scrape and download all the media from the specified album.

2. Using Album ID

You can also provide the album ID directly instead of the URL. For example:

python -m eromedownloader --album_id <album_id>

Where <album_id> is the ID of the album you want to download.

Options

  • -u--url <album_url>: The URL of the album you want to download.
  • -id --album_id <album_id>: The ID of the album you want to download.
  • -p --path <path>: (Optional) Specify the download path. Default is a "downloads" folder in the current directory.
  • -c --concurrent_requests_max <number>: (Optional) Max concurrent requests. Default is 5.
  • -si --skip_images: (Optional) Skip downloading images.
  • -sv --skip_videos: (Optional) Skip downloading videos.

About

Downloader for erome

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%