Files
RSSHub/lib/v2/liulinblog/itnews.js
2022-03-11 22:09:27 +08:00

24 lines
584 B
JavaScript

const got = require('@/utils/got');
const { processList, processItems } = require('./utils');
const host = 'https://www.liulinblog.com';
const titleMap = {
internet: '互联网早报',
seo: '站长圈',
};
module.exports = async (ctx) => {
const channel = ctx.params.channel ?? 'internet';
const url = `${host}/itnews/${channel}`;
const response = await got(url);
const list = processList(response);
const items = await processItems(list, ctx);
ctx.state.data = {
title: titleMap[channel],
link: url,
item: items,
};
};