From e9a6ff3ac3f3aa508863829ecba5d72c2ca2b27d Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
<41898282+github-actions[bot]@users.noreply.github.com>
Date: Mon, 5 Dec 2022 15:54:52 +0000
Subject: [PATCH] style: auto format
---
lib/v2/bangumi/tv/group/topic.js | 38 +++++++++++++++++---------------
1 file changed, 20 insertions(+), 18 deletions(-)
diff --git a/lib/v2/bangumi/tv/group/topic.js b/lib/v2/bangumi/tv/group/topic.js
index f99093989..1ec21d6b7 100644
--- a/lib/v2/bangumi/tv/group/topic.js
+++ b/lib/v2/bangumi/tv/group/topic.js
@@ -10,24 +10,26 @@ module.exports = async (ctx) => {
const $ = cheerio.load(html);
const title = 'Bangumi - ' + $('.SecondaryNavTitle').text();
- const items = await Promise.all($('.topic_list .topic')
- .toArray()
- .map(async (elem) => {
- const link = new URL($('.subject a', elem).attr('href'), base_url).href;
- const fullText = await ctx.cache.tryGet(link, async () => {
- const { data: html } = await got(link);
- const $ = cheerio.load(html);
- return $('.postTopic .topic_content').html();
- });
- const summary = 'Reply: ' + $('.posts', elem).text();
- return {
- link,
- title: $('.subject a', elem).attr('title'),
- pubDate: parseDate($('.lastpost .time', elem).text()),
- description: fullText ? summary + '
' + fullText : summary,
- author: $('.author a', elem).text(),
- };
- }));
+ const items = await Promise.all(
+ $('.topic_list .topic')
+ .toArray()
+ .map(async (elem) => {
+ const link = new URL($('.subject a', elem).attr('href'), base_url).href;
+ const fullText = await ctx.cache.tryGet(link, async () => {
+ const { data: html } = await got(link);
+ const $ = cheerio.load(html);
+ return $('.postTopic .topic_content').html();
+ });
+ const summary = 'Reply: ' + $('.posts', elem).text();
+ return {
+ link,
+ title: $('.subject a', elem).attr('title'),
+ pubDate: parseDate($('.lastpost .time', elem).text()),
+ description: fullText ? summary + '
' + fullText : summary,
+ author: $('.author a', elem).text(),
+ };
+ })
+ );
ctx.state.data = {
title,