diff --git a/docs/other.md b/docs/other.md index 8893105f1..8525cd66d 100644 --- a/docs/other.md +++ b/docs/other.md @@ -519,7 +519,7 @@ type 为 all 时,category 参数不支持 cost 和 free ### 王垠-当然我在扯淡 - + ## 古诗文网 diff --git a/lib/routes/blogs/wangyin.js b/lib/routes/blogs/wangyin.js index 60fd4ac90..fb8ac54b0 100644 --- a/lib/routes/blogs/wangyin.js +++ b/lib/routes/blogs/wangyin.js @@ -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();