mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-10-28 03:28:35 +08:00
feat: add pubDate for wangyin (#2777)
* feat: add pubDate for wangyin * add author of wangyin
This commit is contained in:
+1
-1
@@ -519,7 +519,7 @@ type 为 all 时,category 参数不支持 cost 和 free
|
||||
|
||||
### 王垠-当然我在扯淡
|
||||
|
||||
<Route author="junbaor" example="/blogs/wangyin" path="/blogs/wangyin"/>
|
||||
<Route author="junbaor SkiTiSu" example="/blogs/wangyin" path="/blogs/wangyin"/>
|
||||
|
||||
## 古诗文网
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
const date = require('@/utils/date');
|
||||
const got = require('@/utils/got');
|
||||
const cheerio = require('cheerio');
|
||||
|
||||
@@ -11,12 +12,14 @@ module.exports = async (ctx) => {
|
||||
const element = $(e);
|
||||
const title = element.find('a').text();
|
||||
const link = url + element.find('a').attr('href');
|
||||
const dateraw = /(\d+)\/(\d+)\/(\d+)/.exec(link);
|
||||
|
||||
return {
|
||||
title: title,
|
||||
description: '',
|
||||
link: link,
|
||||
author: '王垠',
|
||||
pubDate: date(`${dateraw[1]}-${dateraw[2]}-${dateraw[3]}`),
|
||||
};
|
||||
})
|
||||
.get();
|
||||
|
||||
Reference in New Issue
Block a user