Add MangaLib source

This commit is contained in:
2026-05-02 20:03:21 +03:00
parent bc7b5bfe37
commit ebc1825794
11 changed files with 1508 additions and 491 deletions

View File

@@ -8,6 +8,13 @@ from typing import Optional, Protocol, runtime_checkable
from playwright.async_api import Page
class AuthRequiredError(Exception):
"""Источник требует авторизации — токен не задан или просрочен."""
def __init__(self, source_slug: str):
self.source_slug = source_slug
super().__init__(f"Auth required for source: {source_slug}")
# ──────────────────────────────────────────────
# Модели данных (общие для всех источников)
# ──────────────────────────────────────────────
@@ -30,6 +37,8 @@ class MangaInfo:
title_full: str = ""
description: str = ""
genres: list[str] = field(default_factory=list)
tags: list[str] = field(default_factory=list)
cover_url: str = ""
# ──────────────────────────────────────────────