feat: 增加对色花堂类型筛选的支持 (#3585)
This commit is contained in:
parent
bb7192911b
commit
818f6ebd71
|
|
@ -292,7 +292,7 @@ pageClass: routes
|
|||
|
||||
### 原创 BT 电影
|
||||
|
||||
<Route author="qiwihui junfengP" example="/dsndsht23" path="/dsndsht23/:subforumid?" supportBT="1" :paramsDesc="['版块 id, 为空默认高清中文字幕']">
|
||||
<Route author="qiwihui junfengP" example="/dsndsht23/36/368" path="/dsndsht23/:subforumid?/:type?" supportBT="1" :paramsDesc="['版块 id 或板块名称(见下表), 为空默认高清中文字幕', '类型 id, 可在分区类型过滤后的 URL 中找到']">
|
||||
|
||||
| 每日合集 | 国产原创 | 亚洲无码原创 | 亚洲有码原创 | 高清中文字幕 | 三级写真 | 亚洲名站有码 | VR 系列 | 欧美无码 | 动漫原创 | AI 换脸电影 | 原档收藏 WMV |
|
||||
| -------- | -------- | ------------ | ------------ | ------------ | -------- | ------------ | ------- | -------- | -------- | ----------- | ------------ |
|
||||
|
|
|
|||
|
|
@ -1456,8 +1456,9 @@ router.get('/enclavebooks/collection/:uid', require('./routes/enclavebooks/colle
|
|||
router.get('/dsndsht23/picture/:subforumid', require('./routes/dsndsht23/pictures'));
|
||||
|
||||
// 色花堂 - 原创bt电影
|
||||
router.get('/dsndsht23/bt/:subforumid', require('./routes/dsndsht23/index'));
|
||||
router.get('/dsndsht23/:subforumid', require('./routes/dsndsht23/index'));
|
||||
router.get('/dsndsht23/bt/:subforumid?', require('./routes/dsndsht23/index'));
|
||||
router.get('/dsndsht23/:subforumid?/:type?', require('./routes/dsndsht23/index'));
|
||||
router.get('/dsndsht23/:subforumid?', require('./routes/dsndsht23/index'));
|
||||
router.get('/dsndsht23', require('./routes/dsndsht23/index'));
|
||||
|
||||
// 数英网最新文章
|
||||
|
|
|
|||
|
|
@ -3,24 +3,26 @@ const cheerio = require('cheerio');
|
|||
|
||||
const host = 'https://www.sehuatang.net/';
|
||||
|
||||
const map = {
|
||||
mrhj: 'forum-106-1.html',
|
||||
gcyc: 'forum-2-1.html',
|
||||
yzwmyc: 'forum-36-1.html',
|
||||
yzymyc: 'forum-37-1.html',
|
||||
gqzwzm: 'forum-103-1.html',
|
||||
sjxz: 'forum-107-1.html',
|
||||
yzmzym: 'forum-104-1.html',
|
||||
vr: 'forum-102-1.html',
|
||||
omwm: 'forum-38-1.html',
|
||||
dmyc: 'forum-39-1.html',
|
||||
ai: 'forum-113-1.html',
|
||||
ydsc: 'forum-111-1.html',
|
||||
const forumIdMaps = {
|
||||
mrhj: '106',
|
||||
gcyc: '2',
|
||||
yzwmyc: '36',
|
||||
yzymyc: '37',
|
||||
gqzwzm: '103',
|
||||
sjxz: '107',
|
||||
yzmzym: '104',
|
||||
vr: '102',
|
||||
omwm: '38',
|
||||
dmyc: '39',
|
||||
ai: '113',
|
||||
ydsc: '111',
|
||||
};
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const subforumid = ctx.params.subforumid || 'gqzwzm';
|
||||
const link = `${host}${map[subforumid]}`;
|
||||
const subformName = ctx.params.subforumid || 'gqzwzm';
|
||||
const subformId = subformName in forumIdMaps ? forumIdMaps[subformName] : subformName;
|
||||
const typefilter = ctx.params.type ? `&filter=type&typeid=${ctx.params.type}` : '';
|
||||
const link = `${host}forum.php?mod=forumdisplay&fid=${subformId}${typefilter}`;
|
||||
const response = await got.get(link);
|
||||
const $ = cheerio.load(response.data);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue