v2.6.3: 更新禁漫域名服务器地址,优化文档 (#455)
Some checks are pending
Auto Release & Publish / release (push) Waiting to run

This commit is contained in:
hect0x7 2025-07-17 00:53:59 +08:00
parent ede6817fa8
commit c4faf3afbb
7 changed files with 60 additions and 10 deletions

View File

@ -10,6 +10,9 @@ on:
jobs:
release:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
if: startsWith(github.event.head_commit.message, 'v')
steps:
- uses: actions/checkout@v4
@ -40,5 +43,5 @@ jobs:
- name: Release PYPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_JMCOMIC }}
# with:
# password: ${{ secrets.PYPI_JMCOMIC }}

View File

@ -165,7 +165,7 @@ jmcomic 123
## 使用小说明
* Python >= 3.7
* Python >= 3.7建议3.9以上因为jmcomic的依赖库可能会不支持3.9以下的版本。
* 个人项目文档和示例会有不及时之处可以Issue提问
## 项目文件夹介绍

View File

@ -126,6 +126,8 @@ client = JmOption.default().new_jm_client()
# 分页查询search_site就是禁漫网页上的【站内搜索】
page: JmSearchPage = client.search_site(search_query='+MANA +无修正', page=1)
print(f'结果总数: {page.total}, 分页大小: {page.page_size},页数: {page.page_count}')
# page默认的迭代方式是page.iter_id_title(),每次迭代返回 albun_id, title
for album_id, title in page:
print(f'[{album_id}]: {title}')
@ -168,10 +170,10 @@ from jmcomic import *
option = JmOption.default()
client = option.new_jm_client()
client.login('用户名', '密码') # 也可以使用login插件/配置cookies
client.login('用户名', '密码') # 也可以使用login插件/配置cookies
# 遍历全部收藏的所有页
for page in cl.favorite_folder_gen(): # 如果你只想获取特定收藏夹需要添加folder_id参数
for page in client.favorite_folder_gen(): # 如果你只想获取特定收藏夹需要添加folder_id参数
# 遍历每页结果
for aid, atitle in page.iter_id_title():
# aid: 本子的album_id
@ -183,9 +185,9 @@ for page in cl.favorite_folder_gen(): # 如果你只想获取特定收藏夹,
# 获取特定收藏夹的单页使用favorite_folder方法
page = client.favorite_folder(page=1,
order_by=JmMagicConstants.ORDER_BY_LATEST,
folder_id='0' # 收藏夹id
)
order_by=JmMagicConstants.ORDER_BY_LATEST,
folder_id='0' # 收藏夹id
)
```
## 分类 / 排行榜

44
pyproject.toml Normal file
View File

@ -0,0 +1,44 @@
[build-system]
requires = ["setuptools"]
[project]
name = "jmcomic"
authors = [{name = "hect0x7", email = "93357912+hect0x7@users.noreply.github.com"}]
description = "Python API For JMComic (禁漫天堂)"
readme = "README.md"
requires-python = ">=3.7"
license = {file = "LICENSE"}
keywords=['python', 'jmcomic', '18comic', '禁漫天堂', 'NSFW']
classifiers=[
"Development Status :: 4 - Beta",
"License :: OSI Approved :: MIT License",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Operating System :: MacOS",
"Operating System :: POSIX :: Linux",
"Operating System :: Microsoft :: Windows",
]
dependencies = [
"commonx>=0.6.38",
"curl-cffi",
"pillow",
"pycryptodome",
"pyyaml",
]
dynamic = ["version"]
[project.urls]
Homepage = "https://github.com/hect0x7/JMComic-Crawler-Python"
Documentation = "https://jmcomic.readthedocs.io"
[project.scripts]
jmcomic = "jmcomic.cl:main"
[tool.setuptools.dynamic]
version = {attr = "jmcomic.__version__"}

View File

@ -2,7 +2,7 @@
# 被依赖方 <--- 使用方
# config <--- entity <--- toolkit <--- client <--- option <--- downloader
__version__ = '2.6.2'
__version__ = '2.6.3'
from .api import *
from .jm_plugin import *

View File

@ -136,7 +136,7 @@ class JmModuleConfig:
''')
# 获取最新移动端API域名的地址
API_URL_DOMAIN_SERVER = f'{PROT}jmappc01-1308024008.cos.ap-guangzhou.myqcloud.com/server-2024.txt'
API_URL_DOMAIN_SERVER = f'{PROT}jmapp03-1308024008.cos.ap-jakarta.myqcloud.com/server-2024.txt'
APP_HEADERS_TEMPLATE = {
'Accept-Encoding': 'gzip, deflate',

View File

@ -17,6 +17,7 @@ class Test_Client(JmTestConfigurable):
def test_search(self):
page: JmSearchPage = self.client.search_tag('+无修正 +中文 -全彩')
print(f'总数: {page.total}, 分页大小: {page.page_size},页数: {page.page_count}')
if len(page) >= 1:
for aid, ainfo in page[0:1:1]: