diff --git a/docs/anime.md b/docs/anime.md index 76935e9ca5..019847883f 100644 --- a/docs/anime.md +++ b/docs/anime.md @@ -626,9 +626,9 @@ Sources 分类 -| 全部 | 其他漫畫 | 同人 | 韓漫 | 美漫 | 短篇 | 單本 | -| ---- | -------- | ------ | ------ | ------ | ----- | ------ | -| all | another | doujin | hanman | meiman | short | single | +| 全部 | 其他漫畫 | 同人 | 韓漫 | 美漫 | 短篇 | 单本 | +| --- | ------- | ------ | ------ | ------ | ----- | ------ | +| all | another | doujin | hanman | meiman | short | single | 时间范围 diff --git a/lib/v2/18comic/templates/description.art b/lib/v2/18comic/templates/description.art new file mode 100644 index 0000000000..d434d8f998 --- /dev/null +++ b/lib/v2/18comic/templates/description.art @@ -0,0 +1,4 @@ +

{{ introduction }}

+{{ each images image }} + +{{ /each }} \ No newline at end of file diff --git a/lib/v2/18comic/utils.js b/lib/v2/18comic/utils.js index 598fd7bed5..829090d096 100644 --- a/lib/v2/18comic/utils.js +++ b/lib/v2/18comic/utils.js @@ -1,6 +1,8 @@ const got = require('@/utils/got'); const cheerio = require('cheerio'); const { parseDate } = require('@/utils/parse-date'); +const { art } = require('@/utils/render'); +const path = require('path'); const rootUrl = 'https://jmcomic.me'; // list of address: https://jmcomic1.bet @@ -46,10 +48,12 @@ module.exports = { .toArray() .map((a) => $(a).text()) .join(', '); - item.description = `

${content('#intro-block .p-t-5').text()}

`; + item.description = art(path.join(__dirname, 'templates/description.art'), { + introduction: content('#intro-block .p-t-5').text(), + images: content('.img_zoom_img img') + .toArray() + .map((image) => content(image).attr('data-original')), + }); return item; })