fix: 掘金 host 变更 (#6532)

This commit is contained in:
LJason 2020-12-26 13:47:15 +08:00 committed by GitHub
parent 6861a9bf04
commit 2b069f532e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 13 additions and 13 deletions

View File

@ -460,7 +460,7 @@
},
],
},
'juejin.im': {
'juejin.cn': {
_name: '掘金',
'.': [
{

View File

@ -10,7 +10,7 @@ module.exports = async (ctx) => {
const { data } = response.data;
const items = data.map(({ base_info }) => ({
title: base_info.title,
link: `https://juejin.im/book/${base_info.booklet_id}`,
link: `https://juejin.cn/book/${base_info.booklet_id}`,
description: `
<img src="${base_info.cover_img}"><br>
<strong>${base_info.title}</strong><br><br>
@ -23,7 +23,7 @@ module.exports = async (ctx) => {
ctx.state.data = {
title: '掘金小册',
link: 'https://juejin.im/books',
link: 'https://juejin.cn/books',
item: items,
};
};

View File

@ -31,9 +31,9 @@ module.exports = async (ctx) => {
const resultItems = await util.ProcessFeed(originalData, ctx.cache);
ctx.state.data = {
title: `掘金${cat.category_name}`,
link: `https://juejin.im/${category}`,
description: `掘金${cat.category_name}`,
title: `掘金 ${cat.category_name}`,
link: `https://juejin.cn/${category}`,
description: `掘金 ${cat.category_name}`,
item: resultItems,
};
};

View File

@ -18,7 +18,7 @@ module.exports = async (ctx) => {
ctx.state.data = {
title: '掘金 - 单个收藏夹',
link: `https://juejin.im/collection/${collectionId}`,
link: `https://juejin.cn/collection/${collectionId}`,
description: '掘金,用户单个收藏夹',
item: result,
allowEmpty: true,

View File

@ -60,7 +60,7 @@ module.exports = async (ctx) => {
ctx.state.data = {
title: `沸点 - ${title[type]}`,
link: 'https://juejin.im/pins/recommended',
link: 'https://juejin.cn/pins/recommended',
item: items,
};
};

View File

@ -18,7 +18,7 @@ module.exports = async (ctx) => {
ctx.state.data = {
title: `掘金专栏-${username}`,
link: `https://juejin.im/user/${id}/posts`,
link: `https://juejin.cn/user/${id}/posts`,
description: `掘金专栏-${username}`,
item: resultItems,
};

View File

@ -32,9 +32,9 @@ module.exports = async (ctx) => {
const resultItems = await util.ProcessFeed(originalData, ctx.cache);
ctx.state.data = {
title: `掘金${tag}`,
link: `https://juejin.im/tag/${encodeURIComponent(tag)}`,
description: `掘金${tag}`,
title: `掘金 ${tag}`,
link: `https://juejin.cn/tag/${encodeURIComponent(tag)}`,
description: `掘金 ${tag}`,
item: resultItems,
};
};

View File

@ -32,7 +32,7 @@ const ProcessFeed = async (list, caches) =>
list.map(async (item) => {
// 解析时间补偿时区offset
const pubdate = new Date(parseInt(item.article_info.ctime) * 1000 - 8 * 60 * 60 * 1000);
const link = `https://juejin.im/post/${item.article_id}`;
const link = `https://juejin.cn/post/${item.article_id}`;
// 列表上提取到的信息
const single = {
title: item.article_info.title,