const got = require('@/utils/got'); const cheerio = require('cheerio'); const { parseDate } = require('@/utils/parse-date'); const links = { latest: 'information/web_news', recommend: 'information/web_recommend', life: 'information/happy_life', estate: 'information/real_estate', workplace: 'information/web_zhichang', }; module.exports = async (ctx) => { const category = ctx.params.category ?? 'latest'; const rootUrl = 'https://36kr.com'; const currentUrl = `${rootUrl}/${links.hasOwnProperty(category) ? links[category] : `information/${category}`}`; const response = await got({ method: 'get', url: currentUrl, }); const data = JSON.parse(response.data.match(/