From 2d23974f412ddc9b799ed36ce2887867650e3285 Mon Sep 17 00:00:00 2001 From: DIYgod Date: Sat, 29 Apr 2023 19:20:36 +0100 Subject: [PATCH] feat: remove rss3 --- docs/README.md | 8 ------- docs/en/README.md | 8 ------- docs/en/new-media.md | 6 ------ docs/new-media.md | 6 ------ lib/router.js | 3 --- lib/routes/rss3/blog.js | 46 ----------------------------------------- 6 files changed, 77 deletions(-) delete mode 100644 lib/routes/rss3/blog.js diff --git a/docs/README.md b/docs/README.md index e3f7babc5..053ffd972 100644 --- a/docs/README.md +++ b/docs/README.md @@ -27,14 +27,6 @@ RSSHub 是一个开源、简单易用、易于扩展的 RSS 生成器,可以 ## 鸣谢 -### Special Sponsors - -
-RSS3 -
- -[![](https://opencollective.com/static/images/become_sponsor.svg)](/support/) - ### Contributors [![](https://opencollective.com/RSSHub/contributors.svg?width=740)](https://github.com/DIYgod/RSSHub/graphs/contributors) diff --git a/docs/en/README.md b/docs/en/README.md index 6259a7451..78323d2c0 100644 --- a/docs/en/README.md +++ b/docs/en/README.md @@ -27,14 +27,6 @@ RSSHub can be used with browser extension [RSSHub Radar](https://github.com/DIYg ## Special Thanks -### Special Sponsors - -
-RSS3 -
- -[![](https://opencollective.com/static/images/become_sponsor.svg)](/en/support/) - ### Contributors [![](https://opencollective.com/RSSHub/contributors.svg?width=740)](https://github.com/DIYgod/RSSHub/graphs/contributors) diff --git a/docs/en/new-media.md b/docs/en/new-media.md index 1e277d40c..54901f223 100644 --- a/docs/en/new-media.md +++ b/docs/en/new-media.md @@ -607,12 +607,6 @@ Compared to the official one, this feed: -## RSS3 - -### Blog - - - ## Sakamichi Series ### Nogizaka46 News diff --git a/docs/new-media.md b/docs/new-media.md index 7b0d4efb4..3650c2668 100644 --- a/docs/new-media.md +++ b/docs/new-media.md @@ -1231,12 +1231,6 @@ IPFS 网关有可能失效,那时候换成其他网关。 -## RSS3 - -### Blog - - - ## Samsung ### Research Blog diff --git a/lib/router.js b/lib/router.js index a24d6de8b..29e49bb1d 100644 --- a/lib/router.js +++ b/lib/router.js @@ -4024,9 +4024,6 @@ router.get('/sbs/chinese/:category?/:id?/:dialect?/:language?', lazyloadRouteHan // QuestMobile router.get('/questmobile/report/:category?/:label?', lazyloadRouteHandler('./routes/questmobile/report')); -// RSS3 -router.get('/rss3/blog', lazyloadRouteHandler('./routes/rss3/blog')); - // 星球日报 // router.get('/odaily/activity', lazyloadRouteHandler('./routes/odaily/activity')); // router.get('/odaily/newsflash', lazyloadRouteHandler('./routes/odaily/newsflash')); diff --git a/lib/routes/rss3/blog.js b/lib/routes/rss3/blog.js deleted file mode 100644 index b2f1c99c5..000000000 --- a/lib/routes/rss3/blog.js +++ /dev/null @@ -1,46 +0,0 @@ -const got = require('@/utils/got'); -const cheerio = require('cheerio'); - -module.exports = async (ctx) => { - const rootUrl = 'https://blog.rss3.io'; - const response = await got({ - method: 'get', - url: rootUrl, - }); - - const $ = cheerio.load(response.data); - - const list = $('h1 a') - .slice(0, 15) - .map((_, item) => { - item = $(item); - return { - title: item.text(), - link: `${rootUrl}${item.attr('href')}`, - }; - }) - .get(); - - const items = await Promise.all( - list.map((item) => - ctx.cache.tryGet(item.link, async () => { - const detailResponse = await got({ - method: 'get', - url: item.link, - }); - const content = cheerio.load(detailResponse.data); - - item.description = content('.post-content').html(); - item.pubDate = Date.parse(content('small time').attr('datetime')); - - return item; - }) - ) - ); - - ctx.state.data = { - title: 'Blog - RSS3', - link: rootUrl, - item: items, - }; -};