jmcomic 2.5.28__tar.gz → 2.5.30__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.
Files changed (23) hide show
  1. {jmcomic-2.5.28/src/jmcomic.egg-info → jmcomic-2.5.30}/PKG-INFO +12 -2
  2. {jmcomic-2.5.28 → jmcomic-2.5.30}/src/jmcomic/__init__.py +1 -1
  3. {jmcomic-2.5.28 → jmcomic-2.5.30}/src/jmcomic/jm_client_impl.py +3 -0
  4. {jmcomic-2.5.28 → jmcomic-2.5.30}/src/jmcomic/jm_config.py +1 -1
  5. {jmcomic-2.5.28 → jmcomic-2.5.30}/src/jmcomic/jm_entity.py +1 -1
  6. {jmcomic-2.5.28 → jmcomic-2.5.30}/src/jmcomic/jm_option.py +1 -1
  7. {jmcomic-2.5.28 → jmcomic-2.5.30}/src/jmcomic/jm_toolkit.py +3 -2
  8. {jmcomic-2.5.28 → jmcomic-2.5.30/src/jmcomic.egg-info}/PKG-INFO +12 -2
  9. {jmcomic-2.5.28 → jmcomic-2.5.30}/LICENSE +0 -0
  10. {jmcomic-2.5.28 → jmcomic-2.5.30}/README.md +0 -0
  11. {jmcomic-2.5.28 → jmcomic-2.5.30}/setup.cfg +0 -0
  12. {jmcomic-2.5.28 → jmcomic-2.5.30}/setup.py +0 -0
  13. {jmcomic-2.5.28 → jmcomic-2.5.30}/src/jmcomic/api.py +0 -0
  14. {jmcomic-2.5.28 → jmcomic-2.5.30}/src/jmcomic/cl.py +0 -0
  15. {jmcomic-2.5.28 → jmcomic-2.5.30}/src/jmcomic/jm_client_interface.py +0 -0
  16. {jmcomic-2.5.28 → jmcomic-2.5.30}/src/jmcomic/jm_downloader.py +0 -0
  17. {jmcomic-2.5.28 → jmcomic-2.5.30}/src/jmcomic/jm_exception.py +0 -0
  18. {jmcomic-2.5.28 → jmcomic-2.5.30}/src/jmcomic/jm_plugin.py +0 -0
  19. {jmcomic-2.5.28 → jmcomic-2.5.30}/src/jmcomic.egg-info/SOURCES.txt +0 -0
  20. {jmcomic-2.5.28 → jmcomic-2.5.30}/src/jmcomic.egg-info/dependency_links.txt +0 -0
  21. {jmcomic-2.5.28 → jmcomic-2.5.30}/src/jmcomic.egg-info/entry_points.txt +0 -0
  22. {jmcomic-2.5.28 → jmcomic-2.5.30}/src/jmcomic.egg-info/requires.txt +0 -0
  23. {jmcomic-2.5.28 → jmcomic-2.5.30}/src/jmcomic.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: jmcomic
3
- Version: 2.5.28
3
+ Version: 2.5.30
4
4
  Summary: Python API For JMComic (禁漫天堂)
5
5
  Home-page: https://github.com/hect0x7/JMComic-Crawler-Python
6
6
  Author: hect0x7
@@ -25,6 +25,16 @@ Requires-Dist: commonX
25
25
  Requires-Dist: PyYAML
26
26
  Requires-Dist: Pillow
27
27
  Requires-Dist: pycryptodome
28
+ Dynamic: author
29
+ Dynamic: author-email
30
+ Dynamic: classifier
31
+ Dynamic: description
32
+ Dynamic: description-content-type
33
+ Dynamic: home-page
34
+ Dynamic: keywords
35
+ Dynamic: requires-dist
36
+ Dynamic: requires-python
37
+ Dynamic: summary
28
38
 
29
39
  # Python API For JMComic (禁漫天堂)
30
40
 
@@ -2,7 +2,7 @@
2
2
  # 被依赖方 <--- 使用方
3
3
  # config <--- entity <--- toolkit <--- client <--- option <--- downloader
4
4
 
5
- __version__ = '2.5.28'
5
+ __version__ = '2.5.30'
6
6
 
7
7
  from .api import *
8
8
  from .jm_plugin import *
@@ -709,6 +709,9 @@ class JmApiClient(AbstractJmClient):
709
709
  })
710
710
  )
711
711
 
712
+ if resp.res_data.get('name') is None:
713
+ ExceptionTool.raise_missing(resp, jmid)
714
+
712
715
  return JmApiAdaptTool.parse_entity(resp.res_data, clazz)
713
716
 
714
717
  def fetch_scramble_id(self, photo_id):
@@ -76,7 +76,7 @@ class JmMagicConstants:
76
76
  APP_TOKEN_SECRET = '18comicAPP'
77
77
  APP_TOKEN_SECRET_2 = '18comicAPPContent'
78
78
  APP_DATA_SECRET = '185Hcomic3PAPP7R'
79
- APP_VERSION = '1.7.5'
79
+ APP_VERSION = '1.7.6'
80
80
 
81
81
 
82
82
  # 模块级别共用配置
@@ -443,7 +443,7 @@ class JmAlbumDetail(DetailEntity, Downloadable):
443
443
  super().__init__()
444
444
  self.album_id: str = str(album_id)
445
445
  self.scramble_id: str = str(scramble_id)
446
- self.name: str = name
446
+ self.name: str = str(name).strip()
447
447
  self.page_count: int = int(page_count) # 总页数
448
448
  self.pub_date: str = pub_date # 发布日期
449
449
  self.update_date: str = update_date # 更新日期
@@ -159,7 +159,7 @@ class DirRule:
159
159
  return None
160
160
 
161
161
  def solve_func(detail):
162
- return fix_windir_name(str(DetailEntity.get_dirname(detail, rule[1:])))
162
+ return fix_windir_name(str(DetailEntity.get_dirname(detail, rule[1:]))).strip()
163
163
 
164
164
  return rule[0], solve_func, rule
165
165
 
@@ -25,7 +25,7 @@ class JmcomicText:
25
25
  pattern_html_album_album_id = compile(r'<span class="number">.*?:JM(\d+)</span>')
26
26
  pattern_html_album_scramble_id = compile(r'var scramble_id = (\d+);')
27
27
  pattern_html_album_name = compile(r'<h1 class="book-name" id="book-name">([\s\S]*?)</h1>')
28
- pattern_html_album_episode_list = compile(r'data-album="(\d+)"\s*?>\s*?<li.*?>\s*?第(\d+)話([\s\S]*?)<[\s\S]*?>(\d+-\d+-\d+).*?')
28
+ pattern_html_album_episode_list = compile(r'data-album="(\d+)"[^>]*>\s*?<li.*?>\s*?第(\d+)話([\s\S]*?)<[\s\S]*?>(\d+-\d+-\d+).*?')
29
29
  pattern_html_album_page_count = compile(r'<span class="pagecount">.*?:(\d+)</span>')
30
30
  pattern_html_album_pub_date = compile(r'>上架日期 : (.*?)</span>')
31
31
  pattern_html_album_update_date = compile(r'>更新日期 : (.*?)</span>')
@@ -329,7 +329,8 @@ class JmcomicText:
329
329
  limit = JmModuleConfig.VAR_FILE_NAME_LENGTH_LIMIT
330
330
  jm_log('error', f'目录名过长,无法创建目录,强制缩短到{limit}个字符并重试')
331
331
  save_dir = save_dir[0:limit]
332
- mkdir_if_not_exists(save_dir)
332
+ return cls.try_mkdir(save_dir)
333
+ raise e
333
334
  return save_dir
334
335
 
335
336
 
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: jmcomic
3
- Version: 2.5.28
3
+ Version: 2.5.30
4
4
  Summary: Python API For JMComic (禁漫天堂)
5
5
  Home-page: https://github.com/hect0x7/JMComic-Crawler-Python
6
6
  Author: hect0x7
@@ -25,6 +25,16 @@ Requires-Dist: commonX
25
25
  Requires-Dist: PyYAML
26
26
  Requires-Dist: Pillow
27
27
  Requires-Dist: pycryptodome
28
+ Dynamic: author
29
+ Dynamic: author-email
30
+ Dynamic: classifier
31
+ Dynamic: description
32
+ Dynamic: description-content-type
33
+ Dynamic: home-page
34
+ Dynamic: keywords
35
+ Dynamic: requires-dist
36
+ Dynamic: requires-python
37
+ Dynamic: summary
28
38
 
29
39
  # Python API For JMComic (禁漫天堂)
30
40
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes