chore(route): use template for 18comic content (#12136)
This commit is contained in:
parent
e5401c5a7c
commit
0e87f8126b
|
|
@ -626,9 +626,9 @@ Sources
|
|||
|
||||
分类
|
||||
|
||||
| 全部 | 其他漫畫 | 同人 | 韓漫 | 美漫 | 短篇 | 單本 |
|
||||
| ---- | -------- | ------ | ------ | ------ | ----- | ------ |
|
||||
| all | another | doujin | hanman | meiman | short | single |
|
||||
| 全部 | 其他漫畫 | 同人 | 韓漫 | 美漫 | 短篇 | 单本 |
|
||||
| --- | ------- | ------ | ------ | ------ | ----- | ------ |
|
||||
| all | another | doujin | hanman | meiman | short | single |
|
||||
|
||||
时间范围
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,4 @@
|
|||
<p>{{ introduction }}</p>
|
||||
{{ each images image }}
|
||||
<img src="{{ image }}">
|
||||
{{ /each }}
|
||||
|
|
@ -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 = `<p>${content('#intro-block .p-t-5').text()}</p><img src="${content('.img_zoom_img img')
|
||||
.toArray()
|
||||
.map((image) => content(image).attr('data-original'))
|
||||
.join('"><img src="')}">`;
|
||||
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;
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in New Issue