fix(route/natgeo): title selector (#19929)
* fix: title selector * fix(route/natgeo): remove ads ---------
This commit is contained in:
parent
d21b8ecf1c
commit
a67b79952f
|
|
@ -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')
|
||||
|
|
|
|||
Loading…
Reference in New Issue