jmcomic 2.6.0__tar.gz → 2.6.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {jmcomic-2.6.0/src/jmcomic.egg-info → jmcomic-2.6.1}/PKG-INFO +1 -1
- {jmcomic-2.6.0 → jmcomic-2.6.1}/src/jmcomic/__init__.py +1 -1
- {jmcomic-2.6.0 → jmcomic-2.6.1}/src/jmcomic/jm_client_impl.py +1 -1
- {jmcomic-2.6.0 → jmcomic-2.6.1}/src/jmcomic/jm_downloader.py +1 -1
- {jmcomic-2.6.0 → jmcomic-2.6.1}/src/jmcomic/jm_toolkit.py +11 -1
- {jmcomic-2.6.0 → jmcomic-2.6.1/src/jmcomic.egg-info}/PKG-INFO +1 -1
- {jmcomic-2.6.0 → jmcomic-2.6.1}/LICENSE +0 -0
- {jmcomic-2.6.0 → jmcomic-2.6.1}/README.md +0 -0
- {jmcomic-2.6.0 → jmcomic-2.6.1}/setup.cfg +0 -0
- {jmcomic-2.6.0 → jmcomic-2.6.1}/setup.py +0 -0
- {jmcomic-2.6.0 → jmcomic-2.6.1}/src/jmcomic/api.py +0 -0
- {jmcomic-2.6.0 → jmcomic-2.6.1}/src/jmcomic/cl.py +0 -0
- {jmcomic-2.6.0 → jmcomic-2.6.1}/src/jmcomic/jm_client_interface.py +0 -0
- {jmcomic-2.6.0 → jmcomic-2.6.1}/src/jmcomic/jm_config.py +0 -0
- {jmcomic-2.6.0 → jmcomic-2.6.1}/src/jmcomic/jm_entity.py +0 -0
- {jmcomic-2.6.0 → jmcomic-2.6.1}/src/jmcomic/jm_exception.py +0 -0
- {jmcomic-2.6.0 → jmcomic-2.6.1}/src/jmcomic/jm_option.py +0 -0
- {jmcomic-2.6.0 → jmcomic-2.6.1}/src/jmcomic/jm_plugin.py +0 -0
- {jmcomic-2.6.0 → jmcomic-2.6.1}/src/jmcomic.egg-info/SOURCES.txt +0 -0
- {jmcomic-2.6.0 → jmcomic-2.6.1}/src/jmcomic.egg-info/dependency_links.txt +0 -0
- {jmcomic-2.6.0 → jmcomic-2.6.1}/src/jmcomic.egg-info/entry_points.txt +0 -0
- {jmcomic-2.6.0 → jmcomic-2.6.1}/src/jmcomic.egg-info/requires.txt +0 -0
- {jmcomic-2.6.0 → jmcomic-2.6.1}/src/jmcomic.egg-info/top_level.txt +0 -0
|
@@ -294,7 +294,7 @@ class JmDownloader(DownloadCallback):
|
|
|
294
294
|
def __exit__(self, exc_type, exc_val, exc_tb):
|
|
295
295
|
if exc_type is not None:
|
|
296
296
|
jm_log('dler.exception',
|
|
297
|
-
f'{self.__class__.__name__} Exit with exception: {exc_type, exc_val}'
|
|
297
|
+
f'{self.__class__.__name__} Exit with exception: {exc_type, str(exc_val)}'
|
|
298
298
|
)
|
|
299
299
|
|
|
300
300
|
@classmethod
|
|
@@ -22,6 +22,7 @@ class JmcomicText:
|
|
|
22
22
|
pattern_html_photo_sort = compile(r'var sort = (\d+);')
|
|
23
23
|
pattern_html_photo_page_arr = compile(r'var page_arr = (.*?);')
|
|
24
24
|
|
|
25
|
+
pattern_html_b64_decode_content = compile(r'const html = base64DecodeUtf8\("(.*?)"\)')
|
|
25
26
|
pattern_html_album_album_id = compile(r'<span class="number">.*?:JM(\d+)</span>')
|
|
26
27
|
pattern_html_album_scramble_id = compile(r'var scramble_id = (\d+);')
|
|
27
28
|
pattern_html_album_name = compile(r'id="book-name"[^>]*?>([\s\S]*?)<')
|
|
@@ -106,6 +107,15 @@ class JmcomicText:
|
|
|
106
107
|
domain_ls
|
|
107
108
|
))
|
|
108
109
|
|
|
110
|
+
@classmethod
|
|
111
|
+
def parse_jm_base64_html(cls, resp_text: str) -> str:
|
|
112
|
+
from base64 import b64decode
|
|
113
|
+
html_b64 = PatternTool.match_or_default(resp_text, cls.pattern_html_b64_decode_content, None)
|
|
114
|
+
if html_b64 is None:
|
|
115
|
+
return resp_text
|
|
116
|
+
html = b64decode(html_b64).decode()
|
|
117
|
+
return html
|
|
118
|
+
|
|
109
119
|
@classmethod
|
|
110
120
|
def analyse_jm_photo_html(cls, html: str) -> JmPhotoDetail:
|
|
111
121
|
return cls.reflect_new_instance(
|
|
@@ -117,7 +127,7 @@ class JmcomicText:
|
|
|
117
127
|
@classmethod
|
|
118
128
|
def analyse_jm_album_html(cls, html: str) -> JmAlbumDetail:
|
|
119
129
|
return cls.reflect_new_instance(
|
|
120
|
-
html,
|
|
130
|
+
cls.parse_jm_base64_html(html),
|
|
121
131
|
"pattern_html_album_",
|
|
122
132
|
JmModuleConfig.album_class()
|
|
123
133
|
)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|