mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-02 18:18:06 +08:00
style: auto format
This commit is contained in:
52
docs/blog.md
52
docs/blog.md
@@ -30,32 +30,6 @@ pageClass: routes
|
|||||||
|
|
||||||
<Route author="nczitzk" example="/google/sites/recentChanges/outlierseconomics" path="/google/sites/recentChanges/:id" :paramsDesc="['Site ID, 可在 URL 中找到']"/>
|
<Route author="nczitzk" example="/google/sites/recentChanges/outlierseconomics" path="/google/sites/recentChanges/:id" :paramsDesc="['Site ID, 可在 URL 中找到']"/>
|
||||||
|
|
||||||
## 博客园
|
|
||||||
|
|
||||||
### 10天推荐排行榜
|
|
||||||
|
|
||||||
<Route author="hujingnb" example="/cnblogs/aggsite/topdiggs" path="/cnblogs/aggsite/topdiggs" radar="1" rssbud="1"/>
|
|
||||||
|
|
||||||
### 48小时阅读排行
|
|
||||||
|
|
||||||
<Route author="hujingnb" example="/cnblogs/aggsite/topviews" path="/cnblogs/aggsite/topviews" radar="1" rssbud="1"/>
|
|
||||||
|
|
||||||
### 编辑推荐
|
|
||||||
|
|
||||||
<Route author="hujingnb" example="/cnblogs/aggsite/headline" path="/cnblogs/aggsite/headline" radar="1" rssbud="1"/>
|
|
||||||
|
|
||||||
### 分类
|
|
||||||
|
|
||||||
<Route author="hujingnb" example="/cnblogs/cate/go" path="/cnblogs/cate/:type" :paramsDesc="['类型']" radar="1" rssbud="1">
|
|
||||||
|
|
||||||
在博客园主页的分类出可查看所有类型. 例如, go的分类地址为: `https://www.cnblogs.com/cate/go/`, 则: [`/cnblogs/cate/go`](https://rsshub.app/cnblogs/cate/go)
|
|
||||||
|
|
||||||
</Route>
|
|
||||||
|
|
||||||
### 精华区
|
|
||||||
|
|
||||||
<Route author="hujingnb" example="/cnblogs/pick" path="/cnblogs/pick" radar="1" rssbud="1"/>
|
|
||||||
|
|
||||||
## Gwern Branwen
|
## Gwern Branwen
|
||||||
|
|
||||||
### 博客
|
### 博客
|
||||||
@@ -216,6 +190,32 @@ username 为博主用户名,而非`xxx.hashnode.dev`中`xxx`所代表的 blog
|
|||||||
|
|
||||||
<Route author="attenuation" example="/aliyun-kernel/index" path="/aliyun-kernel/index"/>
|
<Route author="attenuation" example="/aliyun-kernel/index" path="/aliyun-kernel/index"/>
|
||||||
|
|
||||||
|
## 博客园
|
||||||
|
|
||||||
|
### 10 天推荐排行榜
|
||||||
|
|
||||||
|
<Route author="hujingnb" example="/cnblogs/aggsite/topdiggs" path="/cnblogs/aggsite/topdiggs" radar="1" rssbud="1"/>
|
||||||
|
|
||||||
|
### 48 小时阅读排行
|
||||||
|
|
||||||
|
<Route author="hujingnb" example="/cnblogs/aggsite/topviews" path="/cnblogs/aggsite/topviews" radar="1" rssbud="1"/>
|
||||||
|
|
||||||
|
### 编辑推荐
|
||||||
|
|
||||||
|
<Route author="hujingnb" example="/cnblogs/aggsite/headline" path="/cnblogs/aggsite/headline" radar="1" rssbud="1"/>
|
||||||
|
|
||||||
|
### 分类
|
||||||
|
|
||||||
|
<Route author="hujingnb" example="/cnblogs/cate/go" path="/cnblogs/cate/:type" :paramsDesc="['类型']" radar="1" rssbud="1">
|
||||||
|
|
||||||
|
在博客园主页的分类出可查看所有类型。例如,go 的分类地址为: `https://www.cnblogs.com/cate/go/`, 则: [`/cnblogs/cate/go`](https://rsshub.app/cnblogs/cate/go)
|
||||||
|
|
||||||
|
</Route>
|
||||||
|
|
||||||
|
### 精华区
|
||||||
|
|
||||||
|
<Route author="hujingnb" example="/cnblogs/pick" path="/cnblogs/pick" radar="1" rssbud="1"/>
|
||||||
|
|
||||||
## 财新博客
|
## 财新博客
|
||||||
|
|
||||||
### 用户博客
|
### 用户博客
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ const cheerio = require('cheerio');
|
|||||||
const { parseDate } = require('@/utils/parse-date');
|
const { parseDate } = require('@/utils/parse-date');
|
||||||
const timezone = require('@/utils/timezone');
|
const timezone = require('@/utils/timezone');
|
||||||
|
|
||||||
|
|
||||||
module.exports = async (ctx) => {
|
module.exports = async (ctx) => {
|
||||||
const link = `https://www.cnblogs.com${ctx.path}`;
|
const link = `https://www.cnblogs.com${ctx.path}`;
|
||||||
const response = await got(link);
|
const response = await got(link);
|
||||||
@@ -17,14 +16,7 @@ module.exports = async (ctx) => {
|
|||||||
return {
|
return {
|
||||||
title: item.find('.post-item-title').text(),
|
title: item.find('.post-item-title').text(),
|
||||||
link: item.find('.post-item-title').attr('href'),
|
link: item.find('.post-item-title').attr('href'),
|
||||||
pubDate: timezone(
|
pubDate: timezone(parseDate(item.find('.post-item-foot .post-meta-item span').text() || item.find('.editorpick-item-meta').text(), ['YYYY-MM-DD HH:mm', 'YYYY-MM-DD']), +8),
|
||||||
parseDate(
|
|
||||||
item.find('.post-item-foot .post-meta-item span').text() ||
|
|
||||||
item.find('.editorpick-item-meta').text(),
|
|
||||||
['YYYY-MM-DD HH:mm', 'YYYY-MM-DD']
|
|
||||||
),
|
|
||||||
+8
|
|
||||||
),
|
|
||||||
description: item.find('.post-item-summary').text(),
|
description: item.find('.post-item-summary').text(),
|
||||||
author: item.find('.post-item-author span').text(),
|
author: item.find('.post-item-author span').text(),
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user