-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMangaParser.py
55 lines (42 loc) · 1.93 KB
/
MangaParser.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
from Source.Core.Formats.Manga import Chapter, Branch, Manga
from .BaseParser import *
#==========================================================================================#
# >>>>> ОПРЕДЕЛЕНИЯ <<<<< #
#==========================================================================================#
TYPE = Manga
#==========================================================================================#
# >>>>> ОСНОВНОЙ КЛАСС <<<<< #
#==========================================================================================#
class MangaParser(BaseParser):
"""Базовый парсер манги."""
#==========================================================================================#
# >>>>> ПУБЛИЧНЫЕ МЕТОДЫ <<<<< #
#==========================================================================================#
def __init__(self, system_objects: SystemObjects, title: Manga | None = None):
"""
Базовый парсер манги.
system_objects – коллекция системных объектов;\n
title – данные тайтла.
"""
#---> Генерация динамических атрибутов.
#==========================================================================================#
self._SystemObjects = system_objects
self._Title = title
self._Temper = self._SystemObjects.temper
self._Portals = self._SystemObjects.logger.portals
self._Settings = self._SystemObjects.manager.get_parser_settings()
self._Requestor = self._InitializeRequestor()
self._PostInitMethod()
def amend(self, branch: Branch, chapter: Chapter):
"""
Дополняет главу дайными о слайдах.
branch – данные ветви;\n
chapter – данные главы.
"""
pass
def set_title(self, title: Manga):
"""
Задаёт данные тайтла.
title – данные тайтла.
"""
self._Title = title