From 33a651b6895141fd05d0747d703b5cf74544a2d5 Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
<41898282+github-actions[bot]@users.noreply.github.com>
Date: Wed, 7 May 2025 06:55:15 +0000
Subject: [PATCH] style: auto format
---
lib/routes/hpoi/info.ts | 40 +++++++++++++++++++++-------------------
1 file changed, 21 insertions(+), 19 deletions(-)
diff --git a/lib/routes/hpoi/info.ts b/lib/routes/hpoi/info.ts
index fbe7cea5f..a03137311 100644
--- a/lib/routes/hpoi/info.ts
+++ b/lib/routes/hpoi/info.ts
@@ -80,25 +80,27 @@ async function handler(ctx) {
const $ = load(response.data);
- const items = $('.home-info').toArray().map((ele) => {
- const $item = load(ele);
- const leftNode = $item('.overlay-container');
- const relativeLink = leftNode.find('a').first().attr('href');
- const typeName = leftNode.find('.type-name').first().text().trim();
- const imgUrl = leftNode.find('img').first().attr('src');
- const rightNode = $item('.home-info-content');
- const infoType = rightNode.find('.user-name').contents()[0].data.trim();
- const infoTitle = rightNode.find('.user-content').text();
- const infoTime = rightNode.find('.type-time').text();
- return {
- title: infoTitle,
- pubDate: parseRelativeDate(infoTime),
- link: `${baseUrl}/${relativeLink}`,
- category: infoType,
- typeName,
- description: [`类型:${typeName}`, infoTitle, `更新内容: ${infoType}`, `
`].join('
'),
- };
- });
+ const items = $('.home-info')
+ .toArray()
+ .map((ele) => {
+ const $item = load(ele);
+ const leftNode = $item('.overlay-container');
+ const relativeLink = leftNode.find('a').first().attr('href');
+ const typeName = leftNode.find('.type-name').first().text().trim();
+ const imgUrl = leftNode.find('img').first().attr('src');
+ const rightNode = $item('.home-info-content');
+ const infoType = rightNode.find('.user-name').contents()[0].data.trim();
+ const infoTitle = rightNode.find('.user-content').text();
+ const infoTime = rightNode.find('.type-time').text();
+ return {
+ title: infoTitle,
+ pubDate: parseRelativeDate(infoTime),
+ link: `${baseUrl}/${relativeLink}`,
+ category: infoType,
+ typeName,
+ description: [`类型:${typeName}`, infoTitle, `更新内容: ${infoType}`, `
`].join('
'),
+ };
+ });
const items2 = filterSet.size > 0 ? items.filter((e) => filterSet.has(e.typeName)) : items;