From d355eb416c4fa99b6a21f69cb2177188a8ccc5f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=83=86=E3=82=A3=E3=83=B3=E3=83=BB=E3=83=AB=E3=83=BC?= =?UTF-8?q?=E3=83=95?= Date: Fri, 17 Nov 2023 22:08:13 +0000 Subject: [PATCH] fix(route): Update the kemono route to point at the new canonical URL (#13822) * Update the kemono route to point at the new canonical URL. * Don't alter GUIDs for existing kemono posts. --- lib/v2/kemono/index.js | 3 ++- lib/v2/kemono/radar.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/v2/kemono/index.js b/lib/v2/kemono/index.js index 73f0251fd..15ec4e532 100644 --- a/lib/v2/kemono/index.js +++ b/lib/v2/kemono/index.js @@ -8,7 +8,7 @@ module.exports = async (ctx) => { const source = ctx.params.source ?? ''; const id = ctx.params.id; - const rootUrl = 'https://kemono.party'; + const rootUrl = 'https://kemono.su'; const apiUrl = `${rootUrl}/api/v1/discord/channel/lookup/${id}`; const currentUrl = `${rootUrl}/${source ? `${source}/${source === 'discord' ? `server/${id}` : `user/${id}`}` : 'posts'}`; @@ -87,6 +87,7 @@ module.exports = async (ctx) => { item.description = content('.post__body').html(); item.author = content('.post__user-name').text(); item.title = content('.post__title span').first().text(); + item.guid = item.link.replace('kemono.su', 'kemono.party'); item.pubDate = parseDate(content('.timestamp').attr('datetime')); return item; diff --git a/lib/v2/kemono/radar.js b/lib/v2/kemono/radar.js index c0e9c8b58..0edf08cd2 100644 --- a/lib/v2/kemono/radar.js +++ b/lib/v2/kemono/radar.js @@ -1,5 +1,5 @@ module.exports = { - 'kemono.party': { + 'kemono.su': { _name: 'Kemono', '.': [ {