From 387f4c6264a1aaeb7f47051e8a20cb8f6a02d4e8 Mon Sep 17 00:00:00 2001 From: DIYgod Date: Mon, 28 Oct 2019 19:29:03 +0800 Subject: [PATCH] feat(radar): add rules --- assets/radar-rules.js | 189 ++++++++++++++++++++++++++++++++++++++++-- docs/bbs.md | 8 +- docs/game.md | 16 ++-- docs/new-media.md | 2 +- docs/other.md | 4 +- docs/picture.md | 2 +- docs/social-media.md | 6 +- 7 files changed, 203 insertions(+), 24 deletions(-) diff --git a/assets/radar-rules.js b/assets/radar-rules.js index bc75b75ce..f284a890a 100644 --- a/assets/radar-rules.js +++ b/assets/radar-rules.js @@ -49,6 +49,24 @@ script: "({uid: document.querySelector('head').innerHTML.match(/\\$CONFIG\\['oid']='(\\d+)'/)[1]})", verification: (params) => params.uid, }, + { + title: '关键词', + docs: 'https://docs.rsshub.app/social-media.html#wei-bo', + }, + { + title: '超话', + docs: 'https://docs.rsshub.app/social-media.html#wei-bo', + source: '/p/:id/super_index', + target: '/weibo/super_index/:id', + }, + ], + s: [ + { + title: '热搜榜', + docs: 'https://docs.rsshub.app/social-media.html#wei-bo', + source: '/top/summary', + target: '/weibo/search/hot', + }, ], }, 'pixiv.net': { @@ -300,17 +318,20 @@ 'smzdm.com': { _name: '什么值得买', www: [ - { - title: '关键词', - docs: 'https://docs.rsshub.app/shopping.html#shen-me-zhi-de-mai', - target: '/smzdm/keyword/:keyword', - }, { title: '排行榜', docs: 'https://docs.rsshub.app/shopping.html#shen-me-zhi-de-mai', source: '/top', }, ], + search: [ + { + title: '关键词', + docs: 'https://docs.rsshub.app/shopping.html#shen-me-zhi-de-mai', + source: '/', + target: (params, url) => `/smzdm/keyword/${new URL(url).searchParams.get('s')}`, + }, + ], }, 'rsshub.app': { _name: 'RSSHub', @@ -568,4 +589,162 @@ }, ], }, + 'nga.cn': { + _name: 'NGA', + bbs: [ + { + title: '分区帖子', + docs: 'https://docs.rsshub.app/bbs.html#nga', + source: '/thread.php', + target: (params, url) => new URL(url).searchParams.get('fid') && `/nga/forum/${new URL(url).searchParams.get('fid')}`, + }, + { + title: '帖子', + docs: 'https://docs.rsshub.app/bbs.html#nga', + source: '/read.php', + target: (params, url) => new URL(url).searchParams.get('tid') && `/nga/post/${new URL(url).searchParams.get('tid')}`, + }, + ], + }, + 'playstation.com': { + _name: 'PlayStation', + store: [ + { + title: '游戏列表', + docs: 'https://docs.rsshub.app/game.html#playstation', + source: '/zh-hans-hk/grid/:id/:page', + target: '/ps/list/:id', + }, + ], + www: [ + { + title: '用户奖杯', + docs: 'https://docs.rsshub.app/game.html#playstation', + }, + { + title: '系统更新纪录', + docs: 'https://docs.rsshub.app/game.html#playstation', + }, + ], + }, + 'monsterhunter.com': { + _name: '怪物猎人世界', + www: [ + { + title: '更新情报', + docs: 'https://docs.rsshub.app/game.html#guai-wu-lie-ren-shi-jie', + source: ['', '/*tpath'], + target: '/mhw/update', + }, + { + title: '最新消息', + docs: 'https://docs.rsshub.app/game.html#guai-wu-lie-ren-shi-jie', + source: ['', '/*tpath'], + target: '/mhw/news', + }, + ], + }, + 'vgtime.com': { + _name: '游戏时光', + www: [ + { + title: '新闻', + docs: 'https://docs.rsshub.app/game.html#you-xi-shi-guang', + source: '/topic/index.jhtml', + target: '/vgtime/news', + }, + { + title: '游戏发售表', + docs: 'https://docs.rsshub.app/game.html#you-xi-shi-guang', + source: '/game/release.jhtml', + target: '/vgtime/release', + }, + { + title: '关键词资讯', + docs: 'https://docs.rsshub.app/game.html#you-xi-shi-guang', + source: '/search/list.jhtml', + target: (params, url) => `/vgtime/keyword/${new URL(url).searchParams.get('keyword')}`, + }, + ], + }, + 'bing.com': { + _name: 'Bing', + www: [ + { + title: '每日壁纸', + docs: 'https://docs.rsshub.app/picture.html#bing-bi-zhi', + source: '', + target: '/bing', + }, + ], + }, + 'dcard.tw': { + _name: 'Dcard', + www: [ + { + title: '首頁帖子-最新', + docs: 'https://docs.rsshub.app/bbs.html#dcard', + source: '/f', + target: '/dcard/posts/latest', + }, + { + title: '首頁帖子-熱門', + docs: 'https://docs.rsshub.app/bbs.html#dcard', + source: '/f', + target: '/dcard/posts/popular', + }, + { + title: '板塊帖子-最新', + docs: 'https://docs.rsshub.app/bbs.html#dcard', + source: '/f/:section', + target: '/dcard/:section/latest', + }, + { + title: '板塊帖子-熱門', + docs: 'https://docs.rsshub.app/bbs.html#dcard', + source: '/f/:section', + target: '/dcard/:section/popular', + }, + ], + }, + 'wegene.com': { + _name: 'WeGene', + www: [ + { + title: '最近更新', + docs: 'https://docs.rsshub.app/other.html#wegene', + source: '', + target: '/wegene/newest', + }, + { + title: '栏目', + docs: 'https://docs.rsshub.app/other.html#wegene', + source: '/crowdsourcing', + target: '/wegene/column/all/all', + }, + ], + }, + 'qdaily.com': { + _name: '好奇心日报', + www: [ + { + title: '标签', + docs: 'https://docs.rsshub.app/new-media.html#hao-qi-xin-ri-bao', + source: '/tags/:idd', + target: (params) => `/qdaily/tag/${params.idd.replace('.html', '')}`, + }, + { + title: '栏目', + docs: 'https://docs.rsshub.app/new-media.html#hao-qi-xin-ri-bao', + source: '/special_columns/:idd', + target: (params) => `/qdaily/column/${params.idd.replace('.html', '')}`, + }, + { + title: '分类', + docs: 'https://docs.rsshub.app/new-media.html#hao-qi-xin-ri-bao', + source: '/categories/:idd', + target: (params) => `/qdaily/researcach/${params.idd.replace('.html', '')}`, + }, + ], + }, }); diff --git a/docs/bbs.md b/docs/bbs.md index c7f22572e..e5fcadf37 100644 --- a/docs/bbs.md +++ b/docs/bbs.md @@ -8,11 +8,11 @@ pageClass: routes ### 首頁帖子 - + ### 板塊帖子 - + ## MCBBS @@ -28,11 +28,11 @@ pageClass: routes ### 分区帖子 - + ### 帖子 - + ## Saraba1st diff --git a/docs/game.md b/docs/game.md index 50e9e859e..5876cf731 100644 --- a/docs/game.md +++ b/docs/game.md @@ -104,7 +104,7 @@ pageClass: routes ### PlayStation Store 游戏列表 - + 适用于 URL 如 的列表页,比如 [PSN 每月免费游戏](https://store.playstation.com/zh-hans-hk/grid/STORE-MSF86012-PLUS_FTT_CONTENT) 的 gridName 为 STORE-MSF86012-PLUS_FTT_CONTENT @@ -112,11 +112,11 @@ pageClass: routes ### PlayStation Network 用户奖杯 - + ### PlayStation 4 系统更新纪录 - + ## psnine @@ -207,11 +207,11 @@ Example: `https://store.steampowered.com/search/?specials=1&term=atelier` 中的 ### 更新情报 - + ### 最新消息 - + ## 旅法师营地 @@ -303,15 +303,15 @@ Example: `https://store.steampowered.com/search/?specials=1&term=atelier` 中的 ### 游戏时光新闻 - + ### 游戏时光游戏发售表 - + ### 关键词资讯 - + ## 游研社 diff --git a/docs/new-media.md b/docs/new-media.md index af1e8923e..77221480d 100644 --- a/docs/new-media.md +++ b/docs/new-media.md @@ -325,7 +325,7 @@ pageClass: routes ### 标签,栏目,分类 - + | 标签 | 栏目 | 分类 | | ---- | ------ | ---------- | diff --git a/docs/other.md b/docs/other.md index 04d0b7cb5..9294505d6 100644 --- a/docs/other.md +++ b/docs/other.md @@ -97,10 +97,10 @@ board 和 build 可在[这里](http://api.ineal.me/tss/status)查看 ### 最近更新 - + ### 栏目 - + ::: type 为 all 时,category 参数不支持 cost 和 free diff --git a/docs/picture.md b/docs/picture.md index 10d574155..be65e5065 100644 --- a/docs/picture.md +++ b/docs/picture.md @@ -14,7 +14,7 @@ pageClass: routes ### 每日壁纸 - + ## CNU 视觉联盟 diff --git a/docs/social-media.md b/docs/social-media.md index b772f2a1d..b41afce4f 100644 --- a/docs/social-media.md +++ b/docs/social-media.md @@ -566,15 +566,15 @@ pageClass: routes ### 关键词 - + ### 热搜榜 - + ### 超话 - + ## 微博绿洲