Files
RSSHub/lib/v2/woshipm/utils.js
Tony 3d9079b689 fix(route): woshipm (#11669)
* fix(route): woshipm

* fix: remove used id
2023-01-23 02:14:51 +08:00

22 lines
474 B
JavaScript

const got = require('@/utils/got');
const cheerio = require('cheerio');
const baseUrl = 'https://www.woshipm.com';
const parseArticle = (item, tryGet) =>
tryGet(item.link, async () => {
const { data: response } = await got(item.link);
const $ = cheerio.load(response);
$('.support-author').remove();
item.description = $('.article--content').html();
return item;
});
module.exports = {
baseUrl,
parseArticle,
};