diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 4b609b22075192..c11a215094233a 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -24,4 +24,4 @@ jobs: close-pr-message: 'This PR was closed because it has been stalled for 7 days with no activity.' exempt-issue-labels: 'dependencies,wait for upstream' exempt-pr-labels: 'dependencies,wait for upstream' - any-of-labels: 'more data required' + any-of-issue-labels: 'more data required' diff --git a/README.md b/README.md index 76decc4aae3d0b..952edaa6659e08 100644 --- a/README.md +++ b/README.md @@ -5,14 +5,15 @@ > 🍰 Everything is RSSible -[![docker publish](https://img.shields.io/docker/pulls/diygod/rsshub?label=docker%20publish&logo=docker&style=flat-square)](https://hub.docker.com/r/diygod/rsshub) -[![npm publish](https://img.shields.io/npm/dt/rsshub?label=npm%20publish&logo=npm&style=flat-square)](https://www.npmjs.com/package/rsshub) +[![](https://img.shields.io/badge/dynamic/json?url=https://rsshub-analytics.diygod.workers.dev/&query=requests&color=F38020&label=requests&logo=cloudflare&style=flat-square&suffix=/month)](https://rsshub.app) +[![docker publish](https://img.shields.io/docker/pulls/diygod/rsshub?label=docker%20pulls&logo=docker&style=flat-square)](https://hub.docker.com/r/diygod/rsshub) +[![npm publish](https://img.shields.io/npm/dt/rsshub?label=npm%20downloads&logo=npm&style=flat-square)](https://www.npmjs.com/package/rsshub) [![test](https://img.shields.io/github/actions/workflow/status/DIYgod/RSSHub/test.yml?branch=master&label=test&logo=github&style=flat-square)](https://github.com/DIYgod/RSSHub/actions/workflows/test.yml?query=event%3Apush+branch%3Amaster) [![Test coverage](https://img.shields.io/codecov/c/github/DIYgod/RSSHub.svg?style=flat-square&logo=codecov)](https://app.codecov.io/gh/DIYgod/RSSHub/branch/master) [![CodeFactor](https://www.codefactor.io/repository/github/diygod/rsshub/badge)](https://www.codefactor.io/repository/github/diygod/rsshub) [![DeepScan grade](https://deepscan.io/api/teams/6244/projects/8135/branches/92448/badge/grade.svg)](https://deepscan.io/dashboard#view=project&tid=6244&pid=8135&bid=92448) -[![Telegram group](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fapi.swo.moe%2Fstats%2Ftelegram%2Frsshub&query=count&color=2CA5E0&label=Telegram%20Group&labelColor=282c34&logo=telegram&cacheSeconds=3600&style=flat-square)](https://t.me/rsshub) [![Telegram channel](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fapi.swo.moe%2Fstats%2Ftelegram%2FawesomeRSSHub&query=count&color=2CA5E0&label=Telegram%20Channel&labelColor=282c34&logo=telegram&cacheSeconds=3600&style=flat-square)](https://t.me/awesomeRSSHub) +[![Telegram group](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fapi.swo.moe%2Fstats%2Ftelegram%2Frsshub&query=count&color=2CA5E0&label=Telegram%20Group&logo=telegram&cacheSeconds=3600&style=flat-square)](https://t.me/rsshub) [![Telegram channel](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fapi.swo.moe%2Fstats%2Ftelegram%2FawesomeRSSHub&query=count&color=2CA5E0&label=Telegram%20Channel&logo=telegram&cacheSeconds=3600&style=flat-square)](https://t.me/awesomeRSSHub) ## Introduction @@ -49,7 +50,7 @@ Logo designer [sheldonrrr](https://dribbble.com/sheldonrrr) ## Related Projects - [RSSHub Radar](https://github.com/DIYgod/RSSHub-Radar) | A browser extension that can help you quickly discover and subscribe to the RSS and RSSHub of current websites. -- [RSSBud](https://github.com/Cay-Zhang/RSSBud) ([TestFlight](https://testflight.apple.com/join/rjCVzzHP)) | RSSHub Radar for iOS platform, designed specifically for mobile ecosystem optimization. +- [RSSBud](https://github.com/Cay-Zhang/RSSBud) | RSSHub Radar for iOS platform, designed specifically for mobile ecosystem optimization. - [RSSAid](https://github.com/LeetaoGoooo/RSSAid) | RSSHub Radar for Android platform built with Flutter. - [DocSearch](https://github.com/Fatpandac/DocSearch) | Link RSSHub DocSearch into Raycast diff --git a/assets/radar-rules.js b/assets/radar-rules.js index bb0034b05f788f..b25731c043a9ae 100644 --- a/assets/radar-rules.js +++ b/assets/radar-rules.js @@ -313,21 +313,6 @@ ], }, 'ems.com.cn': { _name: '中国邮政速递物流', www: [{ title: '新闻', docs: 'https://docs.rsshub.app/routes/other#zhong-guo-you-zheng-su-di-wu-liu', source: '/aboutus/xin_wen_yu_shi_jian', target: '/ems/news' }] }, - 'popiapp.cn': { - _name: 'Popi 提问箱', - www: [ - { - title: '提问箱新回答', - docs: 'https://docs.rsshub.app/routes/social-media#popi-ti-wen-xiang', - source: '/:id', - target: (params) => { - if (params.id) { - return '/popiask/:id'; - } - }, - }, - ], - }, 'nppa.gov.cn': { _name: '国家新闻出版署', www: [ @@ -361,27 +346,7 @@ }, ], }, - 'buaq.net': { _name: '不安全资讯', '.': [{ title: '不安全资讯', docs: 'http://docs.rsshub.app/routes/new-media#bu-an-quan', source: '/', target: '/buaq' }] }, 'jian-ning.com': { _name: '建宁闲谈', '.': [{ title: '文章', docs: 'https://docs.rsshub.app/routes/blog#jian-ning-xian-tan', source: '/*', target: '/blogs/jianning' }] }, - 'matataki.io': { - _name: 'matataki', - www: [ - { title: '最热作品', docs: 'https://docs.rsshub.app/routes/new-media#matataki', source: '/article/', target: '/matataki/posts/hot' }, - { title: '最新作品', docs: 'https://docs.rsshub.app/routes/new-media#matataki', source: '/article/latest', target: '/matataki/posts/latest' }, - { title: '作者创作', docs: 'https://docs.rsshub.app/routes/new-media#matataki', source: '/user/:uid', target: (params) => `/matataki/users/${params.uid}/posts` }, - { title: 'Fan票关联作品', docs: 'https://docs.rsshub.app/routes/new-media#matataki', source: ['/token/:tokenId', '/token/:tokenId/circle'], target: (params) => `/matataki/tokens/${params.tokenId}/posts` }, - { - title: '标签关联作品', - docs: 'https://docs.rsshub.app/routes/new-media#matataki', - source: ['/tag/:tagId'], - target: (params, url) => { - const tagName = new URL(url).searchParams.get('name'); - return `/matataki/tags/${params.tagId}/${tagName}/posts`; - }, - }, - { title: '收藏夹', docs: 'https://docs.rsshub.app/routes/new-media#matataki', source: '/user/:uid/favlist/:fid', target: (params) => `/matataki/users/${params.uid}/favorites/${params.fid}/posts` }, - ], - }, 'eventernote.com': { _name: 'Eventernote', www: [{ title: '声优活动及演唱会', docs: 'https://docs.rsshub.app/routes/anime#eventernote', source: '/actors/:name/:id/events', target: '/eventernote/actors/:name/:id' }] }, 'huya.com': { _name: '虎牙直播', '.': [{ title: '直播间开播', docs: 'https://docs.rsshub.app/routes/live#hu-ya-zhi-bo-zhi-bo-jian-kai-bo', source: '/:id', target: '/huya/live/:id' }] }, 'craigslist.org': { _name: 'Craigslist', '.': [{ title: '商品搜索列表', docs: 'https://docs.rsshub.app/routes/shopping#craigslist' }] }, diff --git a/lib/radar-rules.js b/lib/radar-rules.js index 00e5d00f0b176d..bb6356062e3d26 100644 --- a/lib/radar-rules.js +++ b/lib/radar-rules.js @@ -857,21 +857,6 @@ module.exports = { }, ], }, - 'popiapp.cn': { - _name: 'Popi 提问箱', - www: [ - { - title: '提问箱新回答', - docs: 'https://docs.rsshub.app/routes/social-media#popi-ti-wen-xiang', - source: '/:id', - target: (params) => { - if (params.id) { - return '/popiask/:id'; - } - }, - }, - ], - }, 'nppa.gov.cn': { _name: '国家新闻出版署', www: [ @@ -940,17 +925,6 @@ module.exports = { }, ], }, - 'buaq.net': { - _name: '不安全资讯', - '.': [ - { - title: '不安全资讯', - docs: 'http://docs.rsshub.app/routes/new-media#bu-an-quan', - source: '/', - target: '/buaq', - }, - ], - }, 'jian-ning.com': { _name: '建宁闲谈', '.': [ @@ -962,50 +936,6 @@ module.exports = { }, ], }, - 'matataki.io': { - _name: 'matataki', - www: [ - { - title: '最热作品', - docs: 'https://docs.rsshub.app/routes/new-media#matataki', - source: '/article/', - target: '/matataki/posts/hot', - }, - { - title: '最新作品', - docs: 'https://docs.rsshub.app/routes/new-media#matataki', - source: '/article/latest', - target: '/matataki/posts/latest', - }, - { - title: '作者创作', - docs: 'https://docs.rsshub.app/routes/new-media#matataki', - source: '/user/:uid', - target: (params) => `/matataki/users/${params.uid}/posts`, - }, - { - title: 'Fan票关联作品', - docs: 'https://docs.rsshub.app/routes/new-media#matataki', - source: ['/token/:tokenId', '/token/:tokenId/circle'], - target: (params) => `/matataki/tokens/${params.tokenId}/posts`, - }, - { - title: '标签关联作品', - docs: 'https://docs.rsshub.app/routes/new-media#matataki', - source: ['/tag/:tagId'], - target: (params, url) => { - const tagName = new URL(url).searchParams.get('name'); - return `/matataki/tags/${params.tagId}/${tagName}/posts`; - }, - }, - { - title: '收藏夹', - docs: 'https://docs.rsshub.app/routes/new-media#matataki', - source: '/user/:uid/favlist/:fid', - target: (params) => `/matataki/users/${params.uid}/favorites/${params.fid}/posts`, - }, - ], - }, 'huya.com': { _name: '虎牙直播', '.': [ diff --git a/lib/router.js b/lib/router.js index 67a41228c362a8..fcb036837fc866 100644 --- a/lib/router.js +++ b/lib/router.js @@ -27,7 +27,6 @@ router.get('/ziroom/room/:city/:iswhole/:room/:keyword', lazyloadRouteHandler('. // 简书 router.get('/jianshu/home', lazyloadRouteHandler('./routes/jianshu/home')); -router.get('/jianshu/trending/:timeframe', lazyloadRouteHandler('./routes/jianshu/trending')); router.get('/jianshu/collection/:id', lazyloadRouteHandler('./routes/jianshu/collection')); router.get('/jianshu/user/:id', lazyloadRouteHandler('./routes/jianshu/user')); @@ -41,9 +40,6 @@ router.get('/mzitu/tag/:tag', lazyloadRouteHandler('./routes/mzitu/tag')); // pixiv-fanbox router.get('/fanbox/:user?', lazyloadRouteHandler('./routes/fanbox/main')); -// 法律白話文運動 -router.get('/plainlaw/archives', lazyloadRouteHandler('./routes/plainlaw/archives.js')); - // Dockone router.get('/dockone/weekly', lazyloadRouteHandler('./routes/dockone/weekly')); @@ -52,9 +48,6 @@ router.get('/zcfy', lazyloadRouteHandler('./routes/zcfy/index')); router.get('/zcfy/index', lazyloadRouteHandler('./routes/zcfy/index')); // 废弃 router.get('/zcfy/hot', lazyloadRouteHandler('./routes/zcfy/hot')); -// 今日头条 -router.get('/jinritoutiao/keyword/:keyword', lazyloadRouteHandler('./routes/jinritoutiao/keyword')); - // Disqus router.get('/disqus/posts/:forum', lazyloadRouteHandler('./routes/disqus/posts')); @@ -132,9 +125,6 @@ router.get('/one', lazyloadRouteHandler('./routes/one/index')); // Thunderbird router.get('/thunderbird/release', lazyloadRouteHandler('./routes/thunderbird/release')); -// tuicool -router.get('/tuicool/mags/:type', lazyloadRouteHandler('./routes/tuicool/mags')); - // Hexo router.get('/hexo/next/:url', lazyloadRouteHandler('./routes/hexo/next')); router.get('/hexo/yilia/:url', lazyloadRouteHandler('./routes/hexo/yilia')); @@ -170,9 +160,6 @@ router.get('/wikipedia/mainland', lazyloadRouteHandler('./routes/wikipedia/mainl // 联合国 United Nations router.get('/un/scveto', lazyloadRouteHandler('./routes/un/scveto')); -// e 公司 -// router.get('/egsea/flash', lazyloadRouteHandler('./routes/egsea/flash')); - // 选股宝 router.get('/xuangubao/subject/:subject_id', lazyloadRouteHandler('./routes/xuangubao/subject')); @@ -494,7 +481,6 @@ router.get('/geekpark/breakingnews', lazyloadRouteHandler('./routes/geekpark/bre // 百度 router.get('/baidu/doodles', lazyloadRouteHandler('./routes/baidu/doodles')); // router.get('/baidu/topwords/:boardId?', lazyloadRouteHandler('./routes/baidu/topwords')); -router.get('/baidu/daily', lazyloadRouteHandler('./routes/baidu/daily')); // 搜狗 router.get('/sogou/doodles', lazyloadRouteHandler('./routes/sogou/doodles')); @@ -514,13 +500,6 @@ router.get('/gnn/gnn', lazyloadRouteHandler('./routes/gnn/gnn')); // a9vg游戏新闻 router.get('/a9vg/a9vg', lazyloadRouteHandler('./routes/a9vg/a9vg')); -// IT桔子 -router.get('/itjuzi/invest', lazyloadRouteHandler('./routes/itjuzi/invest')); -router.get('/itjuzi/merge', lazyloadRouteHandler('./routes/itjuzi/merge')); - -// 探物 -router.get('/tanwu/products', lazyloadRouteHandler('./routes/tanwu/products')); - // GitChat router.get('/gitchat/newest/:category?/:selected?', lazyloadRouteHandler('./routes/gitchat/newest')); @@ -568,11 +547,6 @@ router.get('/idownloadblog', lazyloadRouteHandler('./routes/idownloadblog/index' // TesterHome router.get('/testerhome/newest', lazyloadRouteHandler('./routes/testerhome/newest')); -// 刷屏 -router.get('/weseepro/newest', lazyloadRouteHandler('./routes/weseepro/newest')); -router.get('/weseepro/newest-direct', lazyloadRouteHandler('./routes/weseepro/newest-direct')); -router.get('/weseepro/circle', lazyloadRouteHandler('./routes/weseepro/circle')); - // 玩物志 router.get('/coolbuy/newest', lazyloadRouteHandler('./routes/coolbuy/newest')); @@ -606,12 +580,6 @@ router.get('/steamgifts/discussions/:category?', lazyloadRouteHandler('./routes/ router.get('/shanbay/checkin/:id', lazyloadRouteHandler('./routes/shanbay/checkin')); router.get('/shanbay/footprints/:category?', lazyloadRouteHandler('./routes/shanbay/footprints')); -// Facebook -router.get('/facebook/page/:id', lazyloadRouteHandler('./routes/facebook/page')); - -// 币乎 -router.get('/bihu/activaties/:id', lazyloadRouteHandler('./routes/bihu/activaties')); - // 停电通知 router.get('/tingdiantz/nanjing', lazyloadRouteHandler('./routes/tingdiantz/nanjing')); router.get('/tingdiantz/95598/:province/:city/:district?', lazyloadRouteHandler('./routes/tingdiantz/95598')); @@ -619,7 +587,6 @@ router.get('/tingdiantz/95598/:province/:city/:district?', lazyloadRouteHandler( // PMCAFF router.get('/pmcaff/list/:typeid', lazyloadRouteHandler('./routes/pmcaff/list')); router.get('/pmcaff/feed/:typeid', lazyloadRouteHandler('./routes/pmcaff/feed')); -router.get('/pmcaff/user/:userid', lazyloadRouteHandler('./routes/pmcaff/user')); // icourse163 router.get('/icourse163/newest', lazyloadRouteHandler('./routes/icourse163/newest')); @@ -718,10 +685,6 @@ router.get('/duozhi', lazyloadRouteHandler('./routes/duozhi')); // 高清电台 router.get('/gaoqing/latest', lazyloadRouteHandler('./routes/gaoqing/latest')); -// 鲸跃汽车 -router.get('/whalegogo/home', lazyloadRouteHandler('./routes/whalegogo/home')); -router.get('/whalegogo/portal/:type_id/:tagid?', lazyloadRouteHandler('./routes/whalegogo/portal')); - // LeetCode // router.get('/leetcode/articles', lazyloadRouteHandler('./routes/leetcode/articles')); router.get('/leetcode/submission/us/:user', lazyloadRouteHandler('./routes/leetcode/check-us')); @@ -737,9 +700,6 @@ router.get('/sketch/updates', lazyloadRouteHandler('./routes/sketch/updates')); // 每日安全 router.get('/security/pulses', lazyloadRouteHandler('./routes/security/pulses')); -// DoNews -router.get('/donews/:column?', lazyloadRouteHandler('./routes/donews/index')); - // WeGene router.get('/wegene/column/:type/:category', lazyloadRouteHandler('./routes/wegene/column')); router.get('/wegene/newest', lazyloadRouteHandler('./routes/wegene/newest')); @@ -751,9 +711,6 @@ router.get('/instapaper/person/:name', lazyloadRouteHandler('./routes/instapaper router.get('/ui-cn/article', lazyloadRouteHandler('./routes/ui-cn/article')); router.get('/ui-cn/user/:id', lazyloadRouteHandler('./routes/ui-cn/user')); -// 决胜网 -router.get('/juesheng', lazyloadRouteHandler('./routes/juesheng')); - // 一些博客 // 敬维-以认真的态度做完美的事情: https://jingwei.link/ router.get('/blogs/jingwei.link', lazyloadRouteHandler('./routes/blogs/jingwei_link')); @@ -767,9 +724,6 @@ router.get('/blogs/wang54/:id?', lazyloadRouteHandler('./routes/blogs/wang54')); // WordPress router.get('/blogs/wordpress/:domain/:https?', lazyloadRouteHandler('./routes/blogs/wordpress')); -// 西祠胡同 -router.get('/xici/:id?', lazyloadRouteHandler('./routes/xici')); - // 今日热榜 migrated to v2 // router.get('/tophub/:id', lazyloadRouteHandler('./routes/tophub')); @@ -796,9 +750,6 @@ router.get('/zjgsu/tzgg', lazyloadRouteHandler('./routes/universities/zjgsu/tzgg router.get('/zjgsu/gsgg', lazyloadRouteHandler('./routes/universities/zjgsu/gsgg/scripts')); router.get('/zjgsu/xszq', lazyloadRouteHandler('./routes/universities/zjgsu/xszq/scripts')); -// 大众点评 -router.get('/dianping/user/:id?', lazyloadRouteHandler('./routes/dianping/user')); - // 半月谈 router.get('/banyuetan/byt/:time?', lazyloadRouteHandler('./routes/banyuetan/byt')); router.get('/banyuetan/:name', lazyloadRouteHandler('./routes/banyuetan')); @@ -834,15 +785,9 @@ router.get('/matters/author/:uid', lazyloadRouteHandler('./routes/matters/author // MobData router.get('/mobdata/report', lazyloadRouteHandler('./routes/mobdata/report')); -// 谷雨 -router.get('/tencent/guyu/channel/:name', lazyloadRouteHandler('./routes/tencent/guyu/channel')); - // 古诗文网 router.get('/gushiwen/recommend/:annotation?', lazyloadRouteHandler('./routes/gushiwen/recommend')); -// 电商在线 -router.get('/imaijia/category/:category', lazyloadRouteHandler('./routes/imaijia/category')); - // 21财经 router.get('/21caijing/channel/:name', lazyloadRouteHandler('./routes/21caijing/channel')); @@ -913,10 +858,6 @@ router.get('/paidai/news', lazyloadRouteHandler('./routes/paidai/news')); // 漫画db router.get('/manhuadb/comics/:id', lazyloadRouteHandler('./routes/manhuadb/comics')); -// 装备前线 -router.get('/zfrontier/postlist/:type', lazyloadRouteHandler('./routes/zfrontier/postlist')); -router.get('/zfrontier/board/:boardId', lazyloadRouteHandler('./routes/zfrontier/board_postlist')); - // Hpoi 手办维基 router.get('/hpoi/info/:type?', lazyloadRouteHandler('./routes/hpoi/info')); router.get('/hpoi/:category/:words', lazyloadRouteHandler('./routes/hpoi')); @@ -940,7 +881,7 @@ router.get('/enclavebooks/collection/:uid', lazyloadRouteHandler('./routes/encla router.get('/digitaling/index', lazyloadRouteHandler('./routes/digitaling/index')); // 数英网文章专题 -router.get('/digitaling/articles/:category/:subcate', lazyloadRouteHandler('./routes/digitaling/article')); +router.get('/digitaling/articles/:category/:subcate?', lazyloadRouteHandler('./routes/digitaling/article')); // 数英网项目专题 router.get('/digitaling/projects/:category', lazyloadRouteHandler('./routes/digitaling/project')); @@ -954,9 +895,6 @@ router.get('/maxnews/dota2', lazyloadRouteHandler('./routes/maxnews/dota2')); // 柠檬 - 私房歌 router.get('/ningmeng/song', lazyloadRouteHandler('./routes/ningmeng/song')); -// 紫竹张先生 -router.get('/zzz/:category?/:language?', lazyloadRouteHandler('./routes/zzz')); - // AlgoCasts router.get('/algocasts', lazyloadRouteHandler('./routes/algocasts/all')); @@ -997,22 +935,12 @@ router.get('/dekudeals/:type', lazyloadRouteHandler('./routes/dekudeals')); // 快科技(原驱动之家) // router.get('/kkj/news', lazyloadRouteHandler('./routes/kkj/news')); -// sixthtone -router.get('/sixthtone/news', lazyloadRouteHandler('./routes/sixthtone/news')); - // AI研习社 router.get('/aiyanxishe/:id/:sort?', lazyloadRouteHandler('./routes/aiyanxishe/home')); // 活动行 router.get('/huodongxing/explore', lazyloadRouteHandler('./routes/hdx/explore')); -// 巴比特作者专栏 -router.get('/8btc/:authorid', lazyloadRouteHandler('./routes/8btc/author')); -router.get('/8btc/news/flash', lazyloadRouteHandler('./routes/8btc/news/flash')); - -// VueVlog -router.get('/vuevideo/:userid', lazyloadRouteHandler('./routes/vuevideo/user')); - // LWN.net Alerts router.get('/lwn/alerts/:distributor', lazyloadRouteHandler('./routes/lwn/alerts')); @@ -1026,9 +954,6 @@ router.get('/lolapp/article/:uuid', lazyloadRouteHandler('./routes/lolapp/articl // 左岸读书 router.get('/zreading', lazyloadRouteHandler('./routes/zreading/home')); -// NBA -router.get('/nba/app_news', lazyloadRouteHandler('./routes/nba/app_news')); - // 天津产权交易中心 router.get('/tprtc/cqzr', lazyloadRouteHandler('./routes/tprtc/cqzr')); router.get('/tprtc/qyzc', lazyloadRouteHandler('./routes/tprtc/qyzc')); @@ -1067,9 +992,6 @@ router.get('/meituan/tech/home', lazyloadRouteHandler('./routes//meituan/tech/ho router.get('/codeceo/home', lazyloadRouteHandler('./routes/codeceo/home')); router.get('/codeceo/:type/:category?', lazyloadRouteHandler('./routes/codeceo/category')); -// BOF -router.get('/bof/home', lazyloadRouteHandler('./routes/bof/home')); - // 爱发电 router.get('/afdian/explore/:type?/:category?', lazyloadRouteHandler('./routes/afdian/explore')); router.get('/afdian/dynamic/:uid', lazyloadRouteHandler('./routes/afdian/dynamic')); @@ -1097,7 +1019,6 @@ router.get('/wikihow/category/:category/:type', lazyloadRouteHandler('./routes/w router.get('/10000link/news/:category?', lazyloadRouteHandler('./routes/10000link/news')); // 一兜糖 -router.get('/yidoutang/index', lazyloadRouteHandler('./routes/yidoutang/index.js')); router.get('/yidoutang/guide', lazyloadRouteHandler('./routes/yidoutang/guide.js')); router.get('/yidoutang/mtest', lazyloadRouteHandler('./routes/yidoutang/mtest.js')); router.get('/yidoutang/case/:type', lazyloadRouteHandler('./routes/yidoutang/case.js')); @@ -1176,9 +1097,6 @@ router.get('/weidian/goods/:id', lazyloadRouteHandler('./routes/weidian/goods')) // 有赞 router.get('/youzan/goods/:id', lazyloadRouteHandler('./routes/youzan/goods')); -// 币世界快讯 -router.get('/bishijie/kuaixun', lazyloadRouteHandler('./routes/bishijie/kuaixun')); - // 顺丰丰桥 router.get('/sf/sffq-announce', lazyloadRouteHandler('./routes/sf/sffq-announce')); @@ -1223,12 +1141,6 @@ router.get('/nfmovies/:id?', lazyloadRouteHandler('./routes/nfmovies/index')); // 书友社区 router.get('/andyt/:view?', lazyloadRouteHandler('./routes/andyt/index')); -// 品途商业评论 -router.get('/pintu360/:type?', lazyloadRouteHandler('./routes/pintu360/index')); - -// engadget中国版 -router.get('/engadget-cn', lazyloadRouteHandler('./routes/engadget/home')); - // engadget router.get('/engadget/:lang?', lazyloadRouteHandler('./routes/engadget/home')); @@ -1265,9 +1177,6 @@ router.get('/zhanqi/room/:id', lazyloadRouteHandler('./routes/zhanqi/room')); // 酒云网 router.get('/wineyun/:category', lazyloadRouteHandler('./routes/wineyun')); -// 快知 -router.get('/kzfeed/topic/:id', lazyloadRouteHandler('./routes/kzfeed/topic')); - // X-MOL化学资讯平台 // router.get('/x-mol/news/:tag?', lazyloadRouteHandler('./routes/x-mol/news.js')); // router.get('/x-mol/paper/:type/:magazine', lazyloadRouteHandler('./routes/x-mol/paper')); @@ -1553,9 +1462,6 @@ router.get('/lagou/jobs/:position/:city', lazyloadRouteHandler('./routes/lagou/j router.get('/yzu/home/:type', lazyloadRouteHandler('./routes/universities/yzu/home')); router.get('/yzu/yjszs/:type', lazyloadRouteHandler('./routes/universities/yzu/yjszs')); -// 德国新闻社卫健新闻 -router.get('/krankenkassen', lazyloadRouteHandler('./routes/krankenkassen')); - // 桂林航天工业学院 router.get('/guat/news/:type?', lazyloadRouteHandler('./routes/guat/news')); @@ -1836,18 +1742,9 @@ router.get('/amazfitwatchfaces/search/:model/:keyword?/:sortBy?', lazyloadRouteH router.get('/missevan/drama/latest', lazyloadRouteHandler('./routes/missevan/latest')); router.get('/missevan/drama/:id', lazyloadRouteHandler('./routes/missevan/drama')); -// popiask提问箱 -router.get('/popiask/:sharecode/:pagesize?', lazyloadRouteHandler('./routes/popiask/questions')); - -// Tapechat提问箱 -router.get('/tapechat/questionbox/:sharecode/:pagesize?', lazyloadRouteHandler('./routes/popiask/tapechat_questions')); - // AMD router.get('/amd/graphicsdrivers/:id/:rid?', lazyloadRouteHandler('./routes/amd/graphicsdrivers')); -// 电商报 -router.get('/dsb/area/:area', lazyloadRouteHandler('./routes/dsb/area')); - // 靠谱新闻 router.get('/kaopunews/:language?', lazyloadRouteHandler('./routes/kaopunews')); @@ -1881,7 +1778,6 @@ router.get('/kuaibao', lazyloadRouteHandler('./routes/kuaibao/index')); // SocialBeta router.get('/socialbeta/home', lazyloadRouteHandler('./routes/socialbeta/home')); -router.get('/socialbeta/hunt', lazyloadRouteHandler('./routes/socialbeta/hunt')); // 东方我乐多丛志 router.get('/touhougarakuta/:language/:type', lazyloadRouteHandler('./routes/touhougarakuta')); @@ -1914,21 +1810,12 @@ router.get('/kotaku/story/:type', lazyloadRouteHandler('./routes/kotaku/story')) // 梅斯医学 router.get('/medsci/recommend', lazyloadRouteHandler('./routes/medsci/recommend')); -// 悟空问答 -router.get('/wukong/user/:id/:type?', lazyloadRouteHandler('./routes/wukong/user')); - // 腾讯大数据 router.get('/tencent/bigdata', lazyloadRouteHandler('./routes/tencent/bigdata/index')); // 搜韵网 router.get('/souyun/today', lazyloadRouteHandler('./routes/souyun/today')); -// 生物谷 -router.get('/bioon/latest', lazyloadRouteHandler('./routes/bioon/latest')); - -// soomal -router.get('/soomal/topics/:category/:language?', lazyloadRouteHandler('./routes/soomal/topics')); - // JustRun router.get('/justrun', lazyloadRouteHandler('./routes/justrun/index')); @@ -1970,9 +1857,6 @@ router.get('/wenxuecity/bbs/:cat/:elite?', lazyloadRouteHandler('./routes/wenxue router.get('/wenxuecity/hot/:cid', lazyloadRouteHandler('./routes/wenxuecity/hot')); router.get('/wenxuecity/news', lazyloadRouteHandler('./routes/wenxuecity/news')); -// 不安全 -router.get('/buaq', lazyloadRouteHandler('./routes/buaq/index')); - // 快出海 router.get('/kchuhai', lazyloadRouteHandler('./routes/kchuhai/index')); @@ -1997,9 +1881,6 @@ router.get('/blogs/jianning', lazyloadRouteHandler('./routes/blogs/jianning')); // 互动吧 router.get('/hudongba/:city/:id', lazyloadRouteHandler('./routes/hudongba/index')); -// 飞雪娱乐网 -router.get('/feixuew/:id?', lazyloadRouteHandler('./routes/feixuew/index')); - // 1X router.get('/1x/:category?', lazyloadRouteHandler('./routes/1x/index')); @@ -2009,15 +1890,8 @@ router.get('/jx3/:caty?', lazyloadRouteHandler('./routes/jx3/news')); // 泉州市跨境电子商务协会 router.get('/qzcea/:caty?', lazyloadRouteHandler('./routes/qzcea/index')); -// 福利年 -router.get('/fulinian/:caty?', lazyloadRouteHandler('./routes/fulinian/index')); - // CGTN -router.get('/cgtn/top', lazyloadRouteHandler('./routes/cgtn/top')); router.get('/cgtn/most/:type?/:time?', lazyloadRouteHandler('./routes/cgtn/most')); - -router.get('/cgtn/pick', lazyloadRouteHandler('./routes/cgtn/pick')); - router.get('/cgtn/opinions', lazyloadRouteHandler('./routes/cgtn/opinions')); // AppSales @@ -2069,9 +1943,6 @@ router.get('/gov/taiwan/mnd', lazyloadRouteHandler('./routes/gov/taiwan/mnd')); // 高科技行业门户 router.get('/ofweek/news', lazyloadRouteHandler('./routes/ofweek/news')); -// 八阕 -router.get('/popyard/:caty?', lazyloadRouteHandler('./routes/popyard/index')); - // World Trade Organization router.get('/wto/dispute-settlement/:year?', lazyloadRouteHandler('./routes/wto/dispute-settlement')); @@ -2081,12 +1952,6 @@ router.get('/forum4399/:mtag', lazyloadRouteHandler('./routes/game4399/forum')); // 国防科技大学 router.get('/nudt/yjszs/:id?', lazyloadRouteHandler('./routes/universities/nudt/yjszs')); -// 全现在 -router.get('/allnow/column/:id', lazyloadRouteHandler('./routes/allnow/column')); -router.get('/allnow/tag/:id', lazyloadRouteHandler('./routes/allnow/tag')); -router.get('/allnow/user/:id', lazyloadRouteHandler('./routes/allnow/user')); -router.get('/allnow', lazyloadRouteHandler('./routes/allnow/index')); - // dev.to router.get('/dev.to/top/:period', lazyloadRouteHandler('./routes/dev.to/top')); @@ -2137,12 +2002,6 @@ router.get('/nwpu/:column', lazyloadRouteHandler('./routes/nwpu/index')); // 美国联邦最高法院 router.get('/us/supremecourt/argument_audio/:year?', lazyloadRouteHandler('./routes/us/supremecourt/argument_audio')); -// 未名新闻 -router.get('/mitbbs/:caty?', lazyloadRouteHandler('./routes/mitbbs/index')); - -// 贾真的电商108将 -router.get('/jiazhen108', lazyloadRouteHandler('./routes/jiazhen108/index')); - // 优设网 router.get('/uisdc/talk/:sort?', lazyloadRouteHandler('./routes/uisdc/talk')); router.get('/uisdc/hangye/:caty?', lazyloadRouteHandler('./routes/uisdc/hangye')); @@ -2150,9 +2009,6 @@ router.get('/uisdc/news', lazyloadRouteHandler('./routes/uisdc/news')); router.get('/uisdc/zt/:title?', lazyloadRouteHandler('./routes/uisdc/zt')); router.get('/uisdc/topic/:title?/:sort?', lazyloadRouteHandler('./routes/uisdc/topic')); -// 中国劳工观察 -router.get('/chinalaborwatch/reports/:lang?/:industry?', lazyloadRouteHandler('./routes/chinalaborwatch/reports')); - // 美国中央情报局 router.get('/cia/foia-annual-report', lazyloadRouteHandler('./routes/us/cia/foia-annual-report')); @@ -2162,15 +2018,9 @@ router.get('/everything/changes', lazyloadRouteHandler('./routes/everything/chan // 中国劳工通讯 router.get('/clb/commentary/:lang?', lazyloadRouteHandler('./routes/clb/commentary')); -// 国际教育研究所 -router.get('/iie/blog', lazyloadRouteHandler('./routes/iie/blog')); - // 超理论坛 router.get('/chaoli/:channel?', lazyloadRouteHandler('./routes/chaoli/index')); -// Polar -router.get('/polar/blog', lazyloadRouteHandler('./routes/polar/blog')); - // XYplorer router.get('/xyplorer/whatsnew', lazyloadRouteHandler('./routes/xyplorer/whatsnew')); @@ -2193,23 +2043,6 @@ router.get('/qstheory/:category?', lazyloadRouteHandler('./routes/qstheory/index // 生命时报 router.get('/lifetimes/:category?', lazyloadRouteHandler('./routes/lifetimes/index')); -// MakeUseOf -router.get('/makeuseof/:category?', lazyloadRouteHandler('./routes/makeuseof/index')); - -// 瞬Matataki -// 热门作品 -router.get('/matataki/posts/hot/:ipfsFlag?', lazyloadRouteHandler('./routes/matataki/site/posts/scoreranking')); -// 最新作品 -router.get('/matataki/posts/latest/:ipfsFlag?', lazyloadRouteHandler('./routes/matataki/site/posts/timeranking')); -// 作者创作 -router.get('/matataki/users/:authorId/posts/:ipfsFlag?', lazyloadRouteHandler('./routes/matataki/site/posts/author')); -// Fan票关联作品 -router.get('/matataki/tokens/:id/posts/:filterCode/:ipfsFlag?', lazyloadRouteHandler('./routes/matataki/site/posts/token')); -// 标签关联作品 -router.get('/matataki/tags/:tagId/:tagName/posts/:ipfsFlag?', lazyloadRouteHandler('./routes/matataki/site/posts/tag')); -// 收藏夹 -router.get('/matataki/users/:userId/favorites/:favoriteListId/posts/:ipfsFlag?', lazyloadRouteHandler('./routes/matataki/site/posts/favorite')); - // Zhimap 知识导图社区 router.get('/zhimap/:categoryUuid?/:recommend?', lazyloadRouteHandler('./routes/zhimap/index')); @@ -2230,9 +2063,6 @@ router.get('/mind42/:caty?', lazyloadRouteHandler('./routes/mind42/index')); // 幕布网 router.get('/mubu/explore/:category?/:title?', lazyloadRouteHandler('./routes/mubu/explore')); -// Esquirehk -router.get('/esquirehk/tag/:id', lazyloadRouteHandler('./routes/esquirehk/tag')); - // 国家普通话测试 杭州市 router.get('/putonghua', lazyloadRouteHandler('./routes/putonghua/hangzhou')); @@ -2247,9 +2077,6 @@ router.get('/yinxiang/card/:id', lazyloadRouteHandler('./routes/yinxiang/card')) router.get('/yinxiang/personal/:id', lazyloadRouteHandler('./routes/yinxiang/personal')); router.get('/yinxiang/category/:id', lazyloadRouteHandler('./routes/yinxiang/category')); -// 遠見 gvm.com.tw -router.get('/gvm/index/:category?', lazyloadRouteHandler('./routes/gvm/index')); - // 触乐 router.get('/chuapp/index/:category?', lazyloadRouteHandler('./routes/chuapp/index')); @@ -2274,9 +2101,6 @@ router.get('/ustr/press-releases/:year?/:month?', lazyloadRouteHandler('./routes // 游戏动力 router.get('/vgn/:platform?', lazyloadRouteHandler('./routes/vgn/index')); -// 国际能源署 -router.get('/iea/:category?', lazyloadRouteHandler('./routes/iea/index')); - // The Brain router.get('/thebrain/:category?', lazyloadRouteHandler('./routes/thebrain/blog')); @@ -2292,9 +2116,6 @@ router.get('/marginnote/tag/:id?', lazyloadRouteHandler('./routes/marginnote/tag // ASML router.get('/asml/press-releases', lazyloadRouteHandler('./routes/asml/press-releases')); -// 中国机械工程学会 -router.get('/cmes/news/:category?', lazyloadRouteHandler('./routes/cmes/news')); - // Craigslist router.get('/craigslist/:location/:type', lazyloadRouteHandler('./routes/craigslist/search')); @@ -2309,12 +2130,6 @@ router.get('/mathunion/fields-medal', lazyloadRouteHandler('./routes/mathunion/f // ACM router.get('/acm/amturingaward', lazyloadRouteHandler('./routes/acm/amturingaward')); -// 網路天文館 -router.get('/tam/forecast', lazyloadRouteHandler('./routes/tam/forecast')); - -// Day One -router.get('/dayone/blog', lazyloadRouteHandler('./routes/dayone/blog')); - // 滴答清单 router.get('/dida365/habit/checkins', lazyloadRouteHandler('./routes/dida365/habit-checkins')); @@ -2324,24 +2139,12 @@ router.get('/ditto/changes/:type?', lazyloadRouteHandler('./routes/ditto/changes // iDaily 每日环球视野 router.get('/idaily/today', lazyloadRouteHandler('./routes/idaily/index')); -// 北屋 -router.get('/northhouse/:category?', lazyloadRouteHandler('./routes/northhouse/index')); - // Oak Ridge National Laboratory router.get('/ornl/news', lazyloadRouteHandler('./routes/ornl/news')); // 信阳师范学院 自考办 router.get('/xynu/zkb/:category', lazyloadRouteHandler('./routes/universities/xynu/zkb')); -// Bell Labs -router.get('/bell-labs/events-news/:category?', lazyloadRouteHandler('./routes/bell-labs/events-news.js')); - -// 中国科学院青年创新促进会 -router.get('/yicas/blog', lazyloadRouteHandler('./routes/yicas/blog')); - -// 九三学社 -router.get('/93/:category?', lazyloadRouteHandler('./routes/93/index')); - // DailyArt router.get('/dailyart/:language?', lazyloadRouteHandler('./routes/dailyart/index')); @@ -2360,21 +2163,12 @@ router.get('/nace/blog/:sort?', lazyloadRouteHandler('./routes/nace/blog')); // Semiconductor Industry Association router.get('/semiconductors/latest-news', lazyloadRouteHandler('./routes/semiconductors/latest-news')); -// VOA News -router.get('/voa/day-photos', lazyloadRouteHandler('./routes/voa/day-photos')); - // Voice of America router.get('/voa/:language/:channel?', lazyloadRouteHandler('./routes/voa/index')); -// 游戏葡萄 -router.get('/gamegrape/:id?', lazyloadRouteHandler('./routes/gamegrape/index')); - // 阳光高考 router.get('/chsi/zszcgd/:category?', lazyloadRouteHandler('./routes/chsi/zszcgd')); -// 眾新聞 -router.get('/hkcnews/news/:category?', lazyloadRouteHandler('./routes/hkcnews/news')); - // AnyTXT router.get('/anytxt/release-notes', lazyloadRouteHandler('./routes/anytxt/release-notes')); @@ -2406,7 +2200,6 @@ router.get('/feed-the-beast/modpack/:modpackEntry', lazyloadRouteHandler('./rout // Gab router.get('/gab/user/:username', lazyloadRouteHandler('./routes/gab/user')); -router.get('/gab/popular/:sort?', lazyloadRouteHandler('./routes/gab/explore')); // Phrack Magazine router.get('/phrack', lazyloadRouteHandler('./routes/phrack/index')); @@ -2418,12 +2211,6 @@ router.get('/cqut/libnews', lazyloadRouteHandler('./routes/universities/cqut/cqu // 城农 Growin' City router.get('/growincity/news/:id?', lazyloadRouteHandler('./routes/growincity/news')); -// Thrillist -router.get('/thrillist/:tag?', lazyloadRouteHandler('./routes/thrillist/index')); - -// 丁香园 -router.get('/dxy/vaccine/:province?/:city?/:location?', lazyloadRouteHandler('./routes/dxy/vaccine')); - // 中国庭审公开网 router.get('/tingshen', lazyloadRouteHandler('./routes/tingshen/tingshen')); @@ -2491,9 +2278,6 @@ router.get('/furaffinity/favorites/:username/:nsfw?', lazyloadRouteHandler('./ro router.get('/furaffinity/submission_comments/:id', lazyloadRouteHandler('./routes/furaffinity/submission_comments')); router.get('/furaffinity/journal_comments/:id', lazyloadRouteHandler('./routes/furaffinity/journal_comments')); -// 亿欧网 -router.get('/iyiou', lazyloadRouteHandler('./routes/iyiou')); - // 香港商报 router.get('/hkcd/pdf', lazyloadRouteHandler('./routes/hkcd/pdf')); @@ -2511,9 +2295,6 @@ router.get('/trakt/collection/:username/:type?', lazyloadRouteHandler('./routes/ // 全球化智库 router.get('/ccg/:category?', lazyloadRouteHandler('./routes/ccg/index')); -// 中国橡胶网 -router.get('/cria/news/:id?', lazyloadRouteHandler('./routes/cria/news')); - // 灵异网 router.get('/lingyi/:category', lazyloadRouteHandler('./routes/lingyi/index')); @@ -2554,9 +2335,6 @@ router.get('/hugo/releases', lazyloadRouteHandler('./routes/hugo/releases')); // 东立出版 router.get('/tongli/news/:type', lazyloadRouteHandler('./routes/tongli/news')); -// OR -router.get('/or/:id?', lazyloadRouteHandler('./routes/or')); - // 字型故事 router.get('/fontstory', lazyloadRouteHandler('./routes/fontstory/tw')); @@ -2599,12 +2377,6 @@ router.get('/tanchinese/:category?', lazyloadRouteHandler('./routes/tanchinese') // yuzu emulator router.get('/yuzu-emu/entry', lazyloadRouteHandler('./routes/yuzu-emu/entry')); -// Resources - The Partnership on AI -router.get('/partnershiponai/resources', lazyloadRouteHandler('./routes/partnershiponai/resources')); - -// Common App -router.get('/commonapp/blog', lazyloadRouteHandler('./routes/commonapp/blog')); - // Europa Press router.get('/europapress/:category?', lazyloadRouteHandler('./routes/europapress')); @@ -2637,9 +2409,6 @@ router.get('/x410/news', lazyloadRouteHandler('./routes/x410/news')); router.get('/micmicidol', lazyloadRouteHandler('./routes/micmicidol/latest')); router.get('/micmicidol/search/:label', lazyloadRouteHandler('./routes/micmicidol/search')); -// 香港高登 -router.get('/hkgolden/:id?/:limit?/:sort?', lazyloadRouteHandler('./routes/hkgolden')); - // 香港討論區 router.get('/discuss/:fid', lazyloadRouteHandler('./routes/discuss')); diff --git a/lib/routes/199it/category.js b/lib/routes/199it/category.js index 489505265a2ffb..ae8455c96b8183 100644 --- a/lib/routes/199it/category.js +++ b/lib/routes/199it/category.js @@ -1,6 +1,6 @@ const utils = require('./utils'); -const rootUrl = 'http://www.199it.com/archives/category/'; +const rootUrl = 'https://www.199it.com/archives/category'; module.exports = async (ctx) => { const keyword = ctx.params.caty.split('|').join('/'); diff --git a/lib/routes/199it/tag.js b/lib/routes/199it/tag.js index 7bee423df5fc16..d158e8118836bd 100644 --- a/lib/routes/199it/tag.js +++ b/lib/routes/199it/tag.js @@ -1,6 +1,6 @@ const utils = require('./utils'); -const rootUrl = 'http://www.199it.com/archives/tag/'; +const rootUrl = 'https://www.199it.com/archives/tag'; module.exports = async (ctx) => { const keyword = ctx.params.tag.split('|').join('/'); diff --git a/lib/routes/199it/utils.js b/lib/routes/199it/utils.js index bbbf926541dcfc..2cc478daf7f99d 100644 --- a/lib/routes/199it/utils.js +++ b/lib/routes/199it/utils.js @@ -25,7 +25,7 @@ module.exports = async (ctx, keyword, currentUrl) => { ctx.cache.tryGet(item.link, async () => { const detailResponse = await got({ method: 'get', - url: item.link, + url: `https:${item.link}`, }); const content = cheerio.load(detailResponse.data); diff --git a/lib/routes/8btc/author.js b/lib/routes/8btc/author.js deleted file mode 100644 index 2f04fb41e0d8b8..00000000000000 --- a/lib/routes/8btc/author.js +++ /dev/null @@ -1,49 +0,0 @@ -const got = require('@/utils/got'); -const cheerio = require('cheerio'); - -module.exports = async (ctx) => { - const authorid = ctx.params.authorid; - const response = await got.get(`https://webapi.8btc.com/bbt_api/comments/list?author_id=${authorid}&fetch_num=20`); - - const ProcessFeed = (data) => { - const $ = cheerio.load(data); - - // 提取内容 - return $('.bbt-html').html(); - }; - - const items = await Promise.all( - response.data.data.list.map(async (item) => { - const link = `https://www.8btc.com/article/${item.post_id}`; - - const cache = await ctx.cache.get(link); - if (cache) { - return Promise.resolve(JSON.parse(cache)); - } - - const response = await got({ - method: 'get', - url: link, - }); - - const description = ProcessFeed(response.data); - - const single = { - title: item.post.title, - description, - pubDate: item.date_gmt, - link, - author: item.reviewer.name, - }; - ctx.cache.set(link, JSON.stringify(single)); - return Promise.resolve(single); - }) - ); - - ctx.state.data = { - title: '巴比特作者专栏', - link: `https://www.8btc.com/author/${authorid}`, - description: '巴比特作者专栏', - item: items, - }; -}; diff --git a/lib/routes/8btc/news/flash.js b/lib/routes/8btc/news/flash.js deleted file mode 100644 index b3403fa5de378f..00000000000000 --- a/lib/routes/8btc/news/flash.js +++ /dev/null @@ -1,41 +0,0 @@ -const got = require('@/utils/got'); - -module.exports = async (ctx) => { - const response = await got({ - method: 'get', - url: `https://app.blockmeta.com/w1/news/list?num=30&cat_id=4481&page=1`, - headers: { - from: 'web', - Referer: `https://www.8btc.com/flash`, - }, - }); - - const newsflashes = response.data.list; - - let newsflashesList = []; - for (let i = 0; i < newsflashes.length; i++) { - newsflashesList = newsflashesList.concat(newsflashes[i]); - } - - const out = newsflashesList.map((item) => { - const pubDate = item.post_date_format; - const link = item.source.link; - const title = item.title; - const description = item.content; - - const single = { - title, - link, - pubDate, - description, - }; - - return single; - }); - - ctx.state.data = { - title: `快讯 - 巴比特`, - link: `https://www.8btc.com/flash`, - item: out, - }; -}; diff --git a/lib/routes/93/index.js b/lib/routes/93/index.js deleted file mode 100644 index f5468f1ded4b78..00000000000000 --- a/lib/routes/93/index.js +++ /dev/null @@ -1,50 +0,0 @@ -const got = require('@/utils/got'); -const cheerio = require('cheerio'); - -module.exports = async (ctx) => { - const category = ctx.params.category || 'lxzn-yzjy'; - - const rootUrl = 'http://www.93.gov.cn'; - const currentUrl = `${rootUrl}/${category}`; - const response = await got({ - method: 'get', - url: currentUrl, - }); - - const $ = cheerio.load(response.data); - - const list = $('li.clearfix a') - .slice(0, 15) - .map((_, item) => { - item = $(item); - return { - title: item.text(), - link: `${rootUrl}${item.attr('href')}`, - pubDate: new Date(item.next().text()).toUTCString(), - }; - }) - .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('.pageContent').html(); - item.author = content('.pageTitle ul li').eq(1).text().replace('来源:', ''); - - return item; - }) - ) - ); - - ctx.state.data = { - title: $('title').text(), - link: currentUrl, - item: items, - }; -}; diff --git a/lib/routes/allnow/column.js b/lib/routes/allnow/column.js deleted file mode 100644 index afb29d127860f1..00000000000000 --- a/lib/routes/allnow/column.js +++ /dev/null @@ -1,7 +0,0 @@ -const utils = require('./utils'); - -module.exports = async (ctx) => { - const id = ctx.params.id; - - ctx.state.data = await utils.processItems(ctx, `${utils.rootUrl}/column/${id}`); -}; diff --git a/lib/routes/allnow/index.js b/lib/routes/allnow/index.js deleted file mode 100644 index 16d1f8f0e927c3..00000000000000 --- a/lib/routes/allnow/index.js +++ /dev/null @@ -1,5 +0,0 @@ -const utils = require('./utils'); - -module.exports = async (ctx) => { - ctx.state.data = await utils.processItems(ctx, utils.rootUrl); -}; diff --git a/lib/routes/allnow/tag.js b/lib/routes/allnow/tag.js deleted file mode 100644 index f27a72c28b0d68..00000000000000 --- a/lib/routes/allnow/tag.js +++ /dev/null @@ -1,7 +0,0 @@ -const utils = require('./utils'); - -module.exports = async (ctx) => { - const id = ctx.params.id; - - ctx.state.data = await utils.processItems(ctx, `${utils.rootUrl}/tag/${id}`); -}; diff --git a/lib/routes/allnow/user.js b/lib/routes/allnow/user.js deleted file mode 100644 index 8b4b80eb8f47d5..00000000000000 --- a/lib/routes/allnow/user.js +++ /dev/null @@ -1,7 +0,0 @@ -const utils = require('./utils'); - -module.exports = async (ctx) => { - const id = ctx.params.id; - - ctx.state.data = await utils.processItems(ctx, `${utils.rootUrl}/user/${id}`); -}; diff --git a/lib/routes/allnow/utils.js b/lib/routes/allnow/utils.js deleted file mode 100644 index 5311c4a104422a..00000000000000 --- a/lib/routes/allnow/utils.js +++ /dev/null @@ -1,67 +0,0 @@ -const got = require('@/utils/got'); -const cheerio = require('cheerio'); -const timezone = require('@/utils/timezone'); -const { parseDate } = require('@/utils/parse-date'); - -const rootUrl = 'https://www.allnow.com'; - -module.exports = { - rootUrl, - - processItems: async (ctx, currentUrl) => { - const response = await got({ - method: 'get', - url: currentUrl, - }); - - const $ = cheerio.load(response.data); - - const list = $('.post-list .post') - .slice(0, ctx.params.limit ? parseInt(ctx.params.limit) : 15) - .map((_, item) => { - item = $(item); - - return { - 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.author = detailResponse.data.match(/authorName:"(.*?)",avatar/)[1]; - item.title = content('title') - .text() - .replace(/-全现在官方网站/, ''); - item.pubDate = timezone(parseDate(detailResponse.data.match(/time:"(.*)",type/)[1]), +8); - item.category = detailResponse.data - .match(/tags:\[(.*)\],columns/)[1] - .split('},') - .map((category) => category.match(/title:"(.*)"/)[1]); - item.description = content('#article-content').html() ?? content('.summary').html() ?? ''; - - content('video').each(function () { - item.description += ``; - }); - - return item; - }) - ) - ); - - return { - title: $('title').text(), - link: currentUrl, - item: items, - description: $('.desc').eq(0).text(), - }; - }, -}; diff --git a/lib/routes/baidu/daily.js b/lib/routes/baidu/daily.js deleted file mode 100644 index 5d4ec6d8f6df90..00000000000000 --- a/lib/routes/baidu/daily.js +++ /dev/null @@ -1,55 +0,0 @@ -const got = require('@/utils/got'); -const cheerio = require('cheerio'); -const iconv = require('iconv-lite'); - -module.exports = async (ctx) => { - const host = `https://zhidao.baidu.com/daily?fr=daohang`; - - const response = await got.get(host, { - responseType: 'buffer', - }); - - response.data = iconv.decode(response.data, 'gbk'); - const $ = cheerio.load(response.data); - - const list = $("li[class=' clearfix']").get(); - - const items = list.map((item) => { - item = $(item); - - return { - title: item.find('div.daily-cont-top > h2 > a').text(), - description: item.find('div.daily-cont-top > div > a').text(), - link: `https://zhidao.baidu.com/${item.find('div.daily-cont-top > h2 > a').attr('href')}`, - }; - }); - - const result = await Promise.all( - items.map(async (item) => { - const link = item.link; - - const cache = await ctx.cache.get(link); - if (cache) { - return Promise.resolve(JSON.parse(cache)); - } - - const itemReponse = await got.get(link, { - responseType: 'buffer', - }); - const data = iconv.decode(itemReponse.data, 'gbk'); - const itemElement = cheerio.load(data); - - item.description = itemElement('.detail-wp').html(); - - ctx.cache.set(link, JSON.stringify(item)); - return item; - }) - ); - - ctx.state.data = { - title: `知道日报`, - link: host, - description: `每天都知道一点`, - item: result, - }; -}; diff --git a/lib/routes/bell-labs/events-news.js b/lib/routes/bell-labs/events-news.js deleted file mode 100644 index 1130619d20a245..00000000000000 --- a/lib/routes/bell-labs/events-news.js +++ /dev/null @@ -1,70 +0,0 @@ -const got = require('@/utils/got'); -const cheerio = require('cheerio'); - -const config = { - events: '.tout-text a', - 'industry-recognition': '.n-block-section .n-block .rich-text p b', - 'press-releases': 'h5 a', -}; - -module.exports = async (ctx) => { - const category = ctx.params.category || 'press-releases'; - - const rootUrl = 'http://www.bell-labs.com'; - const currentUrl = `${rootUrl}/events-news/${category}`; - const response = await got({ - method: 'get', - url: currentUrl, - }); - - const $ = cheerio.load(response.data); - - let items = (category === 'industry-recognition' ? $(config[category]).closest('.rich-text') : $(config[category])) - .slice(0, 15) - .map((_, i) => { - let item = $(i); - - if (category === 'industry-recognition') { - item = item.children('.n-link-list').length > 0 ? item.children('.n-link-list') : item.children('p').eq(1); - } - if (item.children('a').attr('href')) { - item = item.children('a'); - } - - return { - title: item.text(), - link: item.attr('href') || currentUrl, - pubDate: new Date(category === 'events' ? item.text().split(':')[0].split(' - ')[0] : category === 'industry-recognition' ? $(i).children('p').eq(0).text() : '').toUTCString(), - - description: category === 'events' ? item.closest('.n-block').next().find('.rich-text').html() : category === 'industry-recognition' ? `
${$(i).find('p').last().text()}
${cardData.url_title ? cardData.url_title : ''}${cardData.url_desc ? ` - ${cardData.url_desc}` : ''}
${serializeCardText(cardData.text)}
快知中间页
' + author.displayName + author.authorBio.replace(/^
/g, ' ')).join(''); diff --git a/lib/v2/agirls/maintainer.js b/lib/v2/agirls/maintainer.js index cd511d9839f7e5..aa23f04681bcb2 100644 --- a/lib/v2/agirls/maintainer.js +++ b/lib/v2/agirls/maintainer.js @@ -1,5 +1,4 @@ module.exports = { - '/topic/:topic': ['TonyRL'], '/topic_list': ['TonyRL'], '/:category?': ['TonyRL'], }; diff --git a/lib/v2/agirls/radar.js b/lib/v2/agirls/radar.js index 2450c36c8513f8..4463e210dcec7d 100644 --- a/lib/v2/agirls/radar.js +++ b/lib/v2/agirls/radar.js @@ -14,12 +14,6 @@ module.exports = { source: ['/', '/topic'], target: '/agirls/topic_list', }, - { - title: '精选主题', - docs: 'https://docs.rsshub.app/routes/new-media##dian-ta-shao-nu', - source: ['/topic/:topic'], - target: '/agirls/topic/:topic', - }, ], }, }; diff --git a/lib/v2/agirls/router.js b/lib/v2/agirls/router.js index 33d4d86f1c9a0d..19ec4bd32638af 100644 --- a/lib/v2/agirls/router.js +++ b/lib/v2/agirls/router.js @@ -1,5 +1,4 @@ module.exports = function (router) { - router.get('/topic/:topic', require('./topic')); router.get('/topic_list', require('./topic_list')); router.get('/:category?', require('./index')); }; diff --git a/lib/v2/agirls/topic.js b/lib/v2/agirls/topic.js deleted file mode 100644 index b341c10ec553ef..00000000000000 --- a/lib/v2/agirls/topic.js +++ /dev/null @@ -1,44 +0,0 @@ -const got = require('@/utils/got'); -const cheerio = require('cheerio'); -const { baseUrl, parseArticle } = require('./utils'); - -module.exports = async (ctx) => { - const { topic } = ctx.params; - const link = `${baseUrl}/topic/${topic}`; - const response = await got({ - url: link, - headers: { - Referer: baseUrl, - }, - }); - - const $ = cheerio.load(response.data); - const ldJson = JSON.parse($('script[type="application/ld+json"]').text()); - let items = $('.ag-post-item__link') - .toArray() - .map((item) => { - item = $(item); - return { - title: item.text().trim(), - link: `${baseUrl}${item.attr('href')}`, - }; - }); - - items = await Promise.all(items.map((item) => ctx.cache.tryGet(item.link, () => parseArticle(item, link, undefined)))); - - ctx.state.data = { - title: $('head title').text().trim(), - link, - description: ldJson['@graph'][0].description, - item: items, - language: $('html').attr('lang'), - }; - - ctx.state.json = { - title: $('head title').text().trim(), - link, - description: ldJson['@graph'][0].description, - item: items, - language: $('html').attr('lang'), - }; -}; diff --git a/lib/v2/allrecode/index.js b/lib/v2/allrecode/index.js deleted file mode 100644 index 974ec0aa9ed9d6..00000000000000 --- a/lib/v2/allrecode/index.js +++ /dev/null @@ -1,65 +0,0 @@ -const got = require('@/utils/got'); -const cheerio = require('cheerio'); -const timezone = require('@/utils/timezone'); -const { parseDate } = require('@/utils/parse-date'); - -module.exports = async (ctx) => { - const category = ctx.params.category ?? 'posts'; - - const rootUrl = 'https://allrecode.com'; - const currentUrl = `${rootUrl}/${category}`; - - const response = await got({ - method: 'get', - url: currentUrl, - }); - - const $ = cheerio.load(response.data); - - let items = $('h3 a') - .toArray() - .map((item) => { - item = $(item); - - return { - title: item.text(), - link: item.attr('href'), - }; - }); - - items = await Promise.all( - items.map((item) => - ctx.cache.tryGet(item.link, async () => { - const detailResponse = await got({ - method: 'get', - url: item.link, - }); - - const content = cheerio.load(detailResponse.data); - - item.author = content('.author').text(); - item.category = content('meta[name="keywords"]').attr('content').split(','); - item.pubDate = timezone( - parseDate( - content('.edit') - .text() - .match(/\d{4}-\d{2}-\d{2} \d{2}:\d{2}/) - ), - +8 - ); - - content('.edit, .shang').remove(); - - item.description = content('.article-content').html(); - - return item; - }) - ) - ); - - ctx.state.data = { - title: $('title').text(), - link: currentUrl, - item: items, - }; -}; diff --git a/lib/v2/allrecode/maintainer.js b/lib/v2/allrecode/maintainer.js deleted file mode 100644 index 0bd5ca557a232c..00000000000000 --- a/lib/v2/allrecode/maintainer.js +++ /dev/null @@ -1,5 +0,0 @@ -module.exports = { - '/news': ['nczitzk'], - '/recommends': ['nczitzk'], - '/:category?': ['nczitzk'], -}; diff --git a/lib/v2/allrecode/news.js b/lib/v2/allrecode/news.js deleted file mode 100644 index 35cc7f24d963b7..00000000000000 --- a/lib/v2/allrecode/news.js +++ /dev/null @@ -1,35 +0,0 @@ -const got = require('@/utils/got'); -const cheerio = require('cheerio'); -const timezone = require('@/utils/timezone'); -const { parseDate } = require('@/utils/parse-date'); - -module.exports = async (ctx) => { - const rootUrl = 'https://allrecode.com'; - const currentUrl = `${rootUrl}/news`; - - const response = await got({ - method: 'get', - url: currentUrl, - }); - - const $ = cheerio.load(response.data); - - const items = $('.news-trigger') - .toArray() - .map((item) => { - item = $(item); - - return { - title: item.text(), - link: item.attr('href'), - pubDate: timezone(parseDate(item.parent().prev().text(), 'HH:mm'), +8), - description: item.parent().next().html(), - }; - }); - - ctx.state.data = { - title: $('title').text(), - link: currentUrl, - item: items, - }; -}; diff --git a/lib/v2/allrecode/radar.js b/lib/v2/allrecode/radar.js deleted file mode 100644 index 8e248ef43dd4d2..00000000000000 --- a/lib/v2/allrecode/radar.js +++ /dev/null @@ -1,25 +0,0 @@ -module.exports = { - 'allrecode.com': { - _name: '重构', - '.': [ - { - title: '推荐', - docs: 'https://docs.rsshub.app/routes/news-media#chong-gou-tui-jian', - source: ['/recommends', '/'], - target: '/allrecode/recommends', - }, - { - title: '快讯', - docs: 'https://docs.rsshub.app/routes/news-media#chong-gou-kuai-xun', - source: ['/news', '/'], - target: '/allrecode/news', - }, - { - title: '资讯', - docs: 'https://docs.rsshub.app/routes/news-media#chong-gou-zi-xun', - source: ['/:category', '/'], - target: '/allrecode/:category', - }, - ], - }, -}; diff --git a/lib/v2/allrecode/router.js b/lib/v2/allrecode/router.js deleted file mode 100644 index 624f1c26f93c1e..00000000000000 --- a/lib/v2/allrecode/router.js +++ /dev/null @@ -1,4 +0,0 @@ -module.exports = function (router) { - router.get('/news', require('./news')); - router.get('/:category?', require('./index')); -}; diff --git a/lib/v2/artstation/maintainer.js b/lib/v2/artstation/maintainer.js new file mode 100644 index 00000000000000..53abd5e33ab7f7 --- /dev/null +++ b/lib/v2/artstation/maintainer.js @@ -0,0 +1,3 @@ +module.exports = { + '/:handle': ['TonyRL'], +}; diff --git a/lib/v2/artstation/radar.js b/lib/v2/artstation/radar.js new file mode 100644 index 00000000000000..edf7d8d1648670 --- /dev/null +++ b/lib/v2/artstation/radar.js @@ -0,0 +1,13 @@ +module.exports = { + 'artstation.com': { + _name: 'ArtStation', + www: [ + { + title: 'Artist Profolio', + docs: 'https://docs.rsshub.app/picture#artstation', + source: ['/:handle'], + target: '/artstation/:handle', + }, + ], + }, +}; diff --git a/lib/v2/artstation/router.js b/lib/v2/artstation/router.js new file mode 100644 index 00000000000000..1df28827f9e394 --- /dev/null +++ b/lib/v2/artstation/router.js @@ -0,0 +1,3 @@ +module.exports = (router) => { + router.get('/:handle', require('./user')); +}; diff --git a/lib/v2/artstation/templates/description.art b/lib/v2/artstation/templates/description.art new file mode 100644 index 00000000000000..4de8001c1f80f3 --- /dev/null +++ b/lib/v2/artstation/templates/description.art @@ -0,0 +1,17 @@ +{{ if description }} + {{@ description }} +{{ /if }} + +{{ if image }} + +{{ /if }} + +{{ if assets }} + {{ each assets a }} + {{ if (a.asset_type === 'video' || a.asset_type === 'video_clip') && a.player_embedded }} + {{@ a.player_embedded }} + {{ else if a.asset_type === 'image' || a.asset_type === 'cover' }} + + {{ /if }} + {{ /each }} +{{ /if }} diff --git a/lib/v2/artstation/user.js b/lib/v2/artstation/user.js new file mode 100644 index 00000000000000..9fa4a0c9b41766 --- /dev/null +++ b/lib/v2/artstation/user.js @@ -0,0 +1,98 @@ +const got = require('@/utils/got'); +const { parseDate } = require('@/utils/parse-date'); +const { join } = require('path'); +const { art } = require('@/utils/render'); +const config = require('@/config').value; + +module.exports = async (ctx) => { + const { handle } = ctx.params; + + const headers = { + accept: 'application/json, text/plain, */*', + 'accept-language': 'en-US,en;q=0.9', + 'content-type': 'application/json', + 'user-agent': config.trueUA, + }; + + const csrfToken = await ctx.cache.tryGet('artstation:csrfToken', async () => { + const tokenResponse = await got.post('https://www.artstation.com/api/v2/csrf_protection/token.json', { + headers, + }); + return tokenResponse.headers['set-cookie'][0].split(';')[0].split('=')[1]; + }); + + const { data: userData } = await got(`https://www.artstation.com/users/${handle}/quick.json`, { + headers: { + ...headers, + cookie: `PRIVATE-CSRF-TOKEN=${csrfToken}`, + }, + }); + const { data: projects } = await got(`https://www.artstation.com/users/${handle}/projects.json`, { + headers: { + ...headers, + cookie: `PRIVATE-CSRF-TOKEN=${csrfToken}`, + }, + searchParams: { + user_id: userData.id, + page: 1, + }, + }); + + const resolveImageUrl = (url) => url.replace(/\/\d{14}\/small_square\//, '/large/'); + + const list = projects.data.map((item) => ({ + title: item.title, + description: art(join(__dirname, 'templates/description.art'), { + description: item.description, + image: { + src: resolveImageUrl(item.cover.small_square_url), + title: item.title, + }, + }), + pubDate: parseDate(item.published_at), + updated: parseDate(item.updated_at), + link: item.permalink, + author: userData.full_name, + assetsCount: item.assets_count, + hashId: item.hash_id, + icons: item.icons, + })); + + const items = await Promise.all( + list.map((item) => + ctx.cache.tryGet(item.link, async () => { + if (item.assetsCount > 1 || !item.icons.image) { + const { data } = await got(`https://www.artstation.com/projects/${item.hashId}.json`, { + headers: { + ...headers, + cookie: `PRIVATE-CSRF-TOKEN=${csrfToken}`, + }, + }); + + item.description = art(join(__dirname, 'templates/description.art'), { + description: data.description, + assets: data.assets, + }); + + for (const a of data.assets) { + if (a.asset_type !== 'video' && a.asset_type !== 'image' && a.asset_type !== 'video_clip' && a.asset_type !== 'cover') { + throw Error(`Unhandle asset type: ${a.asset_type}`); // model3d, marmoset, pano + } + } + } + + return item; + }) + ) + ); + + ctx.state.data = { + title: `${userData.full_name} - ArtStation`, + description: userData.headline, + link: userData.permalink, + logo: userData.large_avatar_url, + icon: userData.large_avatar_url, + image: userData.default_cover_url, + item: items, + }; +}; diff --git a/lib/v2/baijing/index.js b/lib/v2/baijing/index.js deleted file mode 100644 index bc55736e2df68a..00000000000000 --- a/lib/v2/baijing/index.js +++ /dev/null @@ -1,54 +0,0 @@ -const got = require('@/utils/got'); -const cheerio = require('cheerio'); -const timezone = require('@/utils/timezone'); -const { parseDate } = require('@/utils/parse-date'); - -module.exports = async (ctx) => { - const type = ctx.params.type ?? ''; - - const rootUrl = 'https://www.baijingapp.com'; - const currentUrl = `${rootUrl}/article${type ? `/type-${type}` : ''}`; - - const response = await got({ - method: 'get', - url: currentUrl, - }); - - const $ = cheerio.load(response.data); - - let items = $('.article') - .toArray() - .map((item) => { - item = $(item); - - return { - title: item.text(), - link: `${rootUrl}${item.attr('href')}`, - }; - }); - - items = await Promise.all( - items.map((item) => - ctx.cache.tryGet(item.link, async () => { - const detailResponse = await got({ - method: 'get', - url: item.link, - }); - - const content = cheerio.load(detailResponse.data); - - item.author = content('.name').text(); - item.description = content('#message').html(); - item.pubDate = timezone(parseDate(content('.timeago').text()), +8); - - return item; - }) - ) - ); - - ctx.state.data = { - title: `白鲸出海 - ${$('.list .active').text()}`, - link: currentUrl, - item: items, - }; -}; diff --git a/lib/v2/baijing/maintainer.js b/lib/v2/baijing/maintainer.js deleted file mode 100644 index 8874f3c2c7cbec..00000000000000 --- a/lib/v2/baijing/maintainer.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = { - '/:type?': ['nczitzk'], -}; diff --git a/lib/v2/baijing/radar.js b/lib/v2/baijing/radar.js deleted file mode 100644 index ef72b08375b549..00000000000000 --- a/lib/v2/baijing/radar.js +++ /dev/null @@ -1,22 +0,0 @@ -module.exports = { - 'baijingapp.com': { - _name: '白鲸出海', - '.': [ - { - title: '最新', - docs: 'https://docs.rsshub.app/routes/new-media#bai-jing-chu-hai', - source: ['/article', '/'], - target: '/baijing', - }, - { - title: '资讯', - docs: 'https://docs.rsshub.app/routes/new-media#bai-jing-chu-hai', - source: ['/article', '/'], - target: (params, url) => { - const matches = String(new URL(url)).match(/\/article\/type-(\d+)/); - return `/baijing${matches ? `/${matches[1]}` : ''}`; - }, - }, - ], - }, -}; diff --git a/lib/v2/baijing/router.js b/lib/v2/baijing/router.js deleted file mode 100644 index 7ec1cc98e85268..00000000000000 --- a/lib/v2/baijing/router.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = function (router) { - router.get('/:type?', require('./index')); -}; diff --git a/lib/v2/bilibili/blackboard.js b/lib/v2/bilibili/blackboard.js deleted file mode 100644 index ff19955e467ce3..00000000000000 --- a/lib/v2/bilibili/blackboard.js +++ /dev/null @@ -1,31 +0,0 @@ -const got = require('@/utils/got'); - -module.exports = async (ctx) => { - const response = await got({ - method: 'get', - url: 'https://www.bilibili.com/activity/page/list?plat=1,2,3&mold=1&http=3&page=1&tid=0', - headers: { - Referer: 'https://www.bilibili.com/blackboard/topic_list.html', - }, - }); - - const data = response.data.data.list; - - ctx.state.data = { - title: 'bilibili 话题列表', - link: 'https://www.bilibili.com/blackboard/topic_list.html#/', - description: 'bilibili 话题列表', - item: data - .filter( - (item, index, array) => - // 由于某些话题在不同平台上是同时分开发布的,会产生重复,在这里去除 - !index || item.name !== array[index - 1].name - ) - .map((item) => ({ - title: item.name, - description: `${item.name} ${item.desc}`, - pubDate: new Date(item.ctime.replace(' ', 'T') + '+08:00').toUTCString(), - link: item.pc_url, - })), - }; -}; diff --git a/lib/v2/bilibili/channel.js b/lib/v2/bilibili/channel.js deleted file mode 100644 index f4fbf383530450..00000000000000 --- a/lib/v2/bilibili/channel.js +++ /dev/null @@ -1,31 +0,0 @@ -const got = require('@/utils/got'); -const cheerio = require('cheerio'); -const utils = require('./utils'); - -module.exports = async (ctx) => { - const channelId = ctx.params.channelid; - const disableEmbed = ctx.params.disableEmbed; - - const response = await got(`https://www.bilibili.com/v/channel/${channelId}/?tab=multiple`); - - const $ = cheerio.load(response.data); - const data = JSON.parse( - $('script:contains("window.__INITIAL_STATE__")') - .text() - .match(/window\.__INITIAL_STATE__=(\{.*?\});/)[1] - ); - - const channel_name = data.channelDetailBanner.data.name; - const list = data.flow[`getMultipleByIdx-lastId-channel_id-${channelId}-sort-hot`].result[0].items; - - ctx.state.data = { - title: `Bilibili${channel_name}频道排行榜`, - link: `https://www.bilibili.com/v/channel/${channelId}?tab=multiple`, - item: list.map((item) => ({ - title: item.name, - description: `${item.name}${!disableEmbed ? `${utils.iframe(null, null, item.bvid)}` : ''}`, - author: item.author_name, - link: `https://www.bilibili.com/video/${item.bvid}`, - })), - }; -}; diff --git a/lib/v2/bilibili/maintainer.js b/lib/v2/bilibili/maintainer.js index d9bf20523e140b..9dd7c9486882e3 100644 --- a/lib/v2/bilibili/maintainer.js +++ b/lib/v2/bilibili/maintainer.js @@ -1,10 +1,8 @@ module.exports = { '/app/:id?': ['nczitzk'], '/audio/:id': ['LogicJake'], - '/blackboard': ['Qixingchen'], '/bangumi/:seasonid': ['DIYgod'], '/bangumi/media/:mediaid': ['DIYgod'], - '/channel/:channelid/hot/:disableEmbed?': ['3401797899'], '/fav/:uid/:fid/:disableEmbed?': ['Qixingchen'], '/followings/article/:uid': ['woshiluo'], '/followings/dynamic/:uid/:routeParams?': ['TigerCubDen', 'JimenezLi'], @@ -18,14 +16,12 @@ module.exports = { '/mall/ip/:id': ['DIYgod'], '/manga/update/:comicid': ['hoilc'], '/manga/followings/:uid/:limits?': ['yindaheng98'], - '/online/:disableEmbed?': ['TigerCubDen'], '/partion/:tid/:disableEmbed?': ['DIYgod'], '/partion/ranking/:tid/:days?/:disableEmbed?': ['lengthmin'], '/platform/:area?/:p_type?/:uid?': ['nightmare-mio'], '/popular/all': ['ziminliu'], '/ranking/:rid?/:day?/:arc_type?/:disableEmbed?': ['DIYgod'], '/readlist/:listid': ['hoilc'], - '/topic/:topic': ['Qixingchen'], '/user/article/:uid': ['lengthmin'], '/user/bangumi/:uid/:type?': ['wdssmq'], '/user/channel/:uid/:sid/:disableEmbed?': ['weirongxu'], @@ -36,7 +32,6 @@ module.exports = { '/user/followers/:uid/:loginUid': ['Qixingchen'], '/user/followings/:uid/:loginUid': ['Qixingchen'], '/user/video/:uid/:disableEmbed?': ['DIYgod'], - '/user/video-all/:uid/:disableEmbed?': ['CcccFz'], '/video/danmaku/:bvid/:pid?': ['Qixingchen'], '/video/page/:bvid/:disableEmbed?': ['sxzz'], '/video/reply/:bvid': ['Qixingchen'], diff --git a/lib/v2/bilibili/online.js b/lib/v2/bilibili/online.js deleted file mode 100644 index 2a89bbd6086b72..00000000000000 --- a/lib/v2/bilibili/online.js +++ /dev/null @@ -1,25 +0,0 @@ -const got = require('@/utils/got'); -const { parseDate } = require('@/utils/parse-date'); -const utils = require('./utils'); - -module.exports = async (ctx) => { - const disableEmbed = ctx.params.disableEmbed; - - const response = await got({ - method: 'get', - url: 'https://www.bilibili.com/video/online.html', - }); - const onlineList = JSON.parse(response.data.match(/window\.__INITIAL_STATE__=([\s\S]+);\(function\(\)/)[1]).onlineList || []; - - ctx.state.data = { - title: '哔哩哔哩 - 当前在线', - link: 'https://www.bilibili.com/video/online.html', - item: onlineList.map((item) => ({ - title: item.title, - description: `${item.desc || item.title}${!disableEmbed ? `${utils.iframe(item.aid, null, item.bvid)}` : ''}`, - pubDate: parseDate(item.pubdate * 1000), - author: item.owner.name, - link: `https://www.bilibili.com/video/${item.bvid}`, - })), - }; -}; diff --git a/lib/v2/bilibili/radar.js b/lib/v2/bilibili/radar.js index f75d6714df3448..66f4b691418b71 100644 --- a/lib/v2/bilibili/radar.js +++ b/lib/v2/bilibili/radar.js @@ -60,12 +60,6 @@ module.exports = { source: '/:uid', target: '/bilibili/user/video/:uid', }, - { - title: 'UP 主所有视频', - docs: 'https://docs.rsshub.app/routes/social-media#bilibili', - source: '/:uid', - target: '/bilibili/user/video-all/:uid', - }, { title: 'UP 主频道的合集', docs: 'https://docs.rsshub.app/routes/social-media#bilibili', diff --git a/lib/v2/bilibili/router.js b/lib/v2/bilibili/router.js index c2b2513b37fd84..b6787da3a5c57f 100644 --- a/lib/v2/bilibili/router.js +++ b/lib/v2/bilibili/router.js @@ -1,10 +1,8 @@ module.exports = (router) => { router.get('/app/:id?', require('./app')); router.get('/audio/:id', require('./audio')); - router.get('/blackboard', require('./blackboard')); router.get('/bangumi/:seasonid', require('./bangumi')); // 弃用 router.get('/bangumi/media/:mediaid', require('./bangumi')); - router.get('/channel/:channelid/hot/:disableEmbed?', require('./channel')); router.get('/fav/:uid/:fid/:disableEmbed?', require('./fav')); router.get('/followings/article/:uid', require('./followings_article')); router.get('/followings/dynamic/:uid/:routeParams?', require('./followings_dynamic')); @@ -18,14 +16,12 @@ module.exports = (router) => { router.get('/mall/ip/:id', require('./mallIP')); router.get('/manga/update/:comicid', require('./manga_update')); router.get('/manga/followings/:uid/:limits?', require('./manga_followings')); - router.get('/online/:disableEmbed?', require('./online')); router.get('/partion/:tid/:disableEmbed?', require('./partion')); router.get('/partion/ranking/:tid/:days?/:disableEmbed?', require('./partion-ranking')); router.get('/platform/:area?/:p_type?/:uid?', require('./platform')); router.get('/popular/all', require('./popular')); router.get('/ranking/:rid?/:day?/:arc_type?/:disableEmbed?', require('./ranking')); router.get('/readlist/:listid', require('./readlist')); - router.get('/topic/:topic', require('./topic')); router.get('/user/article/:uid', require('./article')); router.get('/user/bangumi/:uid/:type?', require('./user_bangumi')); router.get('/user/channel/:uid/:sid/:disableEmbed?', require('./userChannel')); @@ -36,7 +32,6 @@ module.exports = (router) => { router.get('/user/followers/:uid/:loginUid', require('./followers')); router.get('/user/followings/:uid/:loginUid', require('./followings')); router.get('/user/video/:uid/:disableEmbed?', require('./video')); - router.get('/user/video-all/:uid/:disableEmbed?', require('./video-all')); router.get('/video/danmaku/:bvid/:pid?', require('./danmaku')); router.get('/video/page/:bvid/:disableEmbed?', require('./page')); router.get('/video/reply/:bvid', require('./reply')); diff --git a/lib/v2/bilibili/topic.js b/lib/v2/bilibili/topic.js deleted file mode 100644 index 2778852a9eca62..00000000000000 --- a/lib/v2/bilibili/topic.js +++ /dev/null @@ -1,50 +0,0 @@ -const got = require('@/utils/got'); - -module.exports = async (ctx) => { - const topic = ctx.params.topic; - const urlEncodedTopic = encodeURIComponent(topic); - - const response = await got({ - method: 'get', - url: `https://api.vc.bilibili.com/topic_svr/v1/topic_svr/topic_new?topic_name=${urlEncodedTopic}`, - headers: { - Referer: `https://www.bilibili.com/tag/${urlEncodedTopic}/feed`, - }, - transformResponse: [(data) => data], - }); - const data = response.data.data.cards; - - ctx.state.data = { - title: `${topic} 的全部话题`, - link: `https://www.bilibili.com/tag/${topic}/feed`, - description: `https://www.bilibili.com/tag/${topic}/feed`, - item: data.map((item) => { - const parsed = JSON.parse(item.card); - const cardData = parsed.item || parsed; - - // img - let imgHTML = ''; - if (cardData.pictures) { - for (let i = 0; i < cardData.pictures.length; i++) { - imgHTML += ``; - } - } - if (cardData.pic) { - imgHTML += ``; - } - - // link - let link = ''; - if (item.desc?.dynamic_id_str) { - link = `https://t.bilibili.com/${item.desc.dynamic_id_str}`; - } - - return { - title: cardData.title || cardData.description || cardData.content || (cardData.vest && cardData.vest.content), - description: `${cardData.desc || cardData.description || cardData.content || cardData.summary || (cardData.vest && cardData.vest.content) + (cardData.sketch && cardData.sketch.title)}${imgHTML} `, - pubDate: new Date(item.desc?.timestamp * 1000).toUTCString(), - link, - }; - }), - }; -}; diff --git a/lib/v2/bilibili/video-all.js b/lib/v2/bilibili/video-all.js deleted file mode 100644 index 11a6c21d3ad91f..00000000000000 --- a/lib/v2/bilibili/video-all.js +++ /dev/null @@ -1,74 +0,0 @@ -const got = require('@/utils/got'); -const cache = require('./cache'); -const utils = require('./utils'); -const { parseDate } = require('@/utils/parse-date'); - -module.exports = async (ctx) => { - const uid = ctx.params.uid; - const disableEmbed = ctx.params.disableEmbed; - const cookie = await cache.getCookie(ctx); - const verifyString = await cache.getVerifyString(ctx); - const [name, face] = await cache.getUsernameAndFaceFromUID(ctx, uid); - - await got(`https://space.bilibili.com/${uid}/video?tid=0&page=1&keyword=&order=pubdate`, { - headers: { - Referer: `https://space.bilibili.com/${uid}/`, - Cookie: cookie, - }, - }); - const params = utils.addVerifyInfo(`mid=${uid}&ps=30&tid=0&pn=1&keyword=&order=pubdate&platform=web&web_location=1550101&order_avoided=true`, verifyString); - const response = await got(`https://api.bilibili.com/x/space/wbi/arc/search?${params}`, { - headers: { - Referer: `https://space.bilibili.com/${uid}/video?tid=0&page=1&keyword=&order=pubdate`, - Cookie: cookie, - }, - }); - - const vlist = [...response.data.data.list.vlist]; - const pageTotal = Math.ceil(response.data.data.page.count / response.data.data.page.ps); - - const getPage = async (pageId) => { - const cookie = await cache.getCookie(ctx); - await got(`https://space.bilibili.com/${uid}/video?tid=0&page=${pageId}&keyword=&order=pubdate`, { - headers: { - Referer: `https://space.bilibili.com/${uid}/`, - Cookie: cookie, - }, - }); - const params = utils.addVerifyInfo(`mid=${uid}&ps=30&tid=0&pn=${pageId}&keyword=&order=pubdate&platform=web&web_location=1550101&order_avoided=true`, verifyString); - return got(`https://api.bilibili.com/x/space/wbi/arc/search?${params}`, { - headers: { - Referer: `https://space.bilibili.com/${uid}/video?tid=0&page=${pageId}&keyword=&order=pubdate`, - Cookie: cookie, - }, - }); - }; - - const promises = []; - - if (pageTotal > 1) { - for (let i = 2; i <= pageTotal; i++) { - promises.push(getPage(i)); - } - const rets = await Promise.all(promises); - rets.forEach((ret) => { - vlist.push(...ret.data.data.list.vlist); - }); - } - - ctx.state.data = { - title: name, - link: `https://space.bilibili.com/${uid}/video`, - description: `${name} 的 bilibili 所有视频`, - logo: face, - icon: face, - item: vlist.map((item) => ({ - title: item.title, - description: `${item.description}${!disableEmbed ? `${utils.iframe(item.aid)}` : ''}`, - pubDate: parseDate(item.created, 'X'), - link: item.created > utils.bvidTime && item.bvid ? `https://www.bilibili.com/video/${item.bvid}` : `https://www.bilibili.com/video/av${item.aid}`, - author: name, - comments: item.comment, - })), - }; -}; diff --git a/lib/v2/curius/templates/description.art b/lib/v2/curius/templates/description.art index 95c73adbae6b65..97491e413ece37 100644 --- a/lib/v2/curius/templates/description.art +++ b/lib/v2/curius/templates/description.art @@ -1,4 +1,4 @@ -{{ if item.metadata.full_text }} +{{ if item.metadata?.full_text }} 原文:{{@ item.metadata.full_text.replace(/\n/gm, '') }} {{ /if }} {{ if item.comments.length }} diff --git a/lib/v2/dahecube/index.js b/lib/v2/dahecube/index.js index b9c10508a45c1e..50f6a1eb61b98b 100644 --- a/lib/v2/dahecube/index.js +++ b/lib/v2/dahecube/index.js @@ -29,7 +29,7 @@ module.exports = async (ctx) => { const items = await Promise.all( list.map((item) => - ctx.cache.tryGet(item.link, async () => { + ctx.cache.tryGet(item.id, async () => { const detailResponse = await got({ method: 'post', url: 'https://app.dahecube.com/napi/news/pc/artinfo', diff --git a/lib/v2/diandong/ddh.js b/lib/v2/diandong/ddh.js deleted file mode 100644 index 7508fa1ebf1584..00000000000000 --- a/lib/v2/diandong/ddh.js +++ /dev/null @@ -1,51 +0,0 @@ -const got = require('@/utils/got'); -const cheerio = require('cheerio'); -const { parseDate } = require('@/utils/parse-date'); - -const rootUrl = 'https://webapi.diandong.com'; - -const titleMap = { - 0: '全部', - 1: '新车', - 2: '导购', - 3: '评测', - 4: '新闻', - 5: '技术', - 6: '政策', - 7: '用车', - 8: '二手车', -}; - -module.exports = async (ctx) => { - const cate = ctx.params.cate ?? 0; - const limit = ctx.query.limit ? Number(ctx.query.limit) : 25; - const url = `${rootUrl}/content/ddhList?category_id=${cate}&page=1&size=${limit}&content_ids=`; - - const response = await got(url); - const data = response.data.data.list; - const list = data.map((item) => ({ - title: item.title, - pubDate: parseDate(item.published), - author: item.author, - link: `https://www.diandong.com/news/${item.contentid}.html`, - })); - - const items = await Promise.all( - list.map((item) => - ctx.cache.tryGet(item.link, async () => { - const detailResponse = await got(item.link); - const $ = cheerio.load(detailResponse.data); - - item.description = $('#gallery-selector').html(); - - return item; - }) - ) - ); - - ctx.state.data = { - title: `电动邦 - 电动号 - ${titleMap[cate]}`, - link: 'https://www.diandong.com/news/ddh', - item: items, - }; -}; diff --git a/lib/v2/diandong/maintainer.js b/lib/v2/diandong/maintainer.js index 7afe201cda9e56..462d8e78884515 100644 --- a/lib/v2/diandong/maintainer.js +++ b/lib/v2/diandong/maintainer.js @@ -1,4 +1,3 @@ module.exports = { '/news/:cate?': ['Fatpandac'], - '/ddh/:cate?': ['Fatpandac'], }; diff --git a/lib/v2/diandong/radar.js b/lib/v2/diandong/radar.js index f9dafed16d881e..ae8a444016ce5d 100644 --- a/lib/v2/diandong/radar.js +++ b/lib/v2/diandong/radar.js @@ -8,12 +8,6 @@ module.exports = { source: ['/news'], target: '/diandong/news/:cate', }, - { - title: '电动号', - docs: 'https://docs.rsshub.app/routes/new-media#dong-qiu-di', - source: ['/news/ddh'], - target: '/diandong/ddh/:cate', - }, ], }, }; diff --git a/lib/v2/diandong/router.js b/lib/v2/diandong/router.js index e0ace36a768e80..d4ea9a1d2b3c03 100644 --- a/lib/v2/diandong/router.js +++ b/lib/v2/diandong/router.js @@ -1,4 +1,3 @@ module.exports = (router) => { router.get('/news/:cate?', require('./news')); - router.get('/ddh/:cate?', require('./ddh')); }; diff --git a/lib/v2/disinformationindex/blog.js b/lib/v2/disinformationindex/blog.js deleted file mode 100644 index 69cc7ae8e75db0..00000000000000 --- a/lib/v2/disinformationindex/blog.js +++ /dev/null @@ -1,48 +0,0 @@ -const got = require('@/utils/got'); -const cheerio = require('cheerio'); -const { parseDate } = require('@/utils/parse-date'); - -module.exports = async (ctx) => { - const rootUrl = 'https://disinformationindex.org'; - const currentUrl = `${rootUrl}/blog`; - const response = await got({ - method: 'get', - url: currentUrl, - }); - - const $ = cheerio.load(response.data); - - const list = $('.blog-entry-title a') - .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.author = content('.meta-author').text(); - item.description = content('.entry-content').html(); - item.pubDate = parseDate(content('.meta-date').text(), 'MMMM D, YYYY'); - - return item; - }) - ) - ); - - ctx.state.data = { - title: $('title').text(), - link: currentUrl, - item: items, - }; -}; diff --git a/lib/v2/disinformationindex/maintainer.js b/lib/v2/disinformationindex/maintainer.js deleted file mode 100644 index bd20e5a121c19d..00000000000000 --- a/lib/v2/disinformationindex/maintainer.js +++ /dev/null @@ -1,4 +0,0 @@ -module.exports = { - '/blog': ['nczitzk'], - '/research': ['nczitzk'], -}; diff --git a/lib/v2/disinformationindex/radar.js b/lib/v2/disinformationindex/radar.js deleted file mode 100644 index 673b91978b49ef..00000000000000 --- a/lib/v2/disinformationindex/radar.js +++ /dev/null @@ -1,19 +0,0 @@ -module.exports = { - 'disinformationindex.org': { - _name: 'Global Disinformation Index', - '.': [ - { - title: 'Blog', - docs: 'https://docs.rsshub.app/routes/new-media#global-disinformation-index', - source: ['/'], - target: '/disinformationindex/blog', - }, - { - title: 'Research', - docs: 'https://docs.rsshub.app/routes/new-media#global-disinformation-index', - source: ['/'], - target: '/disinformationindex/research', - }, - ], - }, -}; diff --git a/lib/v2/disinformationindex/research.js b/lib/v2/disinformationindex/research.js deleted file mode 100644 index 6b81f7da587c68..00000000000000 --- a/lib/v2/disinformationindex/research.js +++ /dev/null @@ -1,45 +0,0 @@ -const got = require('@/utils/got'); -const cheerio = require('cheerio'); -const { art } = require('@/utils/render'); -const path = require('path'); - -module.exports = async (ctx) => { - const rootUrl = 'https://disinformationindex.org'; - const currentUrl = `${rootUrl}/research`; - const response = await got({ - method: 'get', - url: currentUrl, - }); - - const $ = cheerio.load(response.data); - - const items = $('.elementor-widget-container .elementor-text-editor') - .map((_, item) => { - item = $(item); - const title = item.find('h3, h4').eq(0); - const image = item.parentsUntil('.elementor-container').find('.elementor-image img'); - const firstLink = item.find('a.button').eq(0); - - let links = ''; - item.find('a.button').each(function () { - links += `${$(this).text()}`; - }); - - return { - link: firstLink.attr('href'), - title: title.text() || firstLink.text(), - description: art(path.resolve(__dirname, 'templates/description.art'), { - image: image ? image.attr('src') : undefined, - title: title.next().html(), - links, - }), - }; - }) - .get(); - - ctx.state.data = { - title: $('title').text(), - link: currentUrl, - item: items, - }; -}; diff --git a/lib/v2/disinformationindex/router.js b/lib/v2/disinformationindex/router.js deleted file mode 100644 index d01b16339b7c87..00000000000000 --- a/lib/v2/disinformationindex/router.js +++ /dev/null @@ -1,4 +0,0 @@ -module.exports = (router) => { - router.get('/blog', require('./blog')); - router.get('/research', require('./research')); -}; diff --git a/lib/v2/disinformationindex/templates/description.art b/lib/v2/disinformationindex/templates/description.art deleted file mode 100644 index d72c080d1daa12..00000000000000 --- a/lib/v2/disinformationindex/templates/description.art +++ /dev/null @@ -1,7 +0,0 @@ -{{ if image }} - -{{ /if }} -{{ if title }} - {{@ title }} -{{ /if }} -{{@ links }} diff --git a/lib/v2/dx2025/radar.js b/lib/v2/dx2025/radar.js index 841657778beeb4..67da983ff6a444 100644 --- a/lib/v2/dx2025/radar.js +++ b/lib/v2/dx2025/radar.js @@ -8,12 +8,6 @@ module.exports = { source: ['/archives/category/:type/:category?', '/archives/category/:type'], target: (params) => `/dx2025/${params.type}/${params.category ? params.category : ''}`, }, - { - title: '标签', - docs: 'https://docs.rsshub.app/routes/multimedia#e-hentai-biao-qian', - source: ['/archives/tag/:tag'], - target: '/dx2025/tag/:tag', - }, ], }, }; diff --git a/lib/v2/eet-china/maintainer.js b/lib/v2/eet-china/maintainer.js deleted file mode 100644 index 86ad6b645fdd7d..00000000000000 --- a/lib/v2/eet-china/maintainer.js +++ /dev/null @@ -1,4 +0,0 @@ -module.exports = { - '/mp/tags/:id': ['nczitzk'], - '/mp/:category?': ['nczitzk'], -}; diff --git a/lib/v2/eet-china/mp/index.js b/lib/v2/eet-china/mp/index.js deleted file mode 100644 index e7f76cf1f96565..00000000000000 --- a/lib/v2/eet-china/mp/index.js +++ /dev/null @@ -1,10 +0,0 @@ -const { rootUrl, ProcessItems } = require('./util'); - -module.exports = async (ctx) => { - const { category = '' } = ctx.params; - const limit = ctx.query.limit ? parseInt(ctx.query.limit, 10) : 30; - - const currentUrl = new URL(`mp${category ? `/c${category}` : ''}`, rootUrl).href; - - ctx.state.data = await ProcessItems(limit, currentUrl, ctx.cache.tryGet); -}; diff --git a/lib/v2/eet-china/mp/tags.js b/lib/v2/eet-china/mp/tags.js deleted file mode 100644 index 866265eba895ee..00000000000000 --- a/lib/v2/eet-china/mp/tags.js +++ /dev/null @@ -1,10 +0,0 @@ -const { rootUrl, ProcessItems } = require('./util'); - -module.exports = async (ctx) => { - const { id } = ctx.params; - const limit = ctx.query.limit ? parseInt(ctx.query.limit, 10) : 30; - - const currentUrl = new URL(`mp/tags/${id}`, rootUrl).href; - - ctx.state.data = await ProcessItems(limit, currentUrl, ctx.cache.tryGet); -}; diff --git a/lib/v2/eet-china/mp/util.js b/lib/v2/eet-china/mp/util.js deleted file mode 100644 index 37bb55a3c28d0b..00000000000000 --- a/lib/v2/eet-china/mp/util.js +++ /dev/null @@ -1,67 +0,0 @@ -const got = require('@/utils/got'); -const cheerio = require('cheerio'); -const timezone = require('@/utils/timezone'); -const { parseDate } = require('@/utils/parse-date'); - -const rootUrl = 'https://www.eet-china.com'; - -module.exports = { - rootUrl, - ProcessItems: async (limit, currentUrl, tryGet) => { - const { data: response } = await got(currentUrl); - - const $ = cheerio.load(response); - - let items = $('div.swiper-con a, div.new-title a, h1.new-title a') - .toArray() - .map((item) => { - item = $(item); - - return { - title: item.text().trim(), - link: item.prop('href'), - }; - }) - .filter((item) => /^(?!.*specialcolumn\.php).*$/.test(item.link)) - .slice(0, limit); - - items = await Promise.all( - items.map((item) => - tryGet(item.link, async () => { - const { data: detailResponse } = await got(item.link); - - const content = cheerio.load(detailResponse); - - const relevantData = content('div.new-relevant span.hidden-xs'); - const upvotes = relevantData.eq(1).text(); - const comments = relevantData.eq(2).text(); - - item.title = content('h1.detail-title').text(); - item.description = content('div.article-con').html(); - item.author = content('a.write').first().text(); - item.category = content('meta[name="keywords"]').prop('content')?.split(',') ?? undefined; - item.pubDate = timezone(parseDate(content('div.new-relevant span').first().text()), +8); - item.upvotes = upvotes ? parseInt(upvotes.replace(/点赞/, ''), 10) : 0; - item.comments = comments ? parseInt(comments.replace(/评论/, ''), 10) : 0; - - return item; - }) - ) - ); - - const icon = new URL($('div.logo-mianbaoban a img').prop('src'), rootUrl).href; - - return { - item: items, - title: `面包芯语 - ${$('li.active').text() || $('div.thetitle').first().text()}`, - link: currentUrl, - description: $('meta[name="description"]').prop('content'), - language: 'zh-cn', - image: new URL($('div.logo-xinyu a img').prop('src'), rootUrl).href, - icon, - logo: icon, - subtitle: $('meta[name="keywords"]').prop('content'), - author: '电子工程专辑', - }; - }, -}; diff --git a/lib/v2/eet-china/radar.js b/lib/v2/eet-china/radar.js deleted file mode 100644 index 2ea58eaa166fb4..00000000000000 --- a/lib/v2/eet-china/radar.js +++ /dev/null @@ -1,24 +0,0 @@ -module.exports = { - 'eet-china.com': { - _name: '电子工程专辑', - '.': [ - { - title: '芯语', - docs: 'https://docs.rsshub.app/routes/new-media#dian-zi-gong-cheng-zhuan-ji-xin-yu', - source: ['/mp', '/'], - target: (params, url) => { - url = new URL(url); - const path = url.href.match(/\.com\/mp(.*?)/)[1]; - - return `/eet-china/mp${path ? `/${path}` : ''}`; - }, - }, - { - title: '芯语 - 标签', - docs: 'https://docs.rsshub.app/routes/new-media#dian-zi-gong-cheng-zhuan-ji-xin-yu-biao-qian', - source: ['/mp/tags/:id', '/'], - target: '/eet-china/mp/tags/:id', - }, - ], - }, -}; diff --git a/lib/v2/eet-china/router.js b/lib/v2/eet-china/router.js deleted file mode 100644 index 13323da506af75..00000000000000 --- a/lib/v2/eet-china/router.js +++ /dev/null @@ -1,4 +0,0 @@ -module.exports = function (router) { - router.get('/mp/tags/:id', require('./mp/tags')); - router.get('/mp/:category?', require('./mp')); -}; diff --git a/lib/v2/ezone/index.js b/lib/v2/ezone/index.js deleted file mode 100644 index 7eac6499fb984d..00000000000000 --- a/lib/v2/ezone/index.js +++ /dev/null @@ -1,70 +0,0 @@ -const got = require('@/utils/got'); -const cheerio = require('cheerio'); -const timezone = require('@/utils/timezone'); -const { parseDate } = require('@/utils/parse-date'); - -module.exports = async (ctx) => { - const category = ctx.params.category; - - const rootUrl = 'https://ezone.ulifestyle.com.hk'; - const currentUrl = `${rootUrl}/${category ?? '/getLastestPageRight/latestNews'}`; - - const response = await got({ - method: 'get', - url: currentUrl, - }); - - let list = []; - const $ = cheerio.load(response.data); - - if (category) { - list = $('.item-grid') - .map((_, item) => { - item = $(item); - return { - link: `${rootUrl}${item.attr('href')}`, - }; - }) - .get(); - } else { - list = response.data[0][1].items.map((item) => ({ - title: item.headlines.items[0].name, - link: `${rootUrl}/article/${item.standardDocumentId}`, - pubDate: timezone(parseDate(item.publishDateStr, 'YYYY-MM-DD HH:mm'), +8), - })); - } - - 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); - const pubDate = content('.date span').eq(2).text(); - const author = content('.date span').eq(1).text().trim(); - - content('a[data-href]').each(function () { - content(this).after(``); - content(this).remove(); - }); - - content('.gallery-remarks, .overlay-text-v2, .ulvideo').remove(); - - item.title = content('h2').eq(0).text(); - item.description = content('.content').html(); - item.pubDate = item.pubDate ?? timezone(parseDate(pubDate, 'DD-MM-YYYY HH:mm'), +8); - item.author = author; - - return item; - }) - ) - ); - - ctx.state.data = { - title: `${category ? $('h1').text() : '最新內容'} - ezone.hk`, - link: category ? currentUrl : rootUrl, - item: items, - }; -}; diff --git a/lib/v2/ezone/maintainer.js b/lib/v2/ezone/maintainer.js deleted file mode 100644 index 81eb78d7328b63..00000000000000 --- a/lib/v2/ezone/maintainer.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = { - '/:category?': ['nczitzk'], -}; diff --git a/lib/v2/ezone/radar.js b/lib/v2/ezone/radar.js deleted file mode 100644 index 1cd127bdc646d1..00000000000000 --- a/lib/v2/ezone/radar.js +++ /dev/null @@ -1,13 +0,0 @@ -module.exports = { - 'ezone.hk': { - _name: 'ezone.hk', - '.': [ - { - title: '分类', - docs: 'https://docs.rsshub.app/routes/new-media#ezone-hk-fen-lei', - source: ['/:category', '/'], - target: '/ezone/:category?', - }, - ], - }, -}; diff --git a/lib/v2/ezone/router.js b/lib/v2/ezone/router.js deleted file mode 100644 index cf781366fda0a7..00000000000000 --- a/lib/v2/ezone/router.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = function (router) { - router.get('/:category?', require('./index')); -}; diff --git a/lib/v2/filmdeepfocus/index.js b/lib/v2/filmdeepfocus/index.js deleted file mode 100644 index 6647f9cd8bb762..00000000000000 --- a/lib/v2/filmdeepfocus/index.js +++ /dev/null @@ -1,58 +0,0 @@ -const got = require('@/utils/got'); -const cheerio = require('cheerio'); -const { parseDate } = require('@/utils/parse-date'); - -module.exports = async (ctx) => { - const category = ctx.params.category ?? 'page'; - - const rootUrl = 'https://www.filmdeepfocus.com'; - const currentUrl = `${rootUrl}/${category}`; - - const response = await got({ - method: 'get', - url: currentUrl, - }); - - const $ = cheerio.load(response.data); - - let items = $('.summary-title-link') - .slice(0, ctx.query.limit ? parseInt(ctx.query.limit) : 20) - .toArray() - .map((item) => { - item = $(item); - - return { - title: item.text(), - link: `${rootUrl}${item.attr('href')}`, - }; - }); - - items = await Promise.all( - items.map((item) => - ctx.cache.tryGet(item.link, async () => { - const detailResponse = await got({ - method: 'get', - url: item.link, - }); - - const content = cheerio.load(detailResponse.data); - - content('.image-block').each(function () { - content(this).html(``); - }); - - item.description = content('.entry-content').html(); - item.author = content('meta[itemprop="publisher"]').attr('content'); - item.pubDate = parseDate(content('meta[itemprop="datePublished"]').attr('content')); - - return item; - }) - ) - ); - - ctx.state.data = { - title: $('title').text(), - link: currentUrl, - item: items, - }; -}; diff --git a/lib/v2/filmdeepfocus/maintainer.js b/lib/v2/filmdeepfocus/maintainer.js deleted file mode 100644 index 81eb78d7328b63..00000000000000 --- a/lib/v2/filmdeepfocus/maintainer.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = { - '/:category?': ['nczitzk'], -}; diff --git a/lib/v2/filmdeepfocus/radar.js b/lib/v2/filmdeepfocus/radar.js deleted file mode 100644 index 2cc4227edcaf99..00000000000000 --- a/lib/v2/filmdeepfocus/radar.js +++ /dev/null @@ -1,13 +0,0 @@ -module.exports = { - 'filmdeepfocus.com': { - _name: '深焦', - '.': [ - { - title: '分类', - docs: 'https://docs.rsshub.app/routes/new-media#shen-jiao-fen-lei', - source: ['/:category', '/'], - target: '/filmdeepfocus/:category?', - }, - ], - }, -}; diff --git a/lib/v2/filmdeepfocus/router.js b/lib/v2/filmdeepfocus/router.js deleted file mode 100644 index cf781366fda0a7..00000000000000 --- a/lib/v2/filmdeepfocus/router.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = function (router) { - router.get('/:category?', require('./index')); -}; diff --git a/lib/v2/github/radar.js b/lib/v2/github/radar.js index b844bda5bfa648..0a2ee693a312a7 100644 --- a/lib/v2/github/radar.js +++ b/lib/v2/github/radar.js @@ -3,13 +3,13 @@ module.exports = { _name: 'GitHub', '.': [ { - title: '仓库 Branches', + title: 'Repo branches', docs: 'https://docs.rsshub.app/routes/programming#github', source: ['/:user/:repo/branches', '/:user/:repo'], target: '/github/branches/:user/:repo', }, { - title: 'Issues / Pull Requests 评论', + title: 'Issues / Pull Requests comments', docs: 'https://docs.rsshub.app/routes/programming#github', source: ['/:user/:repo/:type/:number'], target: '/github/comments/:user/:repo/:number', @@ -21,25 +21,25 @@ module.exports = { target: '/github/comments/:user/:repo', }, { - title: '仓库 Contributors', + title: 'Repo contributors', docs: 'https://docs.rsshub.app/routes/programming#github', source: ['/:user/:repo/graphs/contributors', '/:user/:repo'], target: '/github/contributors/:user/:repo', }, { - title: '文件 Commits', + title: 'File commits', docs: 'https://docs.rsshub.app/routes/programming#github', source: '/:user/:repo/blob/:branch/*filepath', target: '/github/file/:user/:repo/:branch/:filepath', }, { - title: '仓库 Issue', + title: 'Repo issues', docs: 'https://docs.rsshub.app/routes/programming#github', source: ['/:user/:repo/issues', '/:user/:repo/issues/:id', '/:user/:repo'], target: '/github/issue/:user/:repo', }, { - title: '仓库 Pull Requests', + title: 'Repo Pull Requests', docs: 'https://docs.rsshub.app/routes/programming#github', source: ['/:user/:repo/pulls', '/:user/:repo/pulls/:id', '/:user/:repo'], target: '/github/pull/:user/:repo', @@ -51,19 +51,19 @@ module.exports = { target: '/github/pulse/:user/:repo/:period?', }, { - title: '用户仓库', + title: 'User repos', docs: 'https://docs.rsshub.app/routes/programming#github', source: '/:user', target: '/github/repos/:user', }, { - title: '仓库 Stars', + title: 'Repo stars', docs: 'https://docs.rsshub.app/routes/programming#github', source: ['/:user/:repo/stargazers', '/:user/:repo'], target: '/github/stars/:user/:repo', }, { - title: '用户 Starred Repositories', + title: 'User starred repositories', docs: 'https://docs.rsshub.app/routes/programming#github', source: '/:user', target: '/github/starred_repos/:user', @@ -81,19 +81,19 @@ module.exports = { target: '/github/trending/:since', }, { - title: '用户 Followers', + title: 'User followers', docs: 'https://docs.rsshub.app/routes/programming#github', source: '/:user', target: '/github/user/followers/:user', }, { - title: 'Wiki 历史', + title: 'Wiki history', docs: 'https://docs.rsshub.app/routes/programming#github', source: ['/:user/:repo/wiki/:page/_history', '/:user/:repo/wiki/:page', '/:user/:repo/wiki/_history', '/:user/:repo/wiki'], target: '/github/wiki/:user/:repo/:page', }, { - title: 'Notifications 通知', + title: 'Notifications', docs: 'https://docs.rsshub.app/routes/programming#github', source: ['/notifications'], target: '/github/notifications', diff --git a/lib/v2/good/index.js b/lib/v2/good/index.js deleted file mode 100644 index fbe486507bb17c..00000000000000 --- a/lib/v2/good/index.js +++ /dev/null @@ -1,53 +0,0 @@ -const got = require('@/utils/got'); -const cheerio = require('cheerio'); -const { parseDate } = require('@/utils/parse-date'); - -module.exports = async (ctx) => { - const rootUrl = 'https://good.news'; - - const response = await got(rootUrl); - - const $ = cheerio.load(response.data); - - let items = $('.content-structure') - .slice(0, ctx.query.limit ? parseInt(ctx.query.limit) : 50) - .toArray() - .map((item) => { - item = $(item); - return { - title: item - .find('h4') - .text() - .replace(/^\s+\d{1,2}\./, ''), - link: item.parent().attr('href'), - pubDate: parseDate(item.find('.content-left').text()), - }; - }); - - items = await Promise.all( - items.map((item) => - ctx.cache.tryGet(item.link, async () => { - const detailResponse = await got(item.link); - - const content = cheerio.load(detailResponse.data); - - content('img').each((_, img) => { - if (img.attribs['data-src']) { - img.attribs.src = img.attribs['data-src'].replace('-cdsb.onlycompress', ''); - delete img.attribs['data-src']; - } - }); - - item.description = content('[contentscore]').html(); - - return item; - }) - ) - ); - - ctx.state.data = { - title: 'good.news - 今日要闻', - link: rootUrl, - item: items, - }; -}; diff --git a/lib/v2/good/maintainer.js b/lib/v2/good/maintainer.js deleted file mode 100644 index ca7cf1eb13c68a..00000000000000 --- a/lib/v2/good/maintainer.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = { - '/': ['nczitzk'], -}; diff --git a/lib/v2/good/radar.js b/lib/v2/good/radar.js deleted file mode 100644 index 5666b94ddc1adf..00000000000000 --- a/lib/v2/good/radar.js +++ /dev/null @@ -1,13 +0,0 @@ -module.exports = { - 'good.news': { - _name: 'Good.news', - '.': [ - { - title: '今日要闻', - docs: 'https://docs.rsshub.app/routes/new-media#good-news-jin-ri-yao-wen', - source: ['/'], - target: '/good', - }, - ], - }, -}; diff --git a/lib/v2/good/router.js b/lib/v2/good/router.js deleted file mode 100644 index 20c52b09d72938..00000000000000 --- a/lib/v2/good/router.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = function (router) { - router.get('/', require('./index')); -}; diff --git a/lib/v2/gq/maintainer.js b/lib/v2/gq/maintainer.js deleted file mode 100644 index 4423efadf965fc..00000000000000 --- a/lib/v2/gq/maintainer.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = { - '/tw/:caty?/:subcaty?': ['nczitzk'], -}; diff --git a/lib/v2/gq/radar.js b/lib/v2/gq/radar.js deleted file mode 100644 index e6881c758d21f2..00000000000000 --- a/lib/v2/gq/radar.js +++ /dev/null @@ -1,13 +0,0 @@ -module.exports = { - 'gq.com.tw': { - _name: 'GQ Taiwan', - '.': [ - { - title: 'GQ Taiwan', - docs: 'https://docs.rsshub.app/routes/new-media#gq', - source: ['/*path'], - target: '/gq/tw/:path', - }, - ], - }, -}; diff --git a/lib/v2/gq/router.js b/lib/v2/gq/router.js deleted file mode 100644 index 3022fe20d51bf5..00000000000000 --- a/lib/v2/gq/router.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = (router) => { - router.get('/tw/:caty?/:subcaty?', require('./tw/index')); -}; diff --git a/lib/v2/gq/templates/embed-article.art b/lib/v2/gq/templates/embed-article.art deleted file mode 100644 index 188ad1ff16bbba..00000000000000 --- a/lib/v2/gq/templates/embed-article.art +++ /dev/null @@ -1 +0,0 @@ -{{ text }} diff --git a/lib/v2/gq/templates/embed-product.art b/lib/v2/gq/templates/embed-product.art deleted file mode 100644 index 5f0ebf53fe3746..00000000000000 --- a/lib/v2/gq/templates/embed-product.art +++ /dev/null @@ -1,4 +0,0 @@ -{{@ img }} -{{ productProps.dangerousHed }} -{{ if productProps.offerRetailer }}{{ productProps.offerRetailer }} {{ /if }}{{ if productProps.multipleOffers }}{{ productProps.multipleOffers[0].price }}{{ /if }} -{{ if productProps.offerUrl }}Buy It{{ /if }} diff --git a/lib/v2/gq/templates/img.art b/lib/v2/gq/templates/img.art deleted file mode 100644 index 4baa2d6965f234..00000000000000 --- a/lib/v2/gq/templates/img.art +++ /dev/null @@ -1,6 +0,0 @@ -{{ if src }} - - - {{ if alt }}{{@ alt }}{{ /if }} - -{{ /if }} diff --git a/lib/v2/gq/templates/tw.art b/lib/v2/gq/templates/tw.art deleted file mode 100644 index fdbe4866bb511c..00000000000000 --- a/lib/v2/gq/templates/tw.art +++ /dev/null @@ -1,3 +0,0 @@ -{{ if dangerousDek }}
{{ desc }}