fix(route/gameapps): fix selectors (#21703)
This commit is contained in:
parent
2af8e30e1c
commit
c8ed099850
|
|
@ -11,6 +11,7 @@ import parser from '@/utils/rss-parser';
|
|||
export const route: Route = {
|
||||
path: '/',
|
||||
example: '/gameapps',
|
||||
categories: ['game'],
|
||||
radar: [
|
||||
{
|
||||
source: ['gameapps.hk/'],
|
||||
|
|
@ -36,7 +37,7 @@ async function handler() {
|
|||
});
|
||||
const $ = load(response);
|
||||
|
||||
item.title = $('meta[property="og:title"]').attr('content') ?? $('.news-title h1').text();
|
||||
item.title = ($('meta[property="og:title"]').attr('content') ?? $('.news-title h1').text()).replace(' - 香港手機遊戲網 GameApps.hk', '');
|
||||
item.category = $('.tags-wrap .tag-item')
|
||||
.toArray()
|
||||
.map((el) => $(el).text().trim().replace(/^#/, ''));
|
||||
|
|
@ -49,7 +50,7 @@ async function handler() {
|
|||
delete item.isoDate;
|
||||
|
||||
const intro = $('div.introduction.media.news-intro div.media-body').html()?.trim();
|
||||
const desc = $('.article-content').html()?.trim();
|
||||
const desc = $('.article-content, .news-content').html()?.trim();
|
||||
item.description = renderToString(
|
||||
<>
|
||||
{intro ? raw(intro) : null}
|
||||
|
|
|
|||
Loading…
Reference in New Issue