mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-09 23:00:48 +08:00
24 lines
584 B
JavaScript
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,
|
|
};
|
|
};
|