diff --git a/docs/new-media.md b/docs/new-media.md index aa9188b5b..133d77a32 100644 --- a/docs/new-media.md +++ b/docs/new-media.md @@ -2107,7 +2107,7 @@ column 为 third 时可选的 category: ### 栏目 - + - 主栏目 diff --git a/lib/v2/leiphone/index.js b/lib/v2/leiphone/index.js index bc9bd20c1..627c37b0b 100644 --- a/lib/v2/leiphone/index.js +++ b/lib/v2/leiphone/index.js @@ -6,7 +6,7 @@ module.exports = async (ctx) => { const todo = ctx.params.do ?? ''; const keyword = ctx.params.keyword ?? ''; const rootUrl = 'https://www.leiphone.com'; - const url = `${rootUrl}${todo}${keyword}`; + const url = `${rootUrl}/${todo}/${keyword}`; const res = await got.get(url); const $ = cheerio.load(res.data); diff --git a/lib/v2/leiphone/newsflash.js b/lib/v2/leiphone/newsflash.js index 340b2df97..e7c9baa24 100644 --- a/lib/v2/leiphone/newsflash.js +++ b/lib/v2/leiphone/newsflash.js @@ -7,7 +7,7 @@ module.exports = async (ctx) => { const res = await got.get(url); const article = (res.data || {}).article || []; - const list = article.map((item) => item.url); + const list = article.map((item) => (item.url)); const items = await utils.ProcessFeed(list, ctx.cache); ctx.state.data = { diff --git a/lib/v2/leiphone/radar.js b/lib/v2/leiphone/radar.js index b6a64c80f..7e2b02157 100644 --- a/lib/v2/leiphone/radar.js +++ b/lib/v2/leiphone/radar.js @@ -11,7 +11,7 @@ module.exports = { { title: '栏目', docs: 'https://docs.rsshub.app/new-media.html#lei-feng-wang-lan-mu', - source: ['/:catename'], + source: ['/category/:catename'], target: '/leiphone/category/:catname', }, { diff --git a/lib/v2/leiphone/router.js b/lib/v2/leiphone/router.js index e28c14fcf..8cf29384e 100644 --- a/lib/v2/leiphone/router.js +++ b/lib/v2/leiphone/router.js @@ -1,4 +1,4 @@ module.exports = function (router) { - router.get('/:do?/:keyword?', require('./index')); router.get('/newsflash', require('./newsflash')); + router.get('/:do?/:keyword?', require('./index')); };