Skip to content

Commit c4faf3a

Browse files
committed
v2.6.3: 更新禁漫域名服务器地址,优化文档 (#455)
1 parent ede6817 commit c4faf3a

File tree

7 files changed

+60
-10
lines changed

7 files changed

+60
-10
lines changed

.github/workflows/release_auto.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ on:
1010
jobs:
1111
release:
1212
runs-on: ubuntu-latest
13+
permissions:
14+
id-token: write
15+
contents: write
1316
if: startsWith(github.event.head_commit.message, 'v')
1417
steps:
1518
- uses: actions/checkout@v4
@@ -40,5 +43,5 @@ jobs:
4043
4144
- name: Release PYPI
4245
uses: pypa/gh-action-pypi-publish@release/v1
43-
with:
44-
password: ${{ secrets.PYPI_JMCOMIC }}
46+
# with:
47+
# password: ${{ secrets.PYPI_JMCOMIC }}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ jmcomic 123
165165

166166
## 使用小说明
167167

168-
* Python >= 3.7
168+
* Python >= 3.7,建议3.9以上,因为jmcomic的依赖库可能会不支持3.9以下的版本。
169169
* 个人项目,文档和示例会有不及时之处,可以Issue提问
170170

171171
## 项目文件夹介绍

assets/docs/sources/tutorial/0_common_usage.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,8 @@ client = JmOption.default().new_jm_client()
126126

127127
# 分页查询,search_site就是禁漫网页上的【站内搜索】
128128
page: JmSearchPage = client.search_site(search_query='+MANA +无修正', page=1)
129+
print(f'结果总数: {page.total}, 分页大小: {page.page_size},页数: {page.page_count}')
130+
129131
# page默认的迭代方式是page.iter_id_title(),每次迭代返回 albun_id, title
130132
for album_id, title in page:
131133
print(f'[{album_id}]: {title}')
@@ -168,10 +170,10 @@ from jmcomic import *
168170

169171
option = JmOption.default()
170172
client = option.new_jm_client()
171-
client.login('用户名', '密码') # 也可以使用login插件/配置cookies
173+
client.login('用户名', '密码') # 也可以使用login插件/配置cookies
172174

173175
# 遍历全部收藏的所有页
174-
for page in cl.favorite_folder_gen(): # 如果你只想获取特定收藏夹,需要添加folder_id参数
176+
for page in client.favorite_folder_gen(): # 如果你只想获取特定收藏夹,需要添加folder_id参数
175177
# 遍历每页结果
176178
for aid, atitle in page.iter_id_title():
177179
# aid: 本子的album_id
@@ -183,9 +185,9 @@ for page in cl.favorite_folder_gen(): # 如果你只想获取特定收藏夹,
183185

184186
# 获取特定收藏夹的单页,使用favorite_folder方法
185187
page = client.favorite_folder(page=1,
186-
order_by=JmMagicConstants.ORDER_BY_LATEST,
187-
folder_id='0' # 收藏夹id
188-
)
188+
order_by=JmMagicConstants.ORDER_BY_LATEST,
189+
folder_id='0' # 收藏夹id
190+
)
189191
```
190192

191193
## 分类 / 排行榜

pyproject.toml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
[build-system]
2+
requires = ["setuptools"]
3+
4+
[project]
5+
name = "jmcomic"
6+
authors = [{name = "hect0x7", email = "[email protected]"}]
7+
description = "Python API For JMComic (禁漫天堂)"
8+
readme = "README.md"
9+
requires-python = ">=3.7"
10+
license = {file = "LICENSE"}
11+
keywords=['python', 'jmcomic', '18comic', '禁漫天堂', 'NSFW']
12+
classifiers=[
13+
"Development Status :: 4 - Beta",
14+
"License :: OSI Approved :: MIT License",
15+
"Intended Audience :: Developers",
16+
"Programming Language :: Python :: 3.7",
17+
"Programming Language :: Python :: 3.8",
18+
"Programming Language :: Python :: 3.9",
19+
"Programming Language :: Python :: 3.10",
20+
"Programming Language :: Python :: 3.11",
21+
"Programming Language :: Python :: 3.12",
22+
"Programming Language :: Python :: 3.13",
23+
"Operating System :: MacOS",
24+
"Operating System :: POSIX :: Linux",
25+
"Operating System :: Microsoft :: Windows",
26+
]
27+
dependencies = [
28+
"commonx>=0.6.38",
29+
"curl-cffi",
30+
"pillow",
31+
"pycryptodome",
32+
"pyyaml",
33+
]
34+
dynamic = ["version"]
35+
36+
[project.urls]
37+
Homepage = "https://github.com/hect0x7/JMComic-Crawler-Python"
38+
Documentation = "https://jmcomic.readthedocs.io"
39+
40+
[project.scripts]
41+
jmcomic = "jmcomic.cl:main"
42+
43+
[tool.setuptools.dynamic]
44+
version = {attr = "jmcomic.__version__"}

src/jmcomic/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# 被依赖方 <--- 使用方
33
# config <--- entity <--- toolkit <--- client <--- option <--- downloader
44

5-
__version__ = '2.6.2'
5+
__version__ = '2.6.3'
66

77
from .api import *
88
from .jm_plugin import *

src/jmcomic/jm_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ class JmModuleConfig:
136136
''')
137137

138138
# 获取最新移动端API域名的地址
139-
API_URL_DOMAIN_SERVER = f'{PROT}jmappc01-1308024008.cos.ap-guangzhou.myqcloud.com/server-2024.txt'
139+
API_URL_DOMAIN_SERVER = f'{PROT}jmapp03-1308024008.cos.ap-jakarta.myqcloud.com/server-2024.txt'
140140

141141
APP_HEADERS_TEMPLATE = {
142142
'Accept-Encoding': 'gzip, deflate',

tests/test_jmcomic/test_jm_client.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ def test_fetch_album(self):
1717

1818
def test_search(self):
1919
page: JmSearchPage = self.client.search_tag('+无修正 +中文 -全彩')
20+
print(f'总数: {page.total}, 分页大小: {page.page_size},页数: {page.page_count}')
2021

2122
if len(page) >= 1:
2223
for aid, ainfo in page[0:1:1]:

0 commit comments

Comments
 (0)