From a67b79952fb6024eb750236f63df3b0e8e21de77 Mon Sep 17 00:00:00 2001 From: Tsung-Han Yu <14802181+johan456789@users.noreply.github.com> Date: Fri, 29 Aug 2025 05:13:44 +0800 Subject: [PATCH] fix(route/natgeo): title selector (#19929) * fix: title selector * fix(route/natgeo): remove ads --------- --- lib/routes/natgeo/natgeo.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/routes/natgeo/natgeo.ts b/lib/routes/natgeo/natgeo.ts index 72bcb226a..ead22e96a 100644 --- a/lib/routes/natgeo/natgeo.ts +++ b/lib/routes/natgeo/natgeo.ts @@ -16,14 +16,14 @@ async function loadContent(link) { .replaceAll(/ /gi, ' ') .trim(); - $('.splide__arrows, .slide-control').remove(); + $('.splide__arrows, .slide-control, [class^="ad-"], style').remove(); let description = ($('article').eq(0).html() ?? '') + ($('article').eq(1).html() ?? ''); if (/photo|gallery/.test(link)) { description = $('#content-album').html() + description; } return { - title: $('title').text(), + title: $('h1.content-title').text().trim(), pubDate: parseDate(dtStr), description, category: $('.content-tag a')