fix: remove share key from coolapk guid (#4576)

This commit is contained in:
hoilc 2020-04-28 11:16:15 +08:00 committed by GitHub
parent 1896282f7d
commit e7dc82be42
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -14,13 +14,13 @@ module.exports = async (ctx) => {
data.map(async (item) => {
const title = item.title;
const pubdate = new Date(item.dateline * 1000).toUTCString();
const itemUrl = item.shareUrl;
const itemUrl = item.shareUrl.split('?')[0];
const author = item.username;
const description = await ctx.cache.tryGet(itemUrl, async () => {
const result = await got({
method: 'get',
url: itemUrl.split('?')[0],
url: itemUrl,
headers: utils.getHeaders(),
});
@ -53,7 +53,7 @@ module.exports = async (ctx) => {
ctx.state.data = {
title: `酷安图文`,
link: full_url,
link: 'https://www.coolapk.com/',
description: `酷安 - 编辑精选 - 图文`,
item: out,
};