mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-11 07:40:26 +08:00
21 lines
523 B
JavaScript
21 lines
523 B
JavaScript
const got = require('@/utils/got');
|
|
const cheerio = require('cheerio');
|
|
|
|
const processItems = async (list, ctx) =>
|
|
await Promise.all(
|
|
list.map((item) =>
|
|
ctx.cache.tryGet(item.link, async () => {
|
|
const detailResponse = await got.post(item.link);
|
|
const content = cheerio.load(detailResponse.data);
|
|
|
|
item.description = content('div.xxy_text').html();
|
|
|
|
return item;
|
|
})
|
|
)
|
|
);
|
|
|
|
module.exports = {
|
|
processItems,
|
|
};
|