mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-09-24 23:12:34 +08:00
@@ -90,6 +90,10 @@
|
||||
|
||||
<Route name="Anitama Channel" author="ranpox" path="/anitama/:channel?" example="/anitama" :paramsDesc="['频道id,从频道的地址栏中查看']"/>
|
||||
|
||||
## 鼠绘漫画
|
||||
|
||||
<Route name="鼠绘漫画" author="zytomorrow" path="/shuhui/comics/:id" example="/shuhui/comics/1" :paramsDesc="['漫画id,漫画主页的地址栏中最后一位数字']"/>
|
||||
|
||||
## 嘀哩嘀哩-dilidili
|
||||
|
||||
<Route name="嘀哩嘀哩番剧更新" author="SunShinenny" path="/dilidili/fanju/:id?" example="/dilidili/fanju/onepunchman2" :paramsDesc="['番剧id,打开对应番剧,从url中最后一位查看']"/>
|
||||
|
||||
@@ -1321,6 +1321,9 @@ router.get('/gradcafe/result', require('./routes/gradcafe/result'));
|
||||
// The Economist
|
||||
router.get('/the-economist/gre-vocabulary', require('./routes/the-economist/gre-vocabulary'));
|
||||
|
||||
// 鼠绘漫画
|
||||
router.get('/shuhui/comics/:id', require('./routes/shuhui/comics'));
|
||||
|
||||
// 朝日新聞中文網
|
||||
router.get('/asahichinese-f/:category/:subCate', require('./routes/asahichinese-f/index'));
|
||||
router.get('/asahichinese-f/:category', require('./routes/asahichinese-f/index'));
|
||||
|
||||
@@ -0,0 +1,92 @@
|
||||
const axios = require('../../utils/axios');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const id = ctx.params.id;
|
||||
|
||||
let lastEpisodeId;
|
||||
const rssData = await axios({
|
||||
method: 'get',
|
||||
url: `https://prod-api.ishuhui.com/ver/67715120/anime/detail?id=${id}&type=comics&.json`,
|
||||
headers: {
|
||||
Origin: 'https://www.ishuhui.com',
|
||||
Referer: `https://www.ishuhui.com/comics/anime/${id}`,
|
||||
},
|
||||
}).then(function(response) {
|
||||
// 漫画名
|
||||
const name = response.data.data.name;
|
||||
// 漫画描述
|
||||
const desc = response.data.data.desc;
|
||||
|
||||
const episodeGroup = response.data.data.comicsIndexes['1'].nums;
|
||||
let lastGroup = '0';
|
||||
for (const key in episodeGroup) {
|
||||
if (parseInt(lastGroup.split('-')[0]) < parseInt(key.split('-')[0])) {
|
||||
lastGroup = key;
|
||||
}
|
||||
}
|
||||
|
||||
// 找到最新章节组
|
||||
let lastEpisode = '-1';
|
||||
for (const group in episodeGroup[lastGroup]) {
|
||||
if (parseInt(lastEpisode) < parseInt(group)) {
|
||||
lastEpisode = group;
|
||||
}
|
||||
}
|
||||
|
||||
// 最新章节id
|
||||
lastEpisodeId = episodeGroup[lastGroup][lastEpisode][0].id;
|
||||
|
||||
return {
|
||||
name,
|
||||
desc,
|
||||
};
|
||||
});
|
||||
|
||||
let description = '';
|
||||
const data = await axios({
|
||||
method: 'get',
|
||||
url: `https://prod-api.ishuhui.com/comics/detail?id=${lastEpisodeId}`,
|
||||
headers: {
|
||||
Origin: 'https://www.ishuhui.com',
|
||||
Referer: `https://www.ishuhui.com/comics/detail/${lastEpisodeId}`,
|
||||
},
|
||||
}).then(function(response) {
|
||||
const picUrlArray = response.data.data.contentImg;
|
||||
const rssTitle = response.data.data.animeName;
|
||||
const title = response.data.data.title;
|
||||
const index = response.data.data.numberEnd;
|
||||
const updateTime = response.data.data.updateTime;
|
||||
for (let i = 0; i < picUrlArray.length; i++) {
|
||||
description += `<img referrerpolicy="no-referrer" src="${picUrlArray[i].url}"><br>`;
|
||||
}
|
||||
|
||||
const item = {
|
||||
rssTitle,
|
||||
title,
|
||||
description,
|
||||
index,
|
||||
updateTime,
|
||||
};
|
||||
return [item];
|
||||
});
|
||||
|
||||
ctx.state.data = {
|
||||
// 源标题
|
||||
title: `${rssData.name}`,
|
||||
// 源链接
|
||||
link: `https://www.ishuhui.com/comics/anime/${id}`,
|
||||
// 源说明
|
||||
description: `${rssData.desc}`,
|
||||
// 遍历此前获取的数据
|
||||
item: data.map((item) => ({
|
||||
// 文章标题
|
||||
title: `第${item.index}话-${item.title}`,
|
||||
// 文章正文
|
||||
description: item.description,
|
||||
// 文章发布时间
|
||||
pubDate: new Date(item.updateTime).toUTCString(),
|
||||
// 文章链接
|
||||
link: `http://www.hanhuazu.cc/comics/detail/${lastEpisodeId}`,
|
||||
})),
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user