From 13c335dbdbae66d0e9f30e264291447bdddd133c Mon Sep 17 00:00:00 2001 From: lolcat Date: Tue, 8 Sep 2026 04:06:45 -0400 Subject: [PATCH] hehe --- lib/frontend.php | 112 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 112 insertions(+) diff --git a/lib/frontend.php b/lib/frontend.php index ba07de3..acc264e 100644 --- a/lib/frontend.php +++ b/lib/frontend.php @@ -537,6 +537,39 @@ class frontend{ $archives = []; + $fansites = [ + [ + "url" => "https://cum.st/creators?cq=", + "favicon" => "cum.st", + "favicon_alt" => "cu", + "title" => "OnlyHaven" + ], + [ + "url" => "https://pawchive.pw/artists?q=", + "favicon" => "pawchive.pw", + "favicon_alt" => "pa", + "title" => "Pawchive" + ], + [ + "url" => "https://bakemono.app/creators?q=", + "favicon" => "bakemono.app", + "favicon_alt" => "ba", + "title" => "Bakemono" + ], + [ + "url" => "https://kemono.cr/artists?q=", + "favicon" => "kemono.cr", + "favicon_alt" => "ke", + "title" => "Kemono" + ], + [ + "url" => "https://coomer.st/artists?q=", + "favicon" => "coomer.st", + "favicon_alt" => "co", + "title" => "Coomer" + ] + ]; + // add website-specific archives switch($host["host"]){ @@ -826,6 +859,80 @@ class frontend{ } } break; + + // https://cum.st/creators?cq= onlyfans fansly patreon + // https://pawchive.pw/artists?q= patreon pixiv/fanbox discord + // https://bakemono.app/creators?q= pixiv/fanbox fansly onlyfans patreon + // https://kemono.cr/artists?q= patreon pixiv/fanbox fantia afdian boosty gumroad subscribestar dlsite + // https://coomer.st/artists?q= onlyfans fansly candfans + + // cant look up + /* + case "fantia.jp": // https://fantia.jp/fanclubs/ + */ + + // normal + case "onlyfans.com": // https://onlyfans.com/ + case "fansly.com": // https://fansly.com/ + case "fanbox.cc": + case "patreon.com": // https://www.patreon.com/ + case "boosty.to": // https://boosty.to/ + case "www.subscribestar.com": // https://www.subscribestar.com/ + case "subscribestar.com": + case "www.dlsite.com": // https://www.dlsite.com/ / + case "dlsite.com": + case "candfans.com": // https://candfans.com/ + case "afdian.com": // https://afdian.com/a/ + if( + isset($host["path"]) && + ( + ( + $host["host"] == "afdian.com" && + preg_match( + '/^\/a\/([A-Za-z0-9-_.]+)/', + $host["path"], + $username + ) + ) || + preg_match( + '/^\/([A-Za-z0-9-_.]+)/', + $host["path"], + $username + ) + ) + ){ + + foreach($fansites as $fansite){ + + $archives[] = [ + "url" => $fansite["url"] . $this->sanitize_slug($username[1]), + "favicon" => $fansite["favicon"], + "favicon_alt" => $fansite["favicon_alt"], + "title" => $fansite["title"] + ]; + } + } + break; + } + + // special fansite cases + if( + preg_match( + '/^([A-Za-z0-9_]+)\.(?:fanbox\.cc|gumroad\.com)/', + $host["host"], + $username + ) + ){ + + foreach($fansites as $fansite){ + + $archives[] = [ + "url" => $fansite["url"] . $this->sanitize_slug($username[1]), + "favicon" => $fansite["favicon"], + "favicon_alt" => $fansite["favicon_alt"], + "title" => $fansite["title"] + ]; + } } // detect git @@ -1429,6 +1536,11 @@ class frontend{ return http_build_query($out); } + private function sanitize_slug($username){ + + return urlencode(preg_replace('/[-_]/', " ", $username)); + } + public function increment_real_reqs($scraper){ apcu_inc(intdiv(time(), 3600) . ".real_requests", 1, $s, 262800);