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;