feat: mark unsafe for R-18 posts on Pixiv

pull/20/head
Keo Cheung 2025-10-11 00:04:46 +08:00
parent 51be6dfdcd
commit 86de824406
No known key found for this signature in database
GPG Key ID: F612349817DD7EA2
1 changed files with 3 additions and 0 deletions

View File

@ -69,6 +69,9 @@ export default class Pixiv extends ScrapeEngineBase {
post.contentUrl = upgradeUrlToOriginalQuality(imgLink);
post.contentType = guessContentType(post.contentUrl);
post.referrer = document.location.origin;
if (document.querySelector('a[href="/tags/R-18/artworks"]')) {
post.rating = "unsafe";
}
result.tryAddPost(post);
}