From 6e993d88de036ce9737179729cecf8848fd62c02 Mon Sep 17 00:00:00 2001 From: Yuvi9587 <114073886+Yuvi9587@users.noreply.github.com> Date: Wed, 27 Aug 2025 19:50:13 -0700 Subject: [PATCH] Commit --- features.md | 500 +++++++++++---------------------------- src/core/erome_client.py | 22 +- src/ui/main_window.py | 2 +- 3 files changed, 138 insertions(+), 386 deletions(-) diff --git a/features.md b/features.md index c96c403..76e4642 100644 --- a/features.md +++ b/features.md @@ -1,391 +1,159 @@ -
-

Kemono Downloader - Comprehensive Feature Guide

-

This guide provides a detailed overview of all user interface elements, input fields, buttons, popups, and functionalities available in the application.

-
- -

1. URL Input (πŸ”—)

-

This is the primary input field where you specify the content you want to download.

- -

Functionality:

- - -

Interaction with Other Features: The content of this field influences "Manga Mode" and "Page Range". "Page Range" is enabled only with a creator URL.

- -
- -

2. Creator Selection & Update (🎨)

-

The color palette emoji button opens the Creator Selection & Update dialog. This allows managing and downloading from a local creator database.

- -

Functionality:

- - -
- -

3. Download Location Input (πŸ“)

-

This input defines the destination directory for downloaded files.

- -

Functionality:

- - -
- -

4. Filter by Character(s) & Scope Button

-

Used to download content for specific characters or series and organize them into subfolders.

- -

Input Field (Filter by Character(s)):

- - -

Scope Button Modes:

- - -
- -

5. Skip with Words & Scope Button

-

Prevents downloading content based on keywords.

- -

Input Field (Skip with Words):

- - -

Scope Button Modes:

- -
-
-

Filter File Section (Radio Buttons)

-

This section uses a group of radio buttons to control the primary download mode, dictating which types of files are targeted. Only one of these modes can be active at a time.

- - - -
- -

Check Box Buttons

-

These checkboxes provide additional toggles to refine the download behavior and enable special features.

- - -
-

Folder Organization Checkboxes

+

Kemono Downloader - Comprehensive Feature Guide

+

This guide provides a detailed overview of all user interface elements, input fields, buttons, popups, and functionalities available in the application.

+
+

1. Core Concepts & Supported Sites

+

URL Input (πŸ”—)

+

This is the primary input field where you specify the content you want to download.

+

Supported URL Types:

- -

General Functionality Checkboxes

+

Supported Websites:

+
+

2. Main Download Controls & Inputs

+

Download Location (πŸ“)

+

This input defines the main folder where your files will be saved.

+ +

Filter by Character(s) & Scope

+

Used to download content for specific characters or series and organize them into subfolders.

+ -

Start Download

+

Skip with Words & Scope

+

Prevents downloading content based on keywords or file size.

- -

Pause / Resume Download

- - -

Cancel & Reset UI

- - -

Error Button

- -

"Known Area" and its Controls

-

This section, located on the right side of the main window, manages your personal name database (Known.txt), which the app uses to organize downloads into subfolders.

- +

Remove Words from Name (βœ‚οΈ)

+

Enter comma-separated words to remove from final filenames (e.g., patreon, [HD]). This helps clean up file naming.

+
+

3. Primary Download Modes (Filter File Section)

+

This section uses radio buttons to set the main download mode. Only one can be active at a time.

- -

Other Buttons

- -

Log Area Controls

-

These controls are located around the main log panel and offer tools for managing downloads, configuring advanced options, and resetting the application.

- - - -

The Progress Log and "Only Links" Mode Controls

- +
+

4. Advanced Features & Toggles (Checkboxes)

+

Folder Organization

+

Special Modes

+ +

File Handling

+ +

General Functionality

+ +
+

5. Specialized Downloaders & Batch Mode

+

Discord Features

+ +

Batch Downloading (nhentai & saint2.su)

+

This feature allows you to download hundreds of galleries or videos from a simple text file.

+
    +
  1. In the appdata folder, create nhentai.txt or saint2.su.txt.
  2. +
  3. Add one full URL per line to the corresponding file.
  4. +
  5. In the app's URL input, type either nhentai.net or saint2.su and click "Start Download".
  6. +
  7. The app will read the file and process every URL in the queue.
  8. +
+
+

6. "Only Links" Mode: Extraction & Direct Download

+

When you select the "Only Links" radio button, the application's behavior changes significantly.

+ +
+

7. Session & Process Management

+

Main Action Buttons

+ +

Restore Interrupted Download

+

If the application is closed unexpectedly during a download, it will save its progress.

+ +

Other UI Controls

+ diff --git a/src/core/erome_client.py b/src/core/erome_client.py index 90eb27c..6282379 100644 --- a/src/core/erome_client.py +++ b/src/core/erome_client.py @@ -1,4 +1,3 @@ -# src/core/erome_client.py import os import re @@ -7,10 +6,8 @@ import time import urllib.parse import requests from datetime import datetime +import cloudscraper -# ############################################################################# -# SECTION: Utility functions adapted from the original script -# ############################################################################# def extr(txt, begin, end, default=""): """Stripped-down version of 'extract()' to find text between two delimiters.""" @@ -49,14 +46,10 @@ def nameext_from_url(url): def parse_timestamp(ts, default=None): """Creates a datetime object from a Unix timestamp.""" try: - # Use fromtimestamp for simplicity and compatibility return datetime.fromtimestamp(int(ts)) except (ValueError, TypeError): return default -# ############################################################################# -# SECTION: Main Erome Fetching Logic -# ############################################################################# def fetch_erome_data(url, logger): """ @@ -78,15 +71,10 @@ def fetch_erome_data(url, logger): album_id = album_id_match.group(1) page_url = f"https://www.erome.com/a/{album_id}" - session = requests.Session() - session.headers.update({ - "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36", - "Referer": "https://www.erome.com/" - }) + session = cloudscraper.create_scraper() try: logger(f" Fetching Erome album page: {page_url}") - # Add a loop to handle "Please wait" pages for attempt in range(5): response = session.get(page_url, timeout=30) response.raise_for_status() @@ -103,17 +91,14 @@ def fetch_erome_data(url, logger): title = html.unescape(extr(page_content, 'property="og:title" content="', '"')) user = urllib.parse.unquote(extr(page_content, 'href="https://www.erome.com/', '"', default="unknown_user")) - # Sanitize title and user for folder creation sanitized_title = re.sub(r'[<>:"/\\|?*]', '_', title).strip() sanitized_user = re.sub(r'[<>:"/\\|?*]', '_', user).strip() album_folder_name = f"Erome - {sanitized_user} - {sanitized_title} [{album_id}]" urls = [] - # Split the page content by media groups to find all videos media_groups = page_content.split('
tag, fall back to data-src for images + for group in media_groups[1:]: video_url = extr(group, '