From 71e1fce88a8f9bb582606595e66d33699fce2da7 Mon Sep 17 00:00:00 2001 From: Leo <47264468+whzxc@users.noreply.github.com> Date: Mon, 21 Oct 2024 12:07:33 +0800 Subject: [PATCH] fix(route/ps): monthly-games (#17211) * fix(route/ps): monthly-games list target element updated to #monthly-games * fix(route/ps): link tag --------- Co-authored-by: wanghao9 --- lib/routes/ps/monthly-games.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/routes/ps/monthly-games.ts b/lib/routes/ps/monthly-games.ts index b66a406a45662..277139be1ef6b 100644 --- a/lib/routes/ps/monthly-games.ts +++ b/lib/routes/ps/monthly-games.ts @@ -38,17 +38,17 @@ async function handler() { const { data: response } = await got(baseUrl); const $ = load(response); - const list = $('.cmp-experiencefragment--your-latest-monthly-games .box') + const list = $('#monthly-games .box--light ') .toArray() - .map((item) => { - item = $(item); + .map((e) => { + const item = $(e); return { title: item.find('h3').text(), description: art(path.join(__dirname, 'templates/monthly-games.art'), { img: item.find('.media-block__img source').attr('srcset'), text: item.find('h3 + p').text(), }), - link: item.find('.button a').attr('href'), + link: item.find('.btn--cta').attr('href'), }; });