style: auto format

This commit is contained in:
github-actions[bot]
2024-02-28 16:10:37 +00:00
parent f02487a97c
commit 3676871a7d
2 changed files with 22 additions and 24 deletions
+16 -18
View File
@@ -2,33 +2,31 @@ const { parseDate } = require('@/utils/parse-date');
const got = require('@/utils/got');
const cheerio = require('cheerio');
module.exports = async (ctx) => {
const url = 'https://www.zrblog.net/';
const response = await got({ method: 'get', url });
const $ = cheerio.load(response.data);
const list = $("div.art_img_box")
.map((i, e) => {
const element = $(e);
const title = element.find('h2 > a').attr('title');
const link = element.find('h2 > a').attr('href');
const description = element.find('p.intro').text();
const dateraw = element.find("div.info").find('span').eq(0).text();
return {
title,
description,
link,
pubDate: parseDate(dateraw, '发布日期:YYYY年MM月DD日'),
};
})
.get();
const list = $('div.art_img_box')
.map((i, e) => {
const element = $(e);
const title = element.find('h2 > a').attr('title');
const link = element.find('h2 > a').attr('href');
const description = element.find('p.intro').text();
const dateraw = element.find('div.info').find('span').eq(0).text();
return {
title,
description,
link,
pubDate: parseDate(dateraw, '发布日期:YYYY年MM月DD日'),
};
})
.get();
ctx.state.data = {
title: '赵容部落',
link: url,
item: list,
};
};
};
+6 -6
View File
@@ -460,6 +460,12 @@
<Route author="aneasystone" example="/cloudnative/blog" path="/cloudnative/blog" />
## 赵容部落 {#zhao-rong-bu-luo}
### 博客 {#zhao-rong-bu-luo-bo-ke}
<Route author="cnkmmk" example="/zrblog" path="/zrblog" />
## 浙江大学可视分析小组 {#zhe-jiang-da-xue-ke-shi-fen-xi-xiao-zu}
### 博客 {#zhe-jiang-da-xue-ke-shi-fen-xi-xiao-zu-bo-ke}
@@ -485,9 +491,3 @@
### 上周热门 TOP 20 {#zhu-bai-shang-zhou-re-men-top-20}
<Route author="nczitzk" example="/zhubai/top20" path="/zhubai/top20" radar="1" />
## 赵容部落 {#zhao-rong-bu-luo}
### 博客 {#zhao-rong-bu-luo-bo-ke}
<Route author="cnkmmk" example="/zrblog" path="/zrblog" />