Files
RSSHub/lib/routes/everia/article.ts
T
AiraNadihandAiraNadih 9405ac50b6 feat(route/everia): add latest, category and search routes (#19280)
* feat(route/everia): add latest, category and search routes

* fix(route/everia): correct category and search routes

---------

Co-authored-by: AiraNadih <AiraNadih@users.noreply.github.com>
2025-06-04 23:44:02 +08:00

22 lines
470 B
TypeScript

import { load } from 'cheerio';
import got from '@/utils/got';
async function loadArticle(link) {
const resp = await got(link);
const article = load(resp.body);
const title = article('h2.entry-title').text().trim();
const description = article('.wp-block-image')
.toArray()
.map((element) => article.html(element))
.join('');
return {
title,
description,
link,
};
}
export default loadArticle;