Files
RSSHub/lib/v2/gocn/util.js
T
CcccFzandpull[bot] 99856214aa feat(route): GoCN招聘、Go语言中文网招聘 (#10443)
* feat(route): GoCn招聘、Go语言中文网招聘

* fix: typo

* fix: timezone

Co-authored-by: pull[bot] <39814207+pull[bot]@users.noreply.github.com>
2022-08-11 20:03:03 +08:00

18 lines
455 B
JavaScript

const got = require('@/utils/got');
const { parseDate } = require('@/utils/parse-date');
async function getFeedItem(item) {
const response = await got(`https://gocn.vip/apiv3/topic/${item.guid}/info`);
return {
link: `https://gocn.vip/topics/${item.guid}`,
title: item.title,
description: response.data.data.topic.contentHtml,
pubDate: parseDate(item.ctime, 'X'),
};
}
module.exports = {
getFeedItem,
};