style: auto format

This commit is contained in:
github-actions[bot] 2023-02-02 12:57:04 +00:00
parent 000c7e0f57
commit 7d4d136de4
3 changed files with 47 additions and 47 deletions

View File

@ -814,6 +814,34 @@ GitHub 官方也提供了一些 RSS:
<Route author="TonyRL" example="/baai/hub/comments" path="/baai/hub/comments" radar="1"/>
## 登链社区
### 文章
<Route author="running-grass" example="/learnblockchain/posts/DApp/newest" path="/eleduck/posts/:cid/:sort?" :paramsDesc="['分类id,更多分类可以论坛的URL找到', '排序方式,默认精选']" radar="1">
| id | 分类 |
| -------- | ------ |
| all | 全部 |
| DApp | 去中心化应用 |
| chains | 公链 |
| 联盟链 | 联盟链 |
| scaling | Layer2 |
| langs | 编程语言 |
| security | 安全 |
| dst | 存储 |
| basic | 理论研究 |
| other | 其他 |
| id | 排序方式 |
| -------- | ------- |
| newest | 最新 |
| featured | 精选 (默认) |
| featured | 最赞 |
| hottest | 最热 |
</Route>
## 饿了么开放平台
### 商家开放平台公告
@ -824,35 +852,6 @@ GitHub 官方也提供了一些 RSS:
<Route author="phantomk" example="/eleme/open-be/announce" path="/eleme/open-be/announce"/>
## 登链社区
### 文章
<Route author="running-grass" example="/learnblockchain/posts/DApp/newest" path="/eleduck/posts/:cid/:sort?" :paramsDesc="['分类id,更多分类可以论坛的URL找到', '排序方式,默认精选']" radar="1">
| id | 分类 |
|----------|--------------|
| all | 全部 |
| DApp | 去中心化应用 |
| chains | 公链 |
| 联盟链 | 联盟链 |
| scaling | Layer2 |
| langs | 编程语言 |
| security | 安全 |
| dst | 存储 |
| basic | 理论研究 |
| other | 其他 |
| id | 排序方式 |
|----------|------------|
| newest | 最新 |
| featured | 精选(默认) |
| featured | 最赞 |
| hottest | 最热 |
</Route>
## 极客时间
### 专栏文章

View File

@ -1,8 +1,6 @@
const cheerio = require('cheerio');
const got = require('@/utils/got');
const {
parseRelativeDate
} = require('@/utils/parse-date');
const { parseRelativeDate } = require('@/utils/parse-date');
module.exports = async (ctx) => {
const cid = ctx.params.cid || 'all';
@ -25,18 +23,21 @@ module.exports = async (ctx) => {
title: `登链社区--${cid}`,
link: url,
description: `登链社区`,
item: list && list.map((idx, ite) => {
const item = $(ite);
const json = {
title: item.find('h2.title').text().trim(),
description: item.find('div.excerpt').text().trim(),
pubDate: parseRelativeDate(item.find('.author li:nth-child(2)').text().replace('发布于', '').trim()),
link: item.find('h2.title a').attr('href').trim(),
author: item.find('.author li:nth-child(1)').text().trim(),
};
item:
list &&
list
.map((idx, ite) => {
const item = $(ite);
const json = {
title: item.find('h2.title').text().trim(),
description: item.find('div.excerpt').text().trim(),
pubDate: parseRelativeDate(item.find('.author li:nth-child(2)').text().replace('发布于', '').trim()),
link: item.find('h2.title a').attr('href').trim(),
author: item.find('.author li:nth-child(1)').text().trim(),
};
return json;
}).get(),
return json;
})
.get(),
};
};

View File

@ -1,7 +1,8 @@
module.exports = {
'learnblockchain.cn': {
_name: '登链社区',
'.': [{
'.': [
{
title: '分类文章',
docs: 'https://docs.rsshub.app/programming.html#deng-lian-she-qu-wen-zhang',
source: '/categories/:cid/:sort?',
@ -12,8 +13,7 @@ module.exports = {
docs: 'https://docs.rsshub.app/programming.html#deng-lian-she-qu-wen-zhang',
source: '*',
target: () => '/learnblockchain/posts/all/',
}
},
],
},
};