diff --git a/lib/v2/cnki/author.js b/lib/v2/cnki/author.js index 2bdae4189..0198933e2 100644 --- a/lib/v2/cnki/author.js +++ b/lib/v2/cnki/author.js @@ -21,7 +21,7 @@ module.exports = async (ctx) => { scode: code, acode: code, }, - followRedirect: false + followRedirect: false, }); const authorPageUrl = res2.headers.location; @@ -30,22 +30,22 @@ module.exports = async (ctx) => { const url = `${rootUrl}/restapi/knowledge-api/v1/experts/relations/resources?v=${code2}&sequence=PT&size=10&sort=desc&start=1&resource=CJFD`; - const res3 = await got(url, {headers: {Referer: authorPageUrl}}); + const res3 = await got(url, { headers: { Referer: authorPageUrl } }); const publications = res3.data.data.data; const list = publications.map((publication) => { const metadata = publication.metadata; - const {value: title = ''} = metadata.find((md) => md.name === 'TI') || {}; - const {value: date = ''} = metadata.find((md) => md.name === 'PT') || {}; - const {value: filename = ''} = metadata.find((md) => md.name === 'FN') || {}; + const { value: title = '' } = metadata.find((md) => md.name === 'TI') || {}; + const { value: date = '' } = metadata.find((md) => md.name === 'PT') || {}; + const { value: filename = '' } = metadata.find((md) => md.name === 'FN') || {}; return { title, link: `https://cnki.net/kcms/detail/detail.aspx?filename=${filename}&dbcode=CJFD`, author: authorName, - pubDate: date + pubDate: date, }; - }); + }); const items = await Promise.all(list.map((item) => ctx.cache.tryGet(item.link, () => utils.ProcessItem(item))));