jmcomic 2.6.0__py3-none-any.whl → 2.6.1__py3-none-any.whl

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/__init__.py CHANGED
@@ -2,7 +2,7 @@
2
2
  # 被依赖方 <--- 使用方
3
3
  # config <--- entity <--- toolkit <--- client <--- option <--- downloader
4
4
 
5
- __version__ = '2.6.0'
5
+ __version__ = '2.6.1'
6
6
 
7
7
  from .api import *
8
8
  from .jm_plugin import *
jmcomic/jm_client_impl.py CHANGED
@@ -431,7 +431,7 @@ class JmHtmlClient(AbstractJmClient):
431
431
  params={
432
432
  'page': page,
433
433
  'o': order_by,
434
- 'folder_id': folder_id,
434
+ 'folder': folder_id,
435
435
  }
436
436
  )
437
437
 
jmcomic/jm_downloader.py CHANGED
@@ -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
jmcomic/jm_toolkit.py CHANGED
@@ -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
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: jmcomic
3
- Version: 2.6.0
3
+ Version: 2.6.1
4
4
  Summary: Python API For JMComic (禁漫天堂)
5
5
  Home-page: https://github.com/hect0x7/JMComic-Crawler-Python
6
6
  Author: hect0x7
@@ -1,18 +1,18 @@
1
- jmcomic/__init__.py,sha256=vA2i9PVvDB_Ea_fk-0frPv_mjXqUMS5QOsftQOBGj74,902
1
+ jmcomic/__init__.py,sha256=Sha2lY8fQXIBQ6vBJ7HFECeakKmQ2U4-v5e7we5N7x0,902
2
2
  jmcomic/api.py,sha256=ZduhXDmh4lg1dkXHs7UTAaPpYNO7kcdPCDH5JJT9KSI,4253
3
3
  jmcomic/cl.py,sha256=PBSh0JndNFZw3B7WJPj5Y8SeFdKzHE00jIwYo9An-K0,3475
4
- jmcomic/jm_client_impl.py,sha256=nzKOSGg0mCno9OWfcIPoF2SsOd_GQY_0nFUaMrMMJW8,41627
4
+ jmcomic/jm_client_impl.py,sha256=wj1RF9uSgDciE_6V9z2s_04MOP1y4axoJDkvhDDmCkM,41624
5
5
  jmcomic/jm_client_interface.py,sha256=Bld80cYwBwIqcMSJK09g5q8U_UX3IWnQJxuRJQwmIOk,19082
6
6
  jmcomic/jm_config.py,sha256=2airaTXejmeSoow5cUBgHsPmmFA4m8MlqIHmT8OvWWA,17147
7
- jmcomic/jm_downloader.py,sha256=6w9D7eoL2M85-ScH745-OZBvaC0uwGkHi6awTUzq-3E,11036
7
+ jmcomic/jm_downloader.py,sha256=azYkIN-1OuEivZ1TGGDaYo1FkcO5KatSb0g4GVdKSPY,11041
8
8
  jmcomic/jm_entity.py,sha256=x-3yUvM74C_Gof20mJw2SmZq7sSSsGNg0Cp47oZ-dFg,19968
9
9
  jmcomic/jm_exception.py,sha256=x3KGMLlQS2zi1GX7z5G58zJN2EwLkI4mAURkxZYjEvA,5055
10
10
  jmcomic/jm_option.py,sha256=GijXHBDXNUt4oh_6th7TsT2gj4tBJjPLQfwPPNHyTlU,21247
11
11
  jmcomic/jm_plugin.py,sha256=M-f7xty_90d3mSYmzrXSpYdua-KEBQVzGcWip1OA5gc,40345
12
- jmcomic/jm_toolkit.py,sha256=zYwBny0Uqe1SXn2ZoLJfss4aWZq5KzTSeBKK7mQf810,29128
13
- jmcomic-2.6.0.dist-info/licenses/LICENSE,sha256=kz4coTxZxuGxisK3W00tjK57Zh3RcMGq-EnbXrK7-xA,1064
14
- jmcomic-2.6.0.dist-info/METADATA,sha256=aeRjLf2ds6Z465Q7EiA2F1lH_Eiy83BwQ_sl_vH1tUA,8199
15
- jmcomic-2.6.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
16
- jmcomic-2.6.0.dist-info/entry_points.txt,sha256=tRbQltaGSBjejI0c9jYt-4SXQMd5nSDHcMvHmuTy4ow,44
17
- jmcomic-2.6.0.dist-info/top_level.txt,sha256=puvVMFYJqIbd6NOTMEvOyugMTT8woBfSQyxEBan3zY4,8
18
- jmcomic-2.6.0.dist-info/RECORD,,
12
+ jmcomic/jm_toolkit.py,sha256=C5z7ddhacDW-WgOm-ruPshxModKwDPUczdUjUdEI9CQ,29582
13
+ jmcomic-2.6.1.dist-info/licenses/LICENSE,sha256=kz4coTxZxuGxisK3W00tjK57Zh3RcMGq-EnbXrK7-xA,1064
14
+ jmcomic-2.6.1.dist-info/METADATA,sha256=lTEJdtHFx129ApiSn-2q9JejcPb3VcXydnK5DLqratM,8199
15
+ jmcomic-2.6.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
16
+ jmcomic-2.6.1.dist-info/entry_points.txt,sha256=tRbQltaGSBjejI0c9jYt-4SXQMd5nSDHcMvHmuTy4ow,44
17
+ jmcomic-2.6.1.dist-info/top_level.txt,sha256=puvVMFYJqIbd6NOTMEvOyugMTT8woBfSQyxEBan3zY4,8
18
+ jmcomic-2.6.1.dist-info/RECORD,,