mirror of
https://github.com/hect0x7/JMComic-Crawler-Python.git
synced 2025-09-26 22:31:30 +08:00
优化GitHub Actions工作流 (#156)
This commit is contained in:
parent
f4493cb5cd
commit
f2c255e061
1
.github/workflows/download.yml
vendored
1
.github/workflows/download.yml
vendored
@ -41,7 +41,6 @@ jobs:
|
||||
pip install -e ./
|
||||
|
||||
- name: 运行下载脚本
|
||||
continue-on-error: true
|
||||
run: |
|
||||
cd ./usage/
|
||||
python workflow_download.py
|
||||
|
16
.github/workflows/download_dispatch.yml
vendored
16
.github/workflows/download_dispatch.yml
vendored
@ -13,15 +13,21 @@ on:
|
||||
description: 章节id(单独下载章节,多个id同上)
|
||||
required: false
|
||||
|
||||
DIR_RULE:
|
||||
CLIENT_IMPL:
|
||||
type: string
|
||||
description: 下载文件夹规则(dir_rule.rule)。此处可以不填,默认使用配置文件的'Bd_Aauthor_Atitle_Pindex'。
|
||||
description: 客户端类型(client.impl),[api]=移动端,[html]=网页端。
|
||||
default: 'api'
|
||||
required: false
|
||||
|
||||
IMAGE_SUFFIX:
|
||||
type: string
|
||||
description: 图片后缀(download.cache.suffix),默认为空,表示不做图片格式转换。可填入例如 "png" "jpg"。
|
||||
default: ''
|
||||
required: false
|
||||
|
||||
CLIENT_IMPL:
|
||||
DIR_RULE:
|
||||
type: string
|
||||
description: 客户端类型(client.impl),[api]=移动端,[html]=网页端,此处可以不填,默认使用'html'。如果你发现默认的下载不了,可以填api试试。
|
||||
description: 下载文件夹规则(dir_rule.rule)。此处可以不填,默认使用配置文件的'Bd_Aauthor_Atitle_Pindex'。
|
||||
default: ''
|
||||
required: false
|
||||
|
||||
@ -61,6 +67,7 @@ jobs:
|
||||
CLIENT_IMPL: ${{ github.event.inputs.CLIENT_IMPL }}
|
||||
ZIP_NAME: ${{ github.event.inputs.ZIP_NAME }}
|
||||
UPLOAD_NAME: ${{ github.event.inputs.UPLOAD_NAME }}
|
||||
IMAGE_SUFFIX: ${{ github.event.inputs.IMAGE_SUFFIX }}
|
||||
# secrets
|
||||
JM_USERNAME: ${{ secrets.JM_USERNAME }}
|
||||
JM_PASSWORD: ${{ secrets.JM_PASSWORD }}
|
||||
@ -90,7 +97,6 @@ jobs:
|
||||
pip install -e ./
|
||||
|
||||
- name: 运行下载脚本
|
||||
continue-on-error: true
|
||||
run: |
|
||||
cd ./usage/
|
||||
python workflow_download.py
|
||||
|
@ -1,12 +1,7 @@
|
||||
from jmcomic import *
|
||||
from jmcomic.cl import get_env, JmcomicUI
|
||||
|
||||
# 下方填入你要下载的本子的id,一行一个。
|
||||
# 每行的首尾可以有空白字符
|
||||
# 你也可以填入本子网址,程序会识别出本子id
|
||||
# 例如:
|
||||
# [https://18comic.vip/album/452859/mana-ディシア-1-原神-中国語-無修正] -> [452859]
|
||||
#
|
||||
# 下方填入你要下载的本子的id,一行一个,每行的首尾可以有空白字符
|
||||
jm_albums = '''
|
||||
|
||||
|
||||
@ -17,6 +12,7 @@ jm_albums = '''
|
||||
jm_photos = '''
|
||||
|
||||
|
||||
|
||||
'''
|
||||
|
||||
|
||||
@ -68,11 +64,10 @@ def cover_option_config(option: JmOption):
|
||||
impl = get_env('CLIENT_IMPL', None)
|
||||
if impl is not None:
|
||||
option.client.impl = impl
|
||||
else:
|
||||
impl = option.client.impl
|
||||
|
||||
if impl == 'api':
|
||||
option.client.domain = JmModuleConfig.DOMAIN_API_LIST
|
||||
suffix = get_env('IMAGE_SUFFIX', None)
|
||||
if suffix is not None:
|
||||
option.download.image.suffix = fix_suffix(suffix)
|
||||
|
||||
|
||||
def login_if_configured(option):
|
||||
|
Loading…
Reference in New Issue
Block a user