feat(route): Kemono Posts remove Ad (#14841)

* feat(route): Kemono Posts remove Ad

* style: auto format

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
Neko Aria 2024-03-19 12:10:28 +08:00 committed by GitHub
parent 263d6b818e
commit ab77187fd3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 1 deletions

View File

@ -125,7 +125,11 @@ async function handler(ctx) {
content(this).html(`<img src="${href.startsWith('http') ? href : rootUrl + href}">`);
});
item.description = content('.post__body').html();
item.description = content('.post__body')
.each(function () {
content(this).find('.ad-container').remove();
})
.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');