From 3645d3411dc3a56feedb9bf82db31e631118d980 Mon Sep 17 00:00:00 2001 From: Ethan Shen <42264778+nczitzk@users.noreply.github.com> Date: Wed, 29 Jul 2026 11:09:27 +0800 Subject: [PATCH] fix(route): lhratings.com research pdf links (#22866) --- lib/routes/lhratings/research.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/routes/lhratings/research.ts b/lib/routes/lhratings/research.ts index df23675eb..b44c602d6 100644 --- a/lib/routes/lhratings/research.ts +++ b/lib/routes/lhratings/research.ts @@ -24,11 +24,10 @@ export const handler = async (ctx: Context): Promise => { .toArray() .map((el): Element => { const $el: Cheerio = $(el); - const $aEl: Cheerio = $el.find('a').first(); const title: string = $el.find('h2').text(); const pubDateStr: string | undefined = $el.find('p').text().split(':', 2)[1]?.trim(); - const linkUrl: string | undefined = $aEl.attr('href') ? new URL($aEl.attr('href') ?? '', baseUrl).href : undefined; + const linkUrl: string | undefined = $el.attr('href') ? new URL($el.attr('href') ?? '', baseUrl).href : undefined; const categoryEls: Array> = [$el.find('h3').contents()].filter(Boolean); const categories: string[] = [...new Set(categoryEls.map((el) => $(el).text()).filter(Boolean))]; const image: string | undefined = $el.find('div.xylist_img img').attr('src') ? new URL($el.find('div.xylist_img img').attr('src') ?? '', baseUrl).href : undefined;