From f2ed334627c30d25e5ecb4208d5231d7598f23b0 Mon Sep 17 00:00:00 2001 From: Tony Date: Thu, 2 Apr 2026 21:42:05 +0800 Subject: [PATCH] fix(route/gameapps): add item category extraction and clean up unwanted elements (#21605) --- lib/routes/gameapps/index.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/routes/gameapps/index.tsx b/lib/routes/gameapps/index.tsx index 24a4b29ff..1b2b25c35 100644 --- a/lib/routes/gameapps/index.tsx +++ b/lib/routes/gameapps/index.tsx @@ -37,8 +37,11 @@ async function handler() { const $ = load(response); item.title = $('meta[property="og:title"]').attr('content') ?? $('.news-title h1').text(); + item.category = $('.tags-wrap .tag-item') + .toArray() + .map((el) => $(el).text().trim().replace(/^#/, '')); - $('.pages').remove(); + $('.pages, .article-ad, .social-actions, .news-footer').remove(); // remove unwanted key value delete item.content;