Skip to content

Commit

Permalink
Merge branch 'master' into feature/voa
Browse files Browse the repository at this point in the history
  • Loading branch information
NeverBehave authored Jan 11, 2021
2 parents 9489cb9 + c5764b4 commit 47676f3
Show file tree
Hide file tree
Showing 87 changed files with 2,841 additions and 363 deletions.
63 changes: 61 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,68 @@ Close #
## 完整路由地址 / Example for the proposed route(s)

<!--
为方便测试,请附上完整路由地址,包括所有必选与可选参数,否则将导致 PR 被关闭。
To simplify the testing workflow, please include the complete route, with all required and optional parameters, otherwise your pull request will be closed.
请按照如下格式填写`routes`区域: 我们将会根据你的参数展开自动测试. 一行一个路由
Please fill the `routes` block follow the format below, as we will perform automatic test based on this information. one route per line.
```
/some/route
/some/other/route
```
如果与路由无关, 请写`NOROUTE`
```
NOROUTE
```
-->

<!-- FILL HERE -->
```routes
```


## 新RSS检查列表 / New RSS Script Checklist

<!--
Please go over the checklist below before PR: this improve your PR pass rate.
Reference: https://docs.rsshub.app/en/joinus/
请在提交PR前检查以下事项: 这可以大大提升通过率
这些就是我们在审核时主要关注的事项, 敬请留意
参考: https://docs.rsshub.app/joinus
-->

- [ ] 这个PR中包含了新的路由吗? Does this PR add new route?
- 如果有, 请完成检查列表. If yes, please finish the check list
- **如果你的PR符合下方某个事项, 也请注明. If any of the checklist item meets your PR, please fill it out.**
- [x] <- 这样打勾
- [ ] 是否提供了文档? Documentation provided?
- [ ] 是否提供了英文文档? EN Documentation provided?
- [ ] 是否支持全文获取? Is this RSS Script support fulltext?
- [ ] 如果全文获取中需要访问文章链接, 是否使用了缓存? If fulltext requires to fetch detail pages, is cache used in the process?
- [缓存说明](https://docs.rsshub.app/joinus/#ti-jiao-xin-de-rsshub-gui-ze-bian-xie-jiao-ben-shi-yong-huan-cun) | [How to use cache](https://docs.rsshub.app/joinus/#ti-jiao-xin-de-rsshub-gui-ze-bian-xie-jiao-ben-shi-yong-huan-cun)
- [ ] 目标是否有明显的反爬/频率限制? Is there any sign of anti-bot or rate limit?
- [ ] 如果有, 是否有对应的措施? (延长缓存时间, 写文档说明, etc.) If yes, do your code reflect this sign? (e.g. write documentations, use long cache time)
- [ ] 是否引入的新的包? Any new package introduced?
- 如果有, 请说明原因. If yes, please state your reason
- [ ] 是否使用了`Puppeteer`? Make use of `Puppeteer`?
- 如果有, 请说明原因. If yes, please state your reason


## 说明 / Note

<!--
Please state your reason/note here
请在这里描述你的原因或留下其他相关的说明
-->
42 changes: 42 additions & 0 deletions .github/workflows/pr-deploy-route-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: PR route test

on: pull_request

jobs:
testRoute:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Fetch affected routes
id: fetchRoute
uses: actions/github-script@v3
with:
# by default, JSON format returned
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const body = context.payload.pull_request.body
const number = context.payload.pull_request.number
const script = require(`${process.env.GITHUB_WORKSPACE}/scripts/workflow/test-route/identify.js`)
return await script({github, context, core}, body, number)
- name: Waiting for 200 from the Vercel Preview
if: (env.TEST_CONTINUE)
uses: patrickedqvist/wait-for-vercel-preview@master
id: waitFor200
with:
token: ${{ secrets.GITHUB_TOKEN }}
max_timeout: 300
- name: Generate feedback
if: (env.TEST_CONTINUE)
uses: actions/github-script@v3
env:
TEST_BASEURL: ${{steps.waitFor200.outputs.url}}
TEST_ROUTES: ${{ steps.fetchRoute.outputs.result }}
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const link = process.env.TEST_BASEURL
const routes = JSON.parse(process.env.TEST_ROUTES)
const number = context.payload.pull_request.number
console.log(link, routes, number)
const script = require(`${process.env.GITHUB_WORKSPACE}/scripts/workflow/test-route/test.js`)
return await script({github, context}, link, routes, number)
14 changes: 14 additions & 0 deletions assets/radar-rules.js
Original file line number Diff line number Diff line change
Expand Up @@ -2500,4 +2500,18 @@
},
],
},
'scboy.com': {
_name: 'scboy 论坛',
www: [
{
title: '帖子',
docs: 'https://docs.rsshub.app/bbs.html#scboy',
source: '',
target: (params, url) => {
const id = url.includes('thread') ? url.split('-')[1].split('.')[0] : '';
return id ? `/scboy/thread/${id}` : '';
},
},
],
},
});
29 changes: 29 additions & 0 deletions docs/bbs.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,17 @@ pageClass: routes

</Route>

## SCBOY 论坛

### 帖子

<Route author="totorowechat" example="/scboy/thread/188673" path="/scboy/thread/:tid" :paramsDesc="['帖子 tid']" radar="1">

帖子网址如果为 <https://www.scboy.com/?thread-188673.htm> 那么帖子 tid 就是 `1789863`

访问水区需要添加环境变量 `SCBOY_BBS_TOKEN`, 详情见部署页面的配置模块。 `SCBOY_BBS_TOKEN`在 cookies 的`bbs_token`中。
</Route>

## V2EX

### 最热 / 最新主题
Expand Down Expand Up @@ -395,6 +406,24 @@ pageClass: routes

</Route>

## 品葱

### 发现

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

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

### 精选

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

### 话题

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

## 三星盖乐世社区

### 最新帖子
Expand Down
11 changes: 11 additions & 0 deletions docs/en/bbs.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,14 @@ pageClass: routes
### Discussion

<RouteEn author="nczitzk" example="/lowendtalk/discussion/168480" path="/lowendtalk/discussion/:id?" :paramsDesc="['Discussion id']"/>

## SCBOY forum

### Thread

<RouteEn author="totorowechat" example="/scboy/thread/188673" path="/scboy/thread/:tid" :paramsDesc="['thread tid']" radar="1">

If the url of the thread is <https://www.scboy.com/?thread-188673.htm> then tid would be `1789863`.

When accessing Joeyray's Bar, `SCBOY_BBS_TOKEN` needs to be filled in `environment`. See <https://docs.rsshub.app/en/install/#Deployment> for details. `SCBOY_BBS_TOKEN` is included in cookies with `bbs_token`.
</RouteEn>
29 changes: 29 additions & 0 deletions docs/en/install/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,35 @@ $ docker run -d --name rsshub -p 1200:1200 -e CACHE_EXPIRE=3600 -e GITHUB_ACCESS

To configure more options please refer to [Configuration](#configuration).

# Ansible Deployment

This Ansible playbook includes RSSHub, Redis, browserless (uses Docker) and Caddy 2

Currently only support Ubuntu 20.04

Requires sudo privilege and virtualization capability (Docker will be automatically installed)

### Install

```bash
sudo apt update
sudo apt install ansible
git clone https://github.com/DIYgod/RSSHub.git ~/RSSHub
cd ~/RSSHub/scripts/ansible
sudo ansible-playbook rsshub.yaml
# When prompt to enter a domain name, enter the domain name that this machine/VM will use
# For example, if your users use https://rsshub.exmaple.com to access your RSSHub instance, enter rsshub.exmaple.com (remove the https://)
```

### Update

```bash
cd ~/RSSHub/scripts/ansible
sudo ansible-playbook rsshub.yaml
# When prompt to enter a domain name, enter the domain name that this machine/VM will use
# For example, if your users use https://rsshub.exmaple.com to access your RSSHub instance, enter rsshub.exmaple.com (remove the https://)
```

## Manual Deployment

The most direct way to deploy `RSSHub`, you can follow the steps below to deploy`RSSHub` on your computer, server or anywhere.
Expand Down
21 changes: 21 additions & 0 deletions docs/en/new-media.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ Compared to the official one, the RSS feed generated by RSSHub not only has more

## CGTN

### Opinions

<RouteEn author="nczitzk" example="/cgtn/opinions" path="/cgtn/opinions"/>

### Most Read & Most Share

<RouteEn author="nczitzk" example="/cgtn/most/read/day" path="/cgtn/most/:type?/:time?" :paramsDesc="['Type, `read` as most read, `share` as most share, `read` by default', 'Time range, `all` as all the time, `day` as today, `week` as this week, `month` as this month, `year` as this year, `all` by default']"/>
Expand All @@ -75,6 +79,10 @@ Compared to the official one, the RSS feed generated by RSSHub not only has more

<RouteEn author="nczitzk" example="/cgtn/top" path="/cgtn/top"/>

### Editors' Pick

<RouteEn author="nczitzk" example="/cgtn/pick" path="/cgtn/pick"/>

## China Labour Bulletin

### Commentary and Analysis
Expand Down Expand Up @@ -260,6 +268,7 @@ This route provides a flexible plan with full text content to subscribe specific
### Blog

<RouteEn author="nczitzk" example="/polar/blog" path="/polar/blog"/>

## Quanta Magazine

### Archive
Expand All @@ -273,6 +282,12 @@ Compared to the official one, this feed:

</RouteEn>

## Semiconductor Industry Association

### Latest News

<RouteEn author="nczitzk" example="/semiconductors/latest-news" path="/semiconductors/latest-news"/>

## Simons Foundation

### Articles
Expand Down Expand Up @@ -335,6 +350,12 @@ Provides a better reading experience (full text articles) over the official one.

</RouteEn>

## VOA News

### Day in Photos

<RouteEn author="nczitzk" example="/voa/day-photos" path="/voa/day-photos"/>

## Vulture

<RouteEn author="loganrockmore" example="/vulture/movies" path="/vulture/:tag/:excludetags?" :paramsDesc="['Tag', 'Comma-delimited list of tags. If an article includes one of these tags, it will be excluded from the RSS feed.']" />
Expand Down
8 changes: 8 additions & 0 deletions docs/en/picture.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ pageClass: routes

<RouteEn author="FHYunCai" example="/bing" path="/bing" radar="1" rssbud="1"/>

## ComicsKingdom Comic Strips

<RouteEn author="stjohnjohnson" example="/comicskingdom/baby-blues" path="/comicskingdom/:strip" :paramsDesc="['URL path of the strip on comicskingdom.com']" />

## DailyArt

<RouteEn author="zphw" example="/dailyart/en" path="/dailyart/:language?" :paramsDesc="['Support en, es, fr, de, it, zh, jp, etc. English by default.']" />
Expand All @@ -50,6 +54,10 @@ pageClass: routes

<RouteEn name="Daily Strip" author="Maecenas" example="/dilbert/strip" path="/dilbert/strip"/>

## GoComics Comic Strips

<RouteEn author="stjohnjohnson" example="/gocomics/foxtrot" path="/gocomics/:strip" :paramsDesc="['URL path of the strip on gocomics.com']" />

## Google Doodles

### Update
Expand Down
12 changes: 12 additions & 0 deletions docs/en/program-update.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ pageClass: routes

<Route author="nczitzk" example="/anki/changes" path="/anki/changes"/>

## AnyTXT

### Release Notes

<Route author="nczitzk" example="/anytxt/release-notes" path="/anytxt/release-notes"/>

## Apkpure

### Versions
Expand Down Expand Up @@ -164,6 +170,12 @@ The owner of the official image fills in the library, for example: https://rsshu

<RouteEn author="hoilc" example="/edge/addon/gangkeiaobmjcjokiofpkfpcobpbmnln" path="/edge/addon/:crxid" :paramsDesc="['Addon id, can be found in addon url']"/>

## Microsoft Store

### Updates

<Route author="hellodword" example="/microsoft-store/updates/9WZDNCRFHVN5/CN" path="/microsoft-store/updates/:productid/:market?" :paramsDesc="['`Share` - `Copy Link` in the Store', '`CN` as default']" />

## Minecraft

Refer to [#minecraft](/en/game.html#minecraft)
Expand Down
6 changes: 6 additions & 0 deletions docs/en/shopping.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ Parameter `time` only works when `mostwanted` is chosen as the category.

</RouteEn>

## booth.pm

### Shop

<Route author="KTachibanaM" example="/booth.pm/shop/annn-boc0123" path="/booth.pm/shop/:subdomain" :paramsDesc="['Shop subdomain']" />

## Guiltfree.pl

### Onsale
Expand Down
16 changes: 16 additions & 0 deletions docs/en/traditional-media.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ Site

## AP News

### Top Stories

<RouteEn author="zphw" example="/apnews" path="/apnews" />

### 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"/>
Expand Down Expand Up @@ -149,6 +153,18 @@ Generates full-text feeds that the official feed doesn't provide.

<RouteEn author="oppliate" example="/phoronix/news_topic/Intel" path="/phoronix/:page/:queryOrItem?" :paramsDesc="['Page name', 'For `category` it corresponds to `item`, for other pages it\'s `q`. You may find available parameters from their navigator links. E.g. to subscribe to the category page `https://www.phoronix.com/scan.php?page=category&item=Computers`, fill in the path `/phoronix/category/Computers`']" />

## Radio Free Asia (RFA)

<RouteEn author="zphw" example="/rfa/english" path="/rfa/:language?/:channel?/:subChannel?" :paramsDesc="['language, English by default', 'channel', 'subchannel, where applicable']" />

Delivers a better experience by supporting parameter specification.

Parameters can be obtained from the official website, for instance:

`https://www.rfa.org/cantonese/news` corresponds to `/rfa/cantonese/news`

`https://www.rfa.org/cantonese/news/htm` corresponds to `/rfa/cantonese/news/htm`

## Reuters

### Channel
Expand Down
15 changes: 15 additions & 0 deletions docs/finance.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,21 @@ pageClass: routes
| autos | banking-insurance | business-technology | consumers | healthcare-pharmaceuticals | mckinsey-global-institute | 全球基础材料 | innovation | macroeconomy | manufacturing | talent-leadership | technology-media-and-telecom | urbanization-sustainability | capital-projects-infrastructure | 交通运输与物流 |

</Route>

## 上海证券交易所

### 本所业务规则

<Route author="nczitzk" example="/sse/sserules" path="/sse/sserules/:slug?" :paramsDesc="['见下文,默认为 latest']">

将目标栏目的网址拆解为 `http://www.sse.com.cn/lawandrules/sserules/` 和后面的字段,把后面的字段中的 `/` 替换为 `-`,即为该路由的 slug

如:(最新规则)[http://www.sse.com.cn/lawandrules/sserules/latest] 的网址在 `http://www.sse.com.cn/lawandrules/sserules/` 后的字段是 `latest`,则对应的 slug 为 `latest`,对应的路由即为 `/sse/sserules/latest`

又如:(设立科创板并试点注册制规则 - 发行上市审核类)[http://www.sse.com.cn/lawandrules/sserules/tib/review] 的网址在 `http://www.sse.com.cn/lawandrules/sserules/` 后的字段是 `tib/review`,则对应的 slug 为 `tib-review`,对应的路由即为 `/sse/sserules/tib-review`

</Route>

## 世界经济论坛

### 报告
Expand Down
Loading

0 comments on commit 47676f3

Please sign in to comment.