fix:avoid using comma to separate expression

This commit is contained in:
KotoriK
2021-01-10 21:12:31 +08:00
committed by GitHub
parent b40838cff6
commit cb14668374
+7 -7
View File
@@ -22,13 +22,13 @@ function resolveRelativeTime(relativeTime) {
return (((day || 0) * 24 + (hour || 0)) * 60 + (min || 0)) * 60 * 1000;
}
module.exports = async (ctx) => {
const { id } = ctx.params,
feed_url = `${BASE_URL}/article/${id ? `index/id/${id}` : ''}`,
resp = await got({ url: feed_url }),
{ data } = resp,
$ = cheerio.load(data),
feed_title = $('title').text(),
list = $('.news-info-box')
const { id } = ctx.params;
const feed_url = `${BASE_URL}/article/${id ? `index/id/${id}` : ''}`;
const resp = await got({ url: feed_url });
const { data } = resp;
const $ = cheerio.load(data);
const feed_title = $('title').text();
const list = $('.news-info-box')
.map((_, item) => {
item = $(item);
const txt_author_pubDate = $(item.find('div > p > span')[1]).text();