From d6a665b772948ce2c851b7fe281b1be6b226fd7d Mon Sep 17 00:00:00 2001 From: Shine Date: Mon, 5 Jan 2026 23:26:24 +0800 Subject: [PATCH] fix: Update Shopify App search description selector (#20814) --- lib/routes/shopify/apps/search.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/routes/shopify/apps/search.ts b/lib/routes/shopify/apps/search.ts index f08968a64..9aa4378a4 100644 --- a/lib/routes/shopify/apps/search.ts +++ b/lib/routes/shopify/apps/search.ts @@ -50,7 +50,6 @@ async function handler(ctx: Context): Promise { .map((item) => { const handle = $(item).attr('data-app-card-handle-value'); - // const appInfo = $(item).find('div.tw-transition-colors.tw-text-fg-primary + div.tw-self-stretch'); const appInfo = $(item).find('div.tw-self-stretch').clone(); const rattingMatch = appInfo @@ -59,14 +58,16 @@ async function handler(ctx: Context): Promise { .match(/\d\.\d/); const rattingCountMatch = appInfo.find('span + span.tw-sr-only').text().match(/\d+/); + const description = $(item).find(`div.tw-text-fg-secondary:not(.tw-mb-md)`).eq(1).text().trim(); + const result: DataItem = { title: $(item).attr('data-app-card-name-value') ?? '', link: `${baseURL}/${handle}`, - description: $(item).find(`div.tw-text-fg-tertiary`).first().text().trim(), + description, image: $(item).attr('data-app-card-icon-url-value'), _extra: { handle, - description: $(item).find(`div.tw-text-fg-tertiary`).first().text().trim(), + description, built_for_shopify: $(item).find(`span.built-for-shopify-badge`).length > 0, ratting: rattingMatch ? Number.parseFloat(rattingMatch[0]) : 0, ratting_count: rattingCountMatch ? Number(rattingCountMatch[0]) : 0,