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.
This commit is contained in:
ティン・ルーフ 2023-11-17 22:08:13 +00:00 committed by GitHub
parent b6a25e8887
commit d355eb416c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -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;

View File

@ -1,5 +1,5 @@
module.exports = {
'kemono.party': {
'kemono.su': {
_name: 'Kemono',
'.': [
{