Skip to content

Commit

Permalink
fix(route): Update the kemono route to point at the new canonical URL (
Browse files Browse the repository at this point in the history
…#13822)

* Update the kemono route to point at the new canonical URL.

* Don't alter GUIDs for existing kemono posts.
  • Loading branch information
tinruufu authored Nov 17, 2023
1 parent b6a25e8 commit d355eb4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/v2/kemono/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'}`;

Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion lib/v2/kemono/radar.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = {
'kemono.party': {
'kemono.su': {
_name: 'Kemono',
'.': [
{
Expand Down

0 comments on commit d355eb4

Please sign in to comment.