Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/jmcomic/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# 被依赖方 <--- 使用方
# config <--- entity <--- toolkit <--- client <--- option <--- downloader

__version__ = '2.6.13'
__version__ = '2.6.14'

from .api import *
from .jm_plugin import *
Expand Down
4 changes: 2 additions & 2 deletions src/jmcomic/jm_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,15 @@ class JmMagicConstants:
APP_TOKEN_SECRET_2 = '18comicAPPContent'
APP_DATA_SECRET = '185Hcomic3PAPP7R'
API_DOMAIN_SERVER_SECRET = 'diosfjckwpqpdfjkvnqQjsik'
APP_VERSION = '2.0.16'
APP_VERSION = '2.0.18'


# 模块级别共用配置
class JmModuleConfig:
# 网站相关
PROT = "https://"
JM_REDIRECT_URL = f'{PROT}jm365.work/3YeBdF' # 永久網域,怕走失的小伙伴收藏起来
JM_PUB_URL = f'{PROT}jmcomic-fb.vip'
JM_PUB_URL = f'{PROT}jmcomicgo.org'
JM_CDN_IMAGE_URL_TEMPLATE = PROT + 'cdn-msp.{domain}/media/photos/{photo_id}/{index:05}{suffix}' # index 从1开始
JM_IMAGE_SUFFIX = ['.jpg', '.webp', '.png', '.gif']

Expand Down
10 changes: 6 additions & 4 deletions tests/test_jmcomic/__init__.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
import io
import platform
import unittest

# noinspection PyUnresolvedReferences
import jmcomic
from jmcomic import *

# set encoding
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, 'utf-8')
sys.stderr = io.TextIOWrapper(sys.stderr.buffer, 'utf-8')
# 设置编码为 utf-8,使用 reconfigure() 而非替换 sys.stdout 对象
# 直接替换会破坏 pytest 的 I/O 捕获机制,导致 "I/O operation on closed file" 错误
if hasattr(sys.stdout, 'reconfigure'):
sys.stdout.reconfigure(encoding='utf-8')
if hasattr(sys.stderr, 'reconfigure'):
sys.stderr.reconfigure(encoding='utf-8')
# 获取项目根目录
project_dir = os.path.abspath(os.path.dirname(__file__) + '/../..')
os.chdir(project_dir)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_jmcomic/test_jm_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def search_and_test(expected_result, params):
cases = {
152637: {
'search_query': '无修正',
'order_by': JmMagicConstants.ORDER_BY_LIKE,
'order_by': JmMagicConstants.ORDER_BY_VIEW,
'time': JmMagicConstants.TIME_ALL,
},
147643: {
Expand Down
Loading