From 2a02c8958227b3c245f826938af57952eb9fd35b Mon Sep 17 00:00:00 2001 From: Ethan Shen <42264778+nczitzk@users.noreply.github.com> Date: Thu, 14 Sep 2023 10:14:35 +0800 Subject: [PATCH] =?UTF-8?q?feat(route):=20add=20=E4=B8=AD=E5=9B=BD?= =?UTF-8?q?=E4=BD=9C=E5=AE=B6=E7=BD=91=20(#13271)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(route): add 中国作家网 * fix: remove dead columns * apply suggestions from code review --------- --- lib/v2/chinawriter/index.js | 88 +++++ lib/v2/chinawriter/maintainer.js | 3 + lib/v2/chinawriter/radar.js | 660 +++++++++++++++++++++++++++++++ lib/v2/chinawriter/router.js | 3 + website/docs/routes/new-media.md | 135 +++++++ 5 files changed, 889 insertions(+) create mode 100644 lib/v2/chinawriter/index.js create mode 100644 lib/v2/chinawriter/maintainer.js create mode 100644 lib/v2/chinawriter/radar.js create mode 100644 lib/v2/chinawriter/router.js diff --git a/lib/v2/chinawriter/index.js b/lib/v2/chinawriter/index.js new file mode 100644 index 00000000000000..fafca99cfe42b9 --- /dev/null +++ b/lib/v2/chinawriter/index.js @@ -0,0 +1,88 @@ +const got = require('@/utils/got'); +const cheerio = require('cheerio'); +const timezone = require('@/utils/timezone'); +const { parseDate } = require('@/utils/parse-date'); + +module.exports = async (ctx) => { + const { id } = ctx.params; + const limit = ctx.query.limit ? parseInt(ctx.query.limit, 10) : 40; + + const rootUrl = 'http://www.chinawriter.com.cn'; + const currentUrl = `${new URL(id ?? '', rootUrl).href}/`; + + const { data: response } = await got(currentUrl); + + const $ = cheerio.load(response); + + let items = ($('main div.inner').find('a').length === 0 ? $('body') : $('main div.inner')) + .find('a') + .toArray() + .filter((item) => /\/\d{4}\/\d{4}\/\w+-\w+\.html/.test($(item).prop('href'))) + .slice(0, limit) + .map((item) => { + item = $(item); + + const link = item.prop('href'); + + return { + title: item.text(), + link: /^http/.test(link) ? link : new URL(item.prop('href'), rootUrl).href, + }; + }); + + items = await Promise.all( + items.map((item) => + ctx.cache.tryGet(item.link, async () => { + try { + const { data: detailResponse } = await got(item.link); + + const content = cheerio.load(detailResponse); + + content('div.end_shared').remove(); + + const info = content('div.end_info').text().trim(); + + item.title = content('#newstit').text() || content('h6.end_tit').text(); + item.description = content('div.end_article').html(); + item.author = info ? info.match(/\|(.*)\d{4}/)[1].trim() : ''; + item.category = [ + ...new Set( + [ + ...content('div.location a.clink') + .slice(1) + .toArray() + .map((c) => content(c).text()), + info + ? info + .match(/^(.*)\|/)[1] + .replace(/来源:/g, '') + .trim() + : undefined, + ].filter(Boolean) + ), + ]; + item.pubDate = content('div.end_info em').text() ? timezone(parseDate(content('div.end_info em').text(), 'YYYY年MM月DD日HH:mm'), +8) : parseDate(content('meta[name="publishdate"]').prop('content')); + } catch (e) { + // + } + + return item; + }) + ) + ); + + const icon = new URL($('link[rel="icon"]').prop('href'), rootUrl); + + ctx.state.data = { + item: items, + title: $('title').text().replace(/--/g, ' - '), + link: currentUrl, + description: $('meta[name="description"]').prop('content'), + language: 'zh-cn', + image: new URL($('h1.logo a img').prop('src'), rootUrl).href, + icon, + logo: icon, + subtitle: $('meta[name="keywords"]').prop('content'), + allowEmpty: true, + }; +}; diff --git a/lib/v2/chinawriter/maintainer.js b/lib/v2/chinawriter/maintainer.js new file mode 100644 index 00000000000000..77e7f46e2f9997 --- /dev/null +++ b/lib/v2/chinawriter/maintainer.js @@ -0,0 +1,3 @@ +module.exports = { + '/:id?': ['nczitzk'], +}; diff --git a/lib/v2/chinawriter/radar.js b/lib/v2/chinawriter/radar.js new file mode 100644 index 00000000000000..5bbeec144d1f7b --- /dev/null +++ b/lib/v2/chinawriter/radar.js @@ -0,0 +1,660 @@ +module.exports = { + 'chinawriter.com.cn': { + _name: '中国作家网', + '.': [ + { + title: '栏目', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/:id*'], + target: (params, url) => { + url = new URL(url); + const path = url.href.match(/\.\w+([\d/]+)(?:\/index(?:\.html)?)?$/)[1]; + + return `/chinawriter${path ?? ''}`; + }, + }, + { + title: '服务', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/403937'], + target: '/chinawriter/403937', + }, + { + title: '会员', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/403978'], + target: '/chinawriter/403978', + }, + { + title: '文学奖项', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/403973'], + target: '/chinawriter/403973', + }, + { + title: '新闻', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/403990'], + target: '/chinawriter/403990', + }, + { + title: '访谈', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/403997'], + target: '/chinawriter/403997', + }, + { + title: '艺术', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404002'], + target: '/chinawriter/404002', + }, + { + title: '理论评论', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404029'], + target: '/chinawriter/404029', + }, + { + title: '文史', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404057'], + target: '/chinawriter/404057', + }, + { + title: '科幻', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404078'], + target: '/chinawriter/404078', + }, + { + title: '书汇', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404058'], + target: '/chinawriter/404058', + }, + { + title: '新作品', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404015'], + target: '/chinawriter/404015', + }, + { + title: '世界文坛', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404085'], + target: '/chinawriter/404085', + }, + { + title: '民族文艺', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404086'], + target: '/chinawriter/404086', + }, + { + title: '网络文学', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404022'], + target: '/chinawriter/404022', + }, + { + title: '儿童文学', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404059'], + target: '/chinawriter/404059', + }, + { + title: '会员 - 新发展会员名单', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/403978/403979', '/403978'], + target: '/chinawriter/403978/403979', + }, + { + title: '会员 - 讣告', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/403978/403981', '/403978'], + target: '/chinawriter/403978/403981', + }, + { + title: '文学奖项 - 其他文学奖项', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/403973/419349', '/403973'], + target: '/chinawriter/403973/419349', + }, + { + title: '新闻 - 时政新闻', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/403990/403991', '/403990'], + target: '/chinawriter/403990/403991', + }, + { + title: '新闻 - 中国作协', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/403990/403993', '/403990'], + target: '/chinawriter/403990/403993', + }, + { + title: '新闻 - 主席', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/403990/441519', '/403990'], + target: '/chinawriter/403990/441519', + }, + { + title: '新闻 - 党组书记', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/403990/441520', '/403990'], + target: '/chinawriter/403990/441520', + }, + { + title: '新闻 - 各地文讯', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/403990/403994', '/403990'], + target: '/chinawriter/403990/403994', + }, + { + title: '艺术 - 新闻', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404002/404003', '/404002'], + target: '/chinawriter/404002/404003', + }, + { + title: '艺术 - 影视', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404002/419388', '/404002'], + target: '/chinawriter/404002/419388', + }, + { + title: '艺术 - 舞台', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404002/419389', '/404002'], + target: '/chinawriter/404002/419389', + }, + { + title: '艺术 - 人物', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404002/404005', '/404002'], + target: '/chinawriter/404002/404005', + }, + { + title: '艺术 - 展览', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404002/419390', '/404002'], + target: '/chinawriter/404002/419390', + }, + { + title: '艺术 - 书画', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404002/419391', '/404002'], + target: '/chinawriter/404002/419391', + }, + { + title: '理论评论 - 重要理论文章', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404029/419350', '/404029'], + target: '/chinawriter/404029/419350', + }, + { + title: '理论评论 - 理论热点', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404029/419351', '/404029'], + target: '/chinawriter/404029/419351', + }, + { + title: '理论评论 - 文学评论', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404029/404030', '/404029'], + target: '/chinawriter/404029/404030', + }, + { + title: '理论评论 - 创作谈', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404029/404032', '/404029'], + target: '/chinawriter/404029/404032', + }, + { + title: '理论评论 - 争鸣', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404029/404033', '/404029'], + target: '/chinawriter/404029/404033', + }, + { + title: '理论评论 - 综述', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404029/404034', '/404029'], + target: '/chinawriter/404029/404034', + }, + { + title: '理论评论 - 《中国当代文学研究》', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404087/404988/425775', '/404087/404988', '/404087'], + target: '/chinawriter/404087/404988/425775', + }, + { + title: '文史 - 文坛轶事', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404057/404063', '/404057'], + target: '/chinawriter/404057/404063', + }, + { + title: '文史 - 文史漫谈', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404057/442005', '/404057'], + target: '/chinawriter/404057/442005', + }, + { + title: '文史 - 重温经典', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404057/419384', '/404057'], + target: '/chinawriter/404057/419384', + }, + { + title: '文史 - 版本研究', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404057/419387', '/404057'], + target: '/chinawriter/404057/419387', + }, + { + title: '文史 - 名人手迹', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404057/419382', '/404057'], + target: '/chinawriter/404057/419382', + }, + { + title: '文史 - 茅盾文学奖获奖作家研究', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404087/404988/429369', '/404087/404988', '/404087'], + target: '/chinawriter/404087/404988/429369', + }, + { + title: '科幻 - 动态', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404078/404079', '/404078'], + target: '/chinawriter/404078/404079', + }, + { + title: '科幻 - 评论', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404078/404080', '/404078'], + target: '/chinawriter/404078/404080', + }, + { + title: '科幻 - 作家印象', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404078/404081', '/404078'], + target: '/chinawriter/404078/404081', + }, + { + title: '科幻 - 作品', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404078/404083', '/404078'], + target: '/chinawriter/404078/404083', + }, + { + title: '科幻 - 科声幻影', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404078/404084', '/404078'], + target: '/chinawriter/404078/404084', + }, + { + title: '书汇 - 书摘', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404058/404067', '/404058'], + target: '/chinawriter/404058/404067', + }, + { + title: '书汇 - 图书排行', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404058/404069', '/404058'], + target: '/chinawriter/404058/404069', + }, + { + title: '新作品 - 小说', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404015/404017', '/404015'], + target: '/chinawriter/404015/404017', + }, + { + title: '新作品 - 诗歌', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404015/404020', '/404015'], + target: '/chinawriter/404015/404020', + }, + { + title: '新作品 - 散文', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404015/404018', '/404015'], + target: '/chinawriter/404015/404018', + }, + { + title: '新作品 - 纪实', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404015/404019', '/404015'], + target: '/chinawriter/404015/404019', + }, + { + title: '新作品 - 其他', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404015/419926', '/404015'], + target: '/chinawriter/404015/419926', + }, + { + title: '新作品 - 平台推荐', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404015/419789', '/404015'], + target: '/chinawriter/404015/419789', + }, + { + title: '新作品 - 本周之星', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404015/431511', '/404015'], + target: '/chinawriter/404015/431511', + }, + { + title: '新作品 - 2018年5月18日前原创作品', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404009'], + target: '/chinawriter/404009', + }, + { + title: '新作品 - 《人民文学》', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404015/416204/418925', '/404015/416204', '/404015'], + target: '/chinawriter/404015/416204/418925', + }, + { + title: '新作品 - 《诗刊》', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404015/416204/418926', '/404015/416204', '/404015'], + target: '/chinawriter/404015/416204/418926', + }, + { + title: '新作品 - 《民族文学》', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404015/416204/418928', '/404015/416204', '/404015'], + target: '/chinawriter/404015/416204/418928', + }, + { + title: '新作品 - 《收获》', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404015/416204/418958', '/404015/416204', '/404015'], + target: '/chinawriter/404015/416204/418958', + }, + { + title: '新作品 - 《十月》', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404015/416204/418956', '/404015/416204', '/404015'], + target: '/chinawriter/404015/416204/418956', + }, + { + title: '新作品 - 《小说选刊》', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404015/416204/418929', '/404015/416204', '/404015'], + target: '/chinawriter/404015/416204/418929', + }, + { + title: '新作品 - 《北京文学》', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404015/416204/418954', '/404015/416204', '/404015'], + target: '/chinawriter/404015/416204/418954', + }, + { + title: '新作品 - 《上海文学》', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404015/416204/418962', '/404015/416204', '/404015'], + target: '/chinawriter/404015/416204/418962', + }, + { + title: '新作品 - 《天津文学》', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404015/416204/419004', '/404015/416204', '/404015'], + target: '/chinawriter/404015/416204/419004', + }, + { + title: '新作品 - 《草原》', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404015/416204/418989', '/404015/416204', '/404015'], + target: '/chinawriter/404015/416204/418989', + }, + { + title: '新作品 - 《黄河》', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404015/416204/426204', '/404015/416204', '/404015'], + target: '/chinawriter/404015/416204/426204', + }, + { + title: '新作品 - 《江南》', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404015/416204/418957', '/404015/416204', '/404015'], + target: '/chinawriter/404015/416204/418957', + }, + { + title: '新作品 - 《钟山》', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404015/416204/418984', '/404015/416204', '/404015'], + target: '/chinawriter/404015/416204/418984', + }, + { + title: '新作品 - 《广州文艺》', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404015/416204/419881', '/404015/416204', '/404015'], + target: '/chinawriter/404015/416204/419881', + }, + { + title: '新作品 - 《湖南文学》', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404015/416204/419156', '/404015/416204', '/404015'], + target: '/chinawriter/404015/416204/419156', + }, + { + title: '新作品 - 《山西文学》', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404015/416204/419827', '/404015/416204', '/404015'], + target: '/chinawriter/404015/416204/419827', + }, + { + title: '新作品 - 《花城》', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404015/416204/418960', '/404015/416204', '/404015'], + target: '/chinawriter/404015/416204/418960', + }, + { + title: '新作品 - 《青年作家》', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404015/416204/418967', '/404015/416204', '/404015'], + target: '/chinawriter/404015/416204/418967', + }, + { + title: '新作品 - 《雨花》', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404015/416204/419885', '/404015/416204', '/404015'], + target: '/chinawriter/404015/416204/419885', + }, + { + title: '新作品 - 《红豆》', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404015/416204/418993', '/404015/416204', '/404015'], + target: '/chinawriter/404015/416204/418993', + }, + { + title: '新作品 - 《长江文艺》', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404015/416204/418961', '/404015/416204', '/404015'], + target: '/chinawriter/404015/416204/418961', + }, + { + title: '新作品 - 《中国作家》', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404015/416204/418927', '/404015/416204', '/404015'], + target: '/chinawriter/404015/416204/418927', + }, + { + title: '新作品 - 《青年文学》', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404015/416204/418979', '/404015/416204', '/404015'], + target: '/chinawriter/404015/416204/418979', + }, + { + title: '新作品 - 《美文》', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404015/416204/418985', '/404015/416204', '/404015'], + target: '/chinawriter/404015/416204/418985', + }, + { + title: '新作品 - 《芙蓉》', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404015/416204/418986', '/404015/416204', '/404015'], + target: '/chinawriter/404015/416204/418986', + }, + { + title: '新作品 - 《长城》', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404015/416204/418987', '/404015/416204', '/404015'], + target: '/chinawriter/404015/416204/418987', + }, + { + title: '新作品 - 《福建文学》', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404015/416204/419003', '/404015/416204', '/404015'], + target: '/chinawriter/404015/416204/419003', + }, + { + title: '新作品 - 《啄木鸟》', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404015/416204/435225', '/404015/416204', '/404015'], + target: '/chinawriter/404015/416204/435225', + }, + { + title: '新作品 - 《芳草》', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404015/416204/424311', '/404015/416204', '/404015'], + target: '/chinawriter/404015/416204/424311', + }, + { + title: '新作品 - 《小说月报》', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404015/416204/418963', '/404015/416204', '/404015'], + target: '/chinawriter/404015/416204/418963', + }, + { + title: '世界文坛 - 视点', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404085/404090', '/404085'], + target: '/chinawriter/404085/404090', + }, + { + title: '世界文坛 - 译介', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404085/431803', '/404085'], + target: '/chinawriter/404085/431803', + }, + { + title: '世界文坛 - 作家印象', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404085/404091', '/404085'], + target: '/chinawriter/404085/404091', + }, + { + title: '世界文坛 - 文学评论', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404085/404092', '/404085'], + target: '/chinawriter/404085/404092', + }, + { + title: '世界文坛 - 影像艺术', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404085/404093', '/404085'], + target: '/chinawriter/404085/404093', + }, + { + title: '世界文坛 - 作品推介', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404085/404095', '/404085'], + target: '/chinawriter/404085/404095', + }, + { + title: '民族文艺 - 动态', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404086/404098', '/404086'], + target: '/chinawriter/404086/404098', + }, + { + title: '民族文艺 - 品评', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404086/404101', '/404086'], + target: '/chinawriter/404086/404101', + }, + { + title: '民族文艺 - 作家印象', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404086/404099', '/404086'], + target: '/chinawriter/404086/404099', + }, + { + title: '民族文艺 - 作品', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404086/404100', '/404086'], + target: '/chinawriter/404086/404100', + }, + { + title: '民族文艺 - 影像', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404086/404102', '/404086'], + target: '/chinawriter/404086/404102', + }, + { + title: '网络文学 - 动态', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404022/404023', '/404022'], + target: '/chinawriter/404022/404023', + }, + { + title: '网络文学 - 观察', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404022/404027', '/404022'], + target: '/chinawriter/404022/404027', + }, + { + title: '网络文学 - 访谈', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404022/404024', '/404022'], + target: '/chinawriter/404022/404024', + }, + { + title: '网络文学 - 中国网络小说排行榜', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404022/404028', '/404022'], + target: '/chinawriter/404022/404028', + }, + { + title: '儿童文学 - 视点', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404059/404071', '/404059'], + target: '/chinawriter/404059/404071', + }, + { + title: '儿童文学 - 文学评论', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404059/404072', '/404059'], + target: '/chinawriter/404059/404072', + }, + { + title: '儿童文学 - 作家印象', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404059/404073', '/404059'], + target: '/chinawriter/404059/404073', + }, + { + title: '儿童文学 - 作品推介', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404059/404075', '/404059'], + target: '/chinawriter/404059/404075', + }, + { + title: '儿童文学 - 动漫艺术', + docs: 'https://docs.rsshub.app/routes/new-media#zhong-guo-zuo-jia-wang-lan-mu', + source: ['/404059/404076', '/404059'], + target: '/chinawriter/404059/404076', + }, + ], + }, +}; diff --git a/lib/v2/chinawriter/router.js b/lib/v2/chinawriter/router.js new file mode 100644 index 00000000000000..294b473e126850 --- /dev/null +++ b/lib/v2/chinawriter/router.js @@ -0,0 +1,3 @@ +module.exports = (router) => { + router.get('/:id*', require('./')); +}; diff --git a/website/docs/routes/new-media.md b/website/docs/routes/new-media.md index eea16266ff9304..6900fa6bdf128a 100644 --- a/website/docs/routes/new-media.md +++ b/website/docs/routes/new-media.md @@ -5332,6 +5332,141 @@ column 为 third 时可选的 category: +## 中国作家网 {#zhong-guo-zuo-jia-wang} + +### 栏目 {#zhong-guo-zuo-jia-wang-lan-mu} + + + +| 服务 | 文学奖项 | +| ------ | -------- | +| 403937 | 403973 | + +| 新闻 | 访谈 | 艺术 | +| ------ | ------ | ------ | +| 403990 | 403997 | 404002 | + +| 理论评论 | 文史 | 科幻 | 书汇 | 新作品 | +| -------- | ------ | ------ | ------ | ------ | +| 404029 | 404057 | 404078 | 404058 | 404015 | + +| 世界文坛 | 民族文艺 | 网络文学 | 儿童文学 | +| -------- | -------- | -------- | -------- | +| 404085 | 404086 | 404022 | 404059 | + +
+ 更多栏目 + + #### 会员 + + | 新发展会员名单 | 讣告 | + | -------------- | ------------- | + | 403978/403979 | 403978/403981 | + + #### 文学奖项 + + | 其他文学奖项 | + | ------------- | + | 403973/419349 | + + #### 新闻 + + | 时政新闻 | 中国作协 | 主席 | 党组书记 | 各地文讯 | + | ------------- | ------------- | ------------- | ------------- | ------------- | + | 403990/403991 | 403990/403993 | 403990/441519 | 403990/441520 | 403990/403994 | + + #### 艺术 + + | 新闻 | 影视 | 舞台 | 人物 | 展览 | 书画 | + | ------------- | ------------- | ------------- | ------------- | ------------- | ------------- | + | 404002/404003 | 404002/419388 | 404002/419389 | 404002/404005 | 404002/419390 | 404002/419391 | + + #### 理论评论 + + | 重要理论文章 | 理论热点 | 文学评论 | 创作谈 | 争鸣 | 综述 | 《中国当代文学研究》 | + | ------------- | ------------- | ------------- | ------------- | ------------- | ------------- | + | 404029/419350 | 404029/419351 | 404029/404030 | 404029/404032 | 404029/404033 | 404029/404034 | 404087/404988/425775 | + + #### 文史 + + | 文坛轶事 | 文史漫谈 | 重温经典 | 版本研究 | 名人手迹 | 茅盾文学奖获奖作家研究 | + | ------------- | ------------- | ------------- | ------------- | ------------- | ---------------------- | + | 404057/404063 | 404057/442005 | 404057/419384 | 404057/419387 | 404057/419382 | 404087/404988/429369 | + + #### 科幻 + + | 动态 | 评论 | 作家印象 | 作品 | 科声幻影 | + | ------------- | ------------- | ------------- | ------------- | ------------- | + | 404078/404079 | 404078/404080 | 404078/404081 | 404078/404083 | 404078/404084 | + + #### 书汇 + + | 书摘 | 图书排行 | + | ------------- | ------------- | + | 404058/404067 | 404058/404069 | + + #### 新作品 + + | 小说 | 诗歌 | 散文 | 纪实 | 其他 | + | ------------- | ------------- | ------------- | ------------- | ------------- | + | 404015/404017 | 404015/404020 | 404015/404018 | 404015/404019 | 404015/419926 | + + | 平台推荐 | 本周之星 | 2018年5月18日前原创作品 | + | ------------- | ------------- | ----------------------- | + | 404015/419789 | 404015/431511 | 404009 | + + | 《人民文学》 | 《诗刊》 | 《民族文学》 | 《收获》 | 《十月》 | + | -------------------- | -------------------- | -------------------- | -------------------- | -------------------- | + | 404015/416204/418925 | 404015/416204/418926 | 404015/416204/418928 | 404015/416204/418958 | 404015/416204/418956 | + + | 《小说选刊》 | 《北京文学》 | 《上海文学》 | 《天津文学》 | 《草原》 | + | -------------------- | -------------------- | -------------------- | -------------------- | -------------------- | + | 404015/416204/418929 | 404015/416204/418954 | 404015/416204/418962 | 404015/416204/419004 | 404015/416204/418989 | + + | 《黄河》 | 《江南》 | 《钟山》 | 《广州文艺》 | 《湖南文学》 | + | -------------------- | -------------------- | -------------------- | -------------------- | -------------------- | + | 404015/416204/426204 | 404015/416204/418957 | 404015/416204/418984 | 404015/416204/419881 | 404015/416204/419156 | + + | 《山西文学》 | 《花城》 | 《青年作家》 | 《雨花》 | 《红豆》 | + | -------------------- | -------------------- | -------------------- | -------------------- | -------------------- | + | 404015/416204/419827 | 404015/416204/418960 | 404015/416204/418967 | 404015/416204/419885 | 404015/416204/418993 | + + | 《长江文艺》 | 《中国作家》 | 《青年文学》 | 《美文》 | 《芙蓉》 | + | -------------------- | -------------------- | -------------------- | -------------------- | -------------------- | + | 404015/416204/418961 | 404015/416204/418927 | 404015/416204/418979 | 404015/416204/418985 | 404015/416204/418986 | + + | 《长城》 | 《福建文学》 | 《啄木鸟》 | 《芳草》 | 《小说月报》 | + | -------------------- | -------------------- | -------------------- | -------------------- | -------------------- | + | 404015/416204/418987 | 404015/416204/419003 | 404015/416204/435225 | 404015/416204/424311 | 404015/416204/418963 | + + #### 世界文坛 + + | 视点 | 译介 | 作家印象 | 文学评论 | 影像艺术 | 作品推介 | + | ------------- | ------------- | ------------- | ------------- | ------------- | ------------- | + | 404085/404090 | 404085/431803 | 404085/404091 | 404085/404092 | 404085/404093 | 404085/404095 | + + #### 民族文艺 + + | 动态 | 品评 | 作家印象 | 作品 | 影像 | + | ------------- | ------------- | ------------- | ------------- | ------------- | + | 404086/404098 | 404086/404101 | 404086/404099 | 404086/404100 | 404086/404102 | + + #### 网络文学 + + | 动态 | 观察 | 访谈 | 中国网络小说排行榜 | + | ------------- | ------------- | ------------- | ------------------ | + | 404022/404023 | 404022/404027 | 404022/404024 | 404022/404028 | + + #### 儿童文学 + + | 视点 | 文学评论 | 作家印象 | 作品推介 | 动漫艺术 | + | ------------- | ------------- | ------------- | ------------- | ------------- | + | 404059/404071 | 404059/404072 | 404059/404073 | 404059/404075 | 404059/404076 | + +
+ +
+ ## 重构 {#zhong-gou} ### 推荐 {#zhong-gou-tui-jian}