diff --git a/lib/v2/nogizaka46/news.js b/lib/v2/nogizaka46/news.js index ebd141e6d..54ef7c3d3 100644 --- a/lib/v2/nogizaka46/news.js +++ b/lib/v2/nogizaka46/news.js @@ -1,12 +1,14 @@ const got = require('@/utils/got'); const { parseDate } = require('@/utils/parse-date'); +const rootUrl = 'https://www.nogizaka46.com'; + module.exports = async (ctx) => { const limit = ctx.query.limit ? parseInt(ctx.query.limit) : 25; const response = await got({ method: 'get', - url: 'https://www.nogizaka46.com/s/n46/api/list/news', + url: `${rootUrl}/s/n46/api/list/news`, headers: { Referer: 'http://www.nogizaka46.com/', }, @@ -19,6 +21,7 @@ module.exports = async (ctx) => { description: item.text, pubDate: parseDate(item.date), category: item.cate, + guid: rootUrl + new URL(item.link_url).pathname, })); ctx.state.data = {