style: auto format

This commit is contained in:
github-actions[bot] 2024-02-02 15:49:43 +00:00
parent 0a909ecd93
commit 3b4c9ebe42
2 changed files with 17 additions and 16 deletions

View File

@ -8,20 +8,21 @@ module.exports = async (ctx) => {
const response = await got(link);
const data = response.data;
const $ = cheerio.load(data);
const list = $('#board article').toArray().map((item) => {
item = $(item);
return {
title: item.find('.index-header').text(),
link: item.find('.index-header').children('a').attr('href'),
description: item.find('.index-excerpt.index-excerpt__noimg').children('div').text(),
pubDate: timezone(parseDate(item.find('.post-meta.mr-3').children('time').attr('datetime'), 'YYYY年MM月DD日 HH:mm'), +8),
};
});
const list = $('#board article')
.toArray()
.map((item) => {
item = $(item);
return {
title: item.find('.index-header').text(),
link: item.find('.index-header').children('a').attr('href'),
description: item.find('.index-excerpt.index-excerpt__noimg').children('div').text(),
pubDate: timezone(parseDate(item.find('.post-meta.mr-3').children('time').attr('datetime'), 'YYYY年MM月DD日 HH:mm'), +8),
};
});
ctx.state.data = {
title: $('title').text(),
link,
item: list,
};
};

View File

@ -4594,6 +4594,12 @@
根据维基新闻的[sitemap](https://zh.wikinews.org/wiki/Special:%E6%96%B0%E9%97%BB%E8%AE%A2%E9%98%85)获取新闻全文。目前仅支持中文维基新闻。
</Route>
## 我不是盐神 {#wo-bu-shi-yan-shen}
### 首页 {#wo-bu-shi-yan-shen-shou-ye}
<Route author="ruoshui9527" example="/onehu" path="/onehu" />
## 乌有之乡 {#wu-you-zhi-xiang}
### 栏目 {#wu-you-zhi-xiang-lan-mu}
@ -5288,9 +5294,3 @@
### 公众号 {#zi-you-wei-xin-gong-zhong-hao}
<Route author="TonyRL" example="/freewechat/profile/MzI5NTUxNzk3OA==" path="/freewechat/profile/:id" paramsDesc={['公众号 ID可在URL中找到']} radar="1" anticrawler="1" />
## 我不是盐神 {#wo-bu-shi-yan-shen}
### 首页 {#wo-bu-shi-yan-shen-shou-ye}
<Route author="ruoshui9527" example="/onehu" path="/onehu" />