Skip to content

Commit

Permalink
docs(*): add puppeteer budge (DIYgod#9772)
Browse files Browse the repository at this point in the history
Signed-off-by: Rongrong <i@rong.moe>
  • Loading branch information
Rongronggg9 authored May 17, 2022
1 parent eeb3784 commit 731c111
Show file tree
Hide file tree
Showing 15 changed files with 73 additions and 43 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,6 @@ indent_size = 2

[{**.yml,**.yaml}]
indent_size = 2

[*.vue]
indent_size = 2
23 changes: 17 additions & 6 deletions docs/.vuepress/components/Route.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
<template>
<div class="routeBlock" :id="path">
<p class="badge">
<Badge text="支持 BT" type="tip" vertical="middle" v-if="supportBT"/> <Badge text="支持播客" type="tip" vertical="middle" v-if="supportPodcast"/> <Badge text="支持 Sci-Hub" type="tip" vertical="middle" v-if="supportScihub"/> <a target="_blank" href="/faq.html" v-if="anticrawler"><Badge text="反爬严格" vertical="middle" type="warn"/></a> <a target="_blank" href="https://github.com/DIYgod/RSSHub-Radar" v-if="radar"><Badge text="支持浏览器扩展" vertical="middle" type="tip"/></a> <a target="_blank" href="https://github.com/Cay-Zhang/RSSBud" v-if="rssbud"><Badge text="支持 RSSBud" vertical="middle" type="tip"/></a> <a target="_blank" href="https://docs.rsshub.app/install/" v-if="selfhost"><Badge text="仅支持自建" vertical="middle" type="warn"/></a>
<Badge text="支持 BT" vertical="middle" type="tip" v-if="supportBT"/>
<Badge text="支持播客" vertical="middle" type="tip" v-if="supportPodcast"/>
<Badge text="支持 Sci-Hub" vertical="middle" type="tip" v-if="supportScihub"/>
<Badge text="依赖 Puppeteer" vertical="middle" type="warn" v-if="puppeteer"/>
<a target="_blank" href="/faq.html" v-if="anticrawler"><Badge text="反爬严格" vertical="middle" type="warn"/></a>
<a target="_blank" href="/install/" v-if="selfhost"><Badge text="仅支持自建" vertical="middle" type="warn"/></a>
<a target="_blank" href="https://github.com/DIYgod/RSSHub-Radar" v-if="radar"><Badge text="支持浏览器扩展" vertical="middle" type="tip"/></a>
<a target="_blank" href="https://github.com/Cay-Zhang/RSSBud" v-if="rssbud"><Badge text="支持 RSSBud" vertical="middle" type="tip"/></a>
</p>
<p class="author">
作者: <a v-for="uid in author.split(' ')" :href="`https://github.com/${uid}`" target="_blank"> @{{ uid }} </a>
Expand Down Expand Up @@ -69,19 +76,23 @@ export default {
type: String,
default: null
},
puppeteer: {
type: String,
default: null
},
},
methods: {
renderMarkdown(item, inline = true) {
const md = require('markdown-it')({
html: true,
html: true,
});
return inline ? md.renderInline(item) : md.render(item);
return inline ? md.renderInline(item) : md.render(item);
},
},
computed: {
demoUrl: function () {
return 'https://rsshub.app'+ this.example
}
demoUrl: function () {
return 'https://rsshub.app'+ this.example
}
}
}
</script>
23 changes: 17 additions & 6 deletions docs/.vuepress/components/RouteEn.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
<template>
<div class="routeBlock" :id="path">
<p class="badge">
<Badge text="Support BT" type="tip" vertical="middle" v-if="supportBT"/> <Badge text="Support Podcast" type="tip" vertical="middle" v-if="supportPodcast"/> <Badge text="Support Sci-Hhub" type="tip" vertical="middle" v-if="supportScihub"/> <a target="_blank" href="/en/faq.html" v-if="anticrawler"><Badge text="strict anti-crawler policy" vertical="middle" type="warn"/></a> <a target="_blank" href="https://github.com/DIYgod/RSSHub-Radar" v-if="radar"><Badge text="support browser extension" vertical="middle" type="tip"/></a> <a target="_blank" href="https://github.com/Cay-Zhang/RSSBud" v-if="rssbud"><Badge text="support rssbud" vertical="middle" type="tip"/></a> <a target="_blank" href="https://docs.rsshub.app/en/install/" v-if="selfhost"><Badge text="self-host only" vertical="middle" type="warn"/></a>
<Badge text="Support BT" vertical="middle" type="tip" v-if="supportBT"/>
<Badge text="Support Podcast" vertical="middle" type="tip" v-if="supportPodcast"/>
<Badge text="Support Sci-Hub" vertical="middle" type="tip" v-if="supportScihub"/>
<Badge text="Rely on Puppeteer" vertical="middle" type="warn" v-if="puppeteer"/>
<a target="_blank" href="/en/faq.html" v-if="anticrawler"><Badge text="Strict anti-crawler policy" vertical="middle" type="warn"/></a>
<a target="_blank" href="/en/install/" v-if="selfhost"><Badge text="Self-host only" vertical="middle" type="warn"/></a>
<a target="_blank" href="https://github.com/DIYgod/RSSHub-Radar" v-if="radar"><Badge text="Support browser extension" vertical="middle" type="tip"/></a>
<a target="_blank" href="https://github.com/Cay-Zhang/RSSBud" v-if="rssbud"><Badge text="Support RSSBud" vertical="middle" type="tip"/></a>
</p>
<p class="author">
Author: <a v-for="uid in author.split(' ')" :href="`https://github.com/${uid}`" target="_blank"> @{{ uid }} </a>
Expand Down Expand Up @@ -69,19 +76,23 @@ export default {
type: String,
default: null
},
puppeteer: {
type: String,
default: null
}
},
methods: {
renderMarkdown(item, inline = true) {
const md = require('markdown-it')({
html: true,
html: true,
});
return inline ? md.renderInline(item) : md.render(item);
return inline ? md.renderInline(item) : md.render(item);
},
},
computed: {
demoUrl: function () {
return 'https://rsshub.app'+ this.example
}
demoUrl: function () {
return 'https://rsshub.app'+ this.example
}
}
}
</script>
6 changes: 3 additions & 3 deletions docs/bbs.md
Original file line number Diff line number Diff line change
Expand Up @@ -564,19 +564,19 @@ pageClass: routes

### 发现

<Route author="zphw" example="/pincong/category/1/new" path="/pincong/category/:category?/:sort?" :paramsDesc="['分类,与官网分类 URL `category-` 后的数字对应,默认为全部', '排序方式,参数可见下表,默认为推荐']" anticrawler="1" />
<Route author="zphw" example="/pincong/category/1/new" path="/pincong/category/:category?/:sort?" :paramsDesc="['分类,与官网分类 URL `category-` 后的数字对应,默认为全部', '排序方式,参数可见下表,默认为推荐']" anticrawler="1" puppeteer="1"/>

| 最新 | 推荐 | 热门 |
| --- | --------- | --- |
| new | recommend | hot |

### 精选

<Route author="zphw" example="/pincong/hot" path="/pincong/hot/:category?" :paramsDesc="['分类,与官网分类 URL `category-` 后的数字对应,默认为全部']" anticrawler="1" />
<Route author="zphw" example="/pincong/hot" path="/pincong/hot/:category?" :paramsDesc="['分类,与官网分类 URL `category-` 后的数字对应,默认为全部']" anticrawler="1" puppeteer="1"/>

### 话题

<Route author="zphw" example="/pincong/topic/美国" path="/pincong/topic/:topic?" :paramsDesc="['话题,可在官网获取']" anticrawler="1" />
<Route author="zphw" example="/pincong/topic/美国" path="/pincong/topic/:topic?" :paramsDesc="['话题,可在官网获取']" anticrawler="1" puppeteer="1"/>

## 三星盖乐世社区

Expand Down
2 changes: 1 addition & 1 deletion docs/en/government.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Language

### Latest News

<RouteEn author="linbuxiao" example="/ccac/news/all" path="/ccac/news/:type/:lang?" :paramsDesc="['Category', 'Language, default to `sc`. Supprot `en`(English), `sc`(Simplified Chinese), `tc`(Traditional Chinese) and `pt`(Portuguese)']">
<RouteEn author="linbuxiao" example="/ccac/news/all" path="/ccac/news/:type/:lang?" :paramsDesc="['Category', 'Language, default to `sc`. Supprot `en`(English), `sc`(Simplified Chinese), `tc`(Traditional Chinese) and `pt`(Portuguese)']" puppeteer="1">
Category

| All | Detected Cases | Investigation Reports or Recommendations | Annual Reports | CCAC's Updates |
Expand Down
4 changes: 2 additions & 2 deletions docs/en/other.md
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,8 @@ Type

### Homepage

<RouteEn author="SettingDust Halcao" example="/uraaka-joshi" path="/uraaka-joshi" radar="1" rssbud="1"/>
<RouteEn author="SettingDust Halcao" example="/uraaka-joshi" path="/uraaka-joshi" radar="1" rssbud="1" puppeteer="1"/>

### User

<RouteEn author="SettingDust Halcao" example="/uraaka-joshi/_rrwq" path="/uraaka-joshi/:id" :paramsDesc="['User ID']" radar="1" rssbud="1"/>
<RouteEn author="SettingDust Halcao" example="/uraaka-joshi/_rrwq" path="/uraaka-joshi/:id" :paramsDesc="['User ID']" radar="1" rssbud="1" puppeteer="1"/>
2 changes: 1 addition & 1 deletion docs/en/traditional-media.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ The following are some of the supported Channel and Topic ids.

### Topics

<RouteEn author="zoenglinghou" example="/apnews/topics/apf-topnews" path="/apnews/topics/:topic" :paramsDesc="['Topic name,can be found in URL. For example: the topic name of AP Top News [https://apnews.com/apf-topnews](https://apnews.com/apf-topnews) is `apf-topnews`']" radar="1" rssbud="1"/>
<RouteEn author="zoenglinghou mjysci" example="/apnews/topics/apf-topnews" path="/apnews/topics/:topic" :paramsDesc="['Topic name,can be found in URL. For example: the topic name of AP Top News [https://apnews.com/apf-topnews](https://apnews.com/apf-topnews) is `apf-topnews`']" radar="1" rssbud="1" anticrawler="1" puppeteer="1"/>

## BBC

Expand Down
4 changes: 2 additions & 2 deletions docs/finance.md
Original file line number Diff line number Diff line change
Expand Up @@ -476,11 +476,11 @@ pageClass: routes

### 沟通交流

<Route author="nczitzk" example="/gov/pbc/goutongjiaoliu" path="/gov/pbc/goutongjiaoliu"/>
<Route author="nczitzk" example="/gov/pbc/goutongjiaoliu" path="/gov/pbc/goutongjiaoliu" puppeteer="1"/>

### 货币政策司公开市场交易公告

<Route author="nczitzk" example="/gov/pbc/tradeAnnouncement" path="/gov/pbc/tradeAnnouncement"/>
<Route author="nczitzk" example="/gov/pbc/tradeAnnouncement" path="/gov/pbc/tradeAnnouncement" puppeteer="1"/>

### 政策研究

Expand Down
2 changes: 1 addition & 1 deletion docs/government.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ pageClass: routes

### 最新消息

<Route author="linbuxiao" example="/ccac/news/all" path="/ccac/news/:type/:lang?" :paramsDesc="['类别', '语言,留空为`sc`,支持`sc`(简中),`tc`(繁中),`en`(英文),`pt`(葡萄牙文)']">
<Route author="linbuxiao" example="/ccac/news/all" path="/ccac/news/:type/:lang?" :paramsDesc="['类别', '语言,留空为`sc`,支持`sc`(简中),`tc`(繁中),`en`(英文),`pt`(葡萄牙文)']" puppeteer="1">

| 全部 | 案件发布 | 调查报告或勘喻 | 年度报告 | 公署消息 |
| --- | ---- | ---------- | ------------ | ------- |
Expand Down
4 changes: 3 additions & 1 deletion docs/multimedia.md
Original file line number Diff line number Diff line change
Expand Up @@ -888,12 +888,14 @@ JavDB 有多个备用域名,本路由默认使用永久域名 <https://javdb.c

### 系列作品

<Route author="minimalistrojan" example="/prestige-av/series/847" path="/prestige-av/series/:mid/:sort?" :paramsDesc="['系列编号', '排序方式,缺省为 near(最新)']"/>
<Route author="minimalistrojan" example="/prestige-av/series/847" path="/prestige-av/series/:mid/:sort?" :paramsDesc="['系列编号', '排序方式,缺省为 near(最新)']" puppeteer="1">

| 人气 | 最新 | 发售日期 | 标题顺序 | 价格升序 | 价格降序 |
| ------- | ---- | ---- | ----- | ---- | ---- |
| popular | near | date | title | low | high |

</Route>

## rs05 人生 05 电影

### rs05 电影列表
Expand Down
4 changes: 2 additions & 2 deletions docs/other.md
Original file line number Diff line number Diff line change
Expand Up @@ -613,11 +613,11 @@ type 为 all 时,category 参数不支持 cost 和 free

### 主页

<Route author="SettingDust Halcao" example="/uraaka-joshi" path="/uraaka-joshi" radar="1" rssbud="1"/>
<Route author="SettingDust Halcao" example="/uraaka-joshi" path="/uraaka-joshi" radar="1" rssbud="1" puppeteer="1"/>

### 用户

<Route author="SettingDust Halcao" example="/uraaka-joshi/_rrwq" path="/uraaka-joshi/:id" :paramsDesc="['用户名']" radar="1" rssbud="1"/>
<Route author="SettingDust Halcao" example="/uraaka-joshi/_rrwq" path="/uraaka-joshi/:id" :paramsDesc="['用户名']" radar="1" rssbud="1" puppeteer="1"/>

## 律师事务所文章

Expand Down
8 changes: 4 additions & 4 deletions docs/social-media.md
Original file line number Diff line number Diff line change
Expand Up @@ -848,7 +848,7 @@ YouTube 官方亦有提供频道 RSS,形如 <https://www.youtube.com/feeds/vid

### 博主

<Route author="Max-Tortoise Rongronggg9" example="/douyin/user/MS4wLjABAAAARcAHmmF9mAG3JEixq_CdP72APhBlGlLVbN-1eBcPqao" path="/douyin/user/:uid/:routeParams?" :paramsDesc="['uid,可在 URL 中找到', '额外参数,query string 格式,请参阅下面的表格']" anticrawler="1" radar="1" rssbud="1">
<Route author="Max-Tortoise Rongronggg9" example="/douyin/user/MS4wLjABAAAARcAHmmF9mAG3JEixq_CdP72APhBlGlLVbN-1eBcPqao" path="/douyin/user/:uid/:routeParams?" :paramsDesc="['uid,可在 URL 中找到', '额外参数,query string 格式,请参阅下面的表格']" anticrawler="1" radar="1" rssbud="1" puppeteer="1">

|| 含义 || 默认值 |
| -------- | ----------------------------------- | ---------------------- | ------- |
Expand Down Expand Up @@ -1310,15 +1310,15 @@ rule

### 用户笔记和专辑

<Route author="lotosbin" example="/xiaohongshu/user/593032945e87e77791e03696/notes" path="/xiaohongshu/user/:user_id/notes" :paramsDesc="['user_id']"/>
<Route author="lotosbin" example="/xiaohongshu/user/593032945e87e77791e03696/notes" path="/xiaohongshu/user/:user_id/notes" :paramsDesc="['user_id']" puppeteer="1"/>

### 用户专辑

<Route author="lotosbin" example="/xiaohongshu/user/593032945e87e77791e03696/album" path="/xiaohongshu/user/:user_id/album" :paramsDesc="['user_id']"/>
<Route author="lotosbin" example="/xiaohongshu/user/593032945e87e77791e03696/album" path="/xiaohongshu/user/:user_id/album" :paramsDesc="['user_id']" puppeteer="1"/>

### 专辑

<Route author="lotosbin" example="/xiaohongshu/board/5db6f79200000000020032df" path="/xiaohongshu/board/:board_id" :paramsDesc="['board_id']" />
<Route author="lotosbin" example="/xiaohongshu/board/5db6f79200000000020032df" path="/xiaohongshu/board/:board_id" :paramsDesc="['board_id']" puppeteer="1"/>

## 新榜

Expand Down
2 changes: 1 addition & 1 deletion docs/study.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ path="/ctfhub/upcoming/:limit?"

### 最新消息

<Route author="zenxds" example="/ielts" path="/ielts"/>
<Route author="zenxds" example="/ielts" path="/ielts" puppeteer="1"/>

## MarginNote

Expand Down
7 changes: 5 additions & 2 deletions docs/traditional-media.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,12 @@ pageClass: routes

### 话题

<Route author="mjysci" example="/apnews/topics/ap-top-news" path="/apnews/topics/:topic" :paramsDesc="['话题名称,可在 URL 中找到,例如 AP Top News [https://apnews.com/hub/ap-top-news](https://apnews.com/hub/ap-top-news) 的话题为 `ap-top-news`']" anticrawler="1"/>
<Route author="zoenglinghou mjysci" example="/apnews/topics/ap-top-news" path="/apnews/topics/:topic" :paramsDesc="['话题名称,可在 URL 中找到,例如 AP Top News [https://apnews.com/hub/ap-top-news](https://apnews.com/hub/ap-top-news) 的话题为 `ap-top-news`']" radar="1" rssbud="1" anticrawler="1" puppeteer="1">

采用了 `puppeteer` 规避 `Project Shield`,无全文抓取,建议自建。

</Route>

## BBC

### BBC 英文
Expand Down Expand Up @@ -1221,7 +1224,7 @@ category 对应的关键词有

### 新闻

<Route author="HenryQW" example="/nytimes/dual" path="/nytimes/:lang?" :paramsDesc="['语言,缺省中文']">
<Route author="HenryQW" example="/nytimes/dual" path="/nytimes/:lang?" :paramsDesc="['语言,缺省中文']" puppeteer="1">

通过提取文章全文,以提供比官方源更佳的阅读体验。

Expand Down
Loading

0 comments on commit 731c111

Please sign in to comment.