diff --git a/lib/v2/zrblog/rss.js b/lib/v2/zrblog/rss.js index ce5ebcd31..a6fd6c2bf 100644 --- a/lib/v2/zrblog/rss.js +++ b/lib/v2/zrblog/rss.js @@ -2,33 +2,31 @@ const { parseDate } = require('@/utils/parse-date'); const got = require('@/utils/got'); const cheerio = require('cheerio'); - module.exports = async (ctx) => { const url = 'https://www.zrblog.net/'; const response = await got({ method: 'get', url }); const $ = cheerio.load(response.data); - const list = $("div.art_img_box") - .map((i, e) => { - const element = $(e); - const title = element.find('h2 > a').attr('title'); - const link = element.find('h2 > a').attr('href'); - const description = element.find('p.intro').text(); - const dateraw = element.find("div.info").find('span').eq(0).text(); - - return { - title, - description, - link, - pubDate: parseDate(dateraw, '发布日期:YYYY年MM月DD日'), - }; - }) - .get(); + const list = $('div.art_img_box') + .map((i, e) => { + const element = $(e); + const title = element.find('h2 > a').attr('title'); + const link = element.find('h2 > a').attr('href'); + const description = element.find('p.intro').text(); + const dateraw = element.find('div.info').find('span').eq(0).text(); + return { + title, + description, + link, + pubDate: parseDate(dateraw, '发布日期:YYYY年MM月DD日'), + }; + }) + .get(); ctx.state.data = { title: '赵容部落', link: url, item: list, }; -}; \ No newline at end of file +}; diff --git a/website/docs/routes/blog.mdx b/website/docs/routes/blog.mdx index 82c6608bd..84aa4d03b 100644 --- a/website/docs/routes/blog.mdx +++ b/website/docs/routes/blog.mdx @@ -460,6 +460,12 @@ +## 赵容部落 {#zhao-rong-bu-luo} + +### 博客 {#zhao-rong-bu-luo-bo-ke} + + + ## 浙江大学可视分析小组 {#zhe-jiang-da-xue-ke-shi-fen-xi-xiao-zu} ### 博客 {#zhe-jiang-da-xue-ke-shi-fen-xi-xiao-zu-bo-ke} @@ -485,9 +491,3 @@ ### 上周热门 TOP 20 {#zhu-bai-shang-zhou-re-men-top-20} - -## 赵容部落 {#zhao-rong-bu-luo} - -### 博客 {#zhao-rong-bu-luo-bo-ke} - - \ No newline at end of file