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:
@@ -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;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
module.exports = {
|
||||
'kemono.party': {
|
||||
'kemono.su': {
|
||||
_name: 'Kemono',
|
||||
'.': [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user