diff --git a/docs/multimedia.md b/docs/multimedia.md index bb4464908..5b786a11a 100644 --- a/docs/multimedia.md +++ b/docs/multimedia.md @@ -765,6 +765,28 @@ pageClass: routes +### 分类 + + + +| 创意 | 励志 | 搞笑 | 广告 | 汽车 | 旅行 | +| ---- | ---- | ---- | ---- | ---- | ---- | +| 6 | 7 | 8 | 13 | 92 | 11 | + +| 爱情 | 剧情 | 运动 | 动画 | 音乐 | 科幻 | +| ---- | ---- | ---- | ---- | ---- | ---- | +| 12 | 17 | 10 | 16 | 18 | 23 | + +| 预告 | 记录 | 混剪 | 游戏 | 时尚 | 实验 | +| ---- | ---- | ---- | ---- | ---- | ---- | +| 43 | 24 | 44 | 104 | 88 | 45 | + +| 生活 | +| ---- | +| 78 | + + + ## 低端影视 ### 影视剧集更新 diff --git a/lib/router.js b/lib/router.js index 4542c512e..c62a3af62 100644 --- a/lib/router.js +++ b/lib/router.js @@ -3085,6 +3085,8 @@ router.get('/ems/news', require('./routes/ems/news')); // 场库 router.get('/changku', require('./routes/changku/index')); +router.get('/changku/cate/:postid', require('./routes/changku/index')); + // SCMP router.get('/scmp/:category_id', require('./routes/scmp/index')); diff --git a/lib/routes/changku/index.js b/lib/routes/changku/index.js index 540a4cb51..c2f8b72eb 100644 --- a/lib/routes/changku/index.js +++ b/lib/routes/changku/index.js @@ -1,6 +1,6 @@ const got = require('@/utils/got'); module.exports = async (ctx) => { - const url = `https://app.vmovier.com/apiv3/index/getIndexPosts/lastid/`; + const url = ctx.params.postid ? `https://app.vmovier.com/apiv3/post/getPostInCate?p=1&size=10&cateid=${ctx.params.postid}` : `https://app.vmovier.com/apiv3/index/getIndexPosts/lastid/`; const config = { headers: { 'user-agent': 'VmovierApp 5.7.7 / Android 10 / WIFI / 1080*2175 / 2.75', @@ -11,8 +11,9 @@ module.exports = async (ctx) => { method: 'get', url: url, }); + const list = res.data.data.list ? res.data.data.list : res.data.data; const items = await Promise.all( - res.data.data.list.map(async (list) => { + list.map(async (list) => { const title = list.title; const link = `https://app.vmovier.com/apiv3/post/view?postid=${list.postid}`; const description = await ctx.cache.tryGet(link, async () => { @@ -25,14 +26,14 @@ module.exports = async (ctx) => { title: title, description: description, author: list.creator_username, - link: link, + link: `https://www.vmovier.com/${list.postid}`, }); }) ); ctx.state.data = { - title: `场库-每日精选`, + title: `${ctx.params.postid ? list[0].cate[0].catename : '每日精选'}-场库`, link: url, - description: '场库-每日精选', + description: '场库_高品质短片分享平台', item: items, }; };