Skip to content

Commit e77415d

Browse files
youngH1001zytomorrowfengkxf48vjactions-user
authored
Sync 2021-8-24 (#7)
* feat(route): add 雪球股票评论 (DIYgod#7822) * chore(core): Docker build 缩小 image size 更新github action (DIYgod#7197) * feat(route): add MacWk (DIYgod#7833) * style: auto format * feat(radar): add radar rules for netease cloud music (mobile) (DIYgod#7892) * feat(route): add 生物探索 (DIYgod#7897) * fix(route): thu-career (DIYgod#7894) Co-authored-by: SettingDust <settingdust@gmail.com> * style: auto format * feat(route): 恩山无线论坛板块 (DIYgod#7365) Co-authored-by: NeverBehave <gayhub@never.pet> * feat(route): add x410 news (DIYgod#7339) Co-authored-by: NeverBehave <gayhub@never.pet> * fix(route): 风之动漫域名更换 (DIYgod#7828) * fix(route): 紫竹张先生 (DIYgod#7890) * fix(docs): HKEPC doc (DIYgod#7776) * feat(route): add Fermilab News (DIYgod#7371) Co-authored-by: NeverBehave <gayhub@never.pet> * style: auto format * fix(route): agefans domain (DIYgod#7640) * feat(route): add 湖北软协,武汉东湖高新,武汉科技局 (DIYgod#7728) Co-authored-by: long.ye <yelong@orientalmind.com> Co-authored-by: NeverBehave <gayhub@never.pet> * style: auto format * feat(route): add 时事一点通资讯 (DIYgod#7462) Co-authored-by: NeverBehave <gayhub@never.pet> * fix(route): 動畫瘋最後更新 (DIYgod#7917) * style: auto format * fix(pkg): fix use rsshub as package (DIYgod#7921) * fix(route): 腾讯较真查证平台 (DIYgod#7934) * fix(route): 修复 Bilibili 频道链接,并支持 ctype=1 (DIYgod#7913) * feat(route): 中国纺织经济信息网资讯 (DIYgod#7213) Co-authored-by: NeverBehave <gayhub@never.pet> * fix(route): 1X Gallery (DIYgod#7923) * feat(route): add World Happiness Report (DIYgod#7223) Co-authored-by: NeverBehave <gayhub@never.pet> * feat(route): add Europa Press (DIYgod#7943) Co-authored-by: NeverBehave <gayhub@never.pet> * fix(route): 修复 soul 请求链接 (DIYgod#7955) * fix(core): make sure timeout error messages include URLs (DIYgod#7981) Before this fix, timeout messages are not quite useful > error: Request undefined fail, retry attempt #1: TimeoutError: Timeout awaiting 'request' for 5000ms * feat(route): add 西北农林科技大学 (DIYgod#7966) * feat(route): add Sky Sports News (DIYgod#7968) Co-authored-by: Sukka <isukkaw@gmail.com> Co-authored-by: NeverBehave <gayhub@never.pet> * feat(route): add Common App blog (DIYgod#7287) Co-authored-by: NeverBehave <gayhub@never.pet> * feat(route): japanpost improve timezone parse (DIYgod#7682) * feat(route): add 财新数据通专享资讯 (DIYgod#7250) * feat(route): add 游迅网资讯 (DIYgod#7235) * feat(route): add The Partnership on AI Resources (DIYgod#7265) Co-authored-by: NeverBehave <gayhub@never.pet> * fix(route): 重庆大学本科教学信息网 (原重庆大学教务网) (DIYgod#7944) * feat(route): add 掘金专栏 (DIYgod#7889) * feat(route): add 掘金专栏 * fix: 时间处理 * feat(route): add 温州大学新闻 (DIYgod#7952) Co-authored-by: NeverBehave <gayhub@never.pet> * feat(route): add yuzu emulator blog (DIYgod#7947) Co-authored-by: NeverBehave <gayhub@never.pet> * style: auto format * chore(misc): fix various ci issue *some of them shown cancelled instead of failed. Need to address this issue later * chore(misc): bump to node 14, simplify template * docs(install): README.md (DIYgod#7994) heroku补充描述 heroku additional description vercel 补充描述 vercel additional description * style: auto format * chore(dockerfile): bump builder image * docs(install): README.md (DIYgod#7994) heroku补充描述 heroku additional description vercel 补充描述 vercel additional description * style: auto format * fix(dockerfile): copy necessary file when building (DIYgod#8008) * fix(dockerfile): copy necessary file when building *when even bother deleting file... * no console * style: auto format * chore(test): test running docker after build (DIYgod#8010) * chore(test): test running docker after build * add test in the same step * add count times * workflow typo * add name when output * if then * test docker * use id * no tag * what is docker id * load single platform * do not test multi-arch for now * no load * fix(route): 修复 bilibili 动态无法获取问题 (DIYgod#7961) * feat(route): load route handler on the first request (DIYgod#8021) * refactor: avoid promise overhead (DIYgod#8028) * style/chore(eslint): enforce new rules (DIYgod#8040) * style: prefer object shorthand syntax * refactor: prefer Array#map over Array#forEach * style: prefer arrow callback * chore(eslint): update rules * style: auto fix by eslint * fix(route): 站酷发现有视频条目 (DIYgod#8044) * fix(zimuxia-portfollo): `$.reverse` is removed (DIYgod#8047) * feat(route): add hket (DIYgod#8050) * perf: lazy require dependencies (DIYgod#8025) * style: auto format * fix(route): hket Missing `url` property (DIYgod#8052) * feat(route): add Font Story (DynaC TW) (DIYgod#7565) * style: auto format * docs(install): add heroku usage limit notice (DIYgod#8060) add English notice about heroku * docs(install): remove vercel timeout notice (DIYgod#8060) (DIYgod#8059) Co-authored-by: zytomorrow <z794672847@gmail.com> Co-authored-by: fengkx <liangkx8237@gmail.com> Co-authored-by: VJ <i.am.f48vj+github@gmail.com> Co-authored-by: GitHub Action <action@github.com> Co-authored-by: cayZ <13341339+Cay-Zhang@users.noreply.github.com> Co-authored-by: Aidi Stan <aidistan@live.com> Co-authored-by: DylanXie123 <dylanxie123@outlook.com> Co-authored-by: SettingDust <settingdust@gmail.com> Co-authored-by: Ethan Shen <nczitzk@gmail.com> Co-authored-by: NeverBehave <gayhub@never.pet> Co-authored-by: Tony <TonyRL@users.noreply.github.com> Co-authored-by: Colerar <62297254+Colerar@users.noreply.github.com> Co-authored-by: tudou027 <future2100@163.com> Co-authored-by: long.ye <yelong@orientalmind.com> Co-authored-by: auto-bot-ty <75887908+auto-bot-ty@users.noreply.github.com> Co-authored-by: 神楽坂みずき <45122329+cokemine@users.noreply.github.com> Co-authored-by: Raidou <weirongxu.raidou@gmail.com> Co-authored-by: BugWriter2 <frank16874@outlook.com> Co-authored-by: Chih-Hsuan Yen <yan12125@gmail.com> Co-authored-by: Ding Yuxiao <yuxiaoding@acm.org> Co-authored-by: Sukka <isukkaw@gmail.com> Co-authored-by: tuzi3040 <28290621+tuzi3040@users.noreply.github.com> Co-authored-by: Hagb (Guo Junyu 郭俊余) <hagb_green@qq.com> Co-authored-by: 向 <xiangzy8@gmail.com> Co-authored-by: yesRabbit <trlu.develop@outlook.com> Co-authored-by: D <48525679+ding667@users.noreply.github.com> Co-authored-by: zsh2517 <30528671+zsh2517@users.noreply.github.com> Co-authored-by: Trim21 <trim21.me@gmail.com> Co-authored-by: Toby Tso <7851076+tpnonthealps@users.noreply.github.com>
1 parent b76d2f2 commit e77415d

1,133 files changed

Lines changed: 37392 additions & 9378 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintrc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@
5454
"no-await-in-loop": 2,
5555
"require-atomic-updates": 0,
5656
"no-prototype-builtins": 0,
57-
"no-new-func": 2
57+
"no-new-func": 2,
58+
"require-await": 2,
59+
"no-return-await": 2,
60+
"prefer-arrow-callback": 2,
61+
"object-shorthand": 2
5862
}
5963
}

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 15 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
<!--
2-
请不要删除已有内容(注释除外), 这会导致自动检测失败;不符合要求保留默认内容即可
3-
Do not remove existing titles or structures: it breaks CI
4-
如果有疑问,可以参考已经合并的PR格式
5-
Reference to merged PR if you have question over PR format
2+
如有疑问,请参考 https://github.com/DIYgod/RSSHub/discussions/8002
3+
Reference: https://github.com/DIYgod/RSSHub/discussions/8002
64
-->
75

86
## 该 PR 相关 Issue / Involved issue
@@ -11,61 +9,23 @@ Close #
119

1210
## 完整路由地址 / Example for the proposed route(s)
1311

14-
<!--
15-
为方便测试,请附上完整路由地址(可以真正访问的地址),否则将导致 PR 被关闭
16-
请按照如下格式填写`routes`区域: 我们将会根据你的参数展开自动测试. 一行一个路由
17-
如果路由包含在文档中列出可以完全穷举的参数(例如分类),请依次全部列出
18-
To simplify the testing workflow, please include COMPLETE route URL, with all required and optional parameters, otherwise your pull request will be closed.
19-
Please fill the `routes` block follow the format below, as we will perform automatic test based on this information. one route per line.
20-
21-
```
22-
/some/route
23-
/some/other/route
24-
```
25-
26-
如果与路由无关, 请写`NOROUTE`
27-
请不要删除代码块`routes`标识
28-
If it is not related to route, use `NOROUTE` to bypass CI
29-
FILL BELOW and keep `routes` keyword
30-
-->
31-
3212
```routes
3313
```
3414

35-
3615
## 新RSS检查列表 / New RSS Script Checklist
37-
38-
<!--
39-
Please go over the checklist below before PR: this improve your PR pass rate.
40-
Reference: https://docs.rsshub.app/en/joinus/quick-start.html
41-
请在提交PR前检查以下事项: 这可以大大提升通过率
42-
这些就是我们在审核时主要关注的事项, 敬请留意
43-
参考: https://docs.rsshub.app/joinus/quick-start.html
44-
-->
45-
46-
- [ ] 这个PR中包含了新的路由吗? Does this PR add new route?
47-
- 如果有, 请完成检查列表. If yes, please finish the check list
48-
- **如果你的PR符合下方某个事项, 也请注明. If any of the checklist item meets your PR, please fill it out.**
49-
- [x] <- 这样打勾
50-
- [ ] 是否提供了文档? Documentation provided?
51-
- [ ] 是否提供了英文文档? EN Documentation provided?
52-
- [ ] 是否支持全文获取? Is this RSS Script support fulltext?
53-
- [ ] 如果全文获取中需要访问文章链接, 是否使用了缓存? If fulltext requires to fetch detail pages, is cache used in the process?
54-
- [缓存说明](https://docs.rsshub.app/joinus/quick-start.html#ti-jiao-xin-de-rsshub-gui-ze-bian-xie-jiao-ben-shi-yong-huan-cun) | [How to use cache](https://docs.rsshub.app/joinus/quick-start.html#ti-jiao-xin-de-rsshub-gui-ze-bian-xie-jiao-ben-shi-yong-huan-cun)
55-
- [ ] 目标是否有明显的反爬/频率限制? Is there any sign of anti-bot or rate limit?
56-
- [ ] 如果有, 是否有对应的措施? (延长缓存时间, 写文档说明, etc.) If yes, do your code reflect this sign? (e.g. write documentations, use long cache time)
57-
- [ ] 目标是否有提供日期? Is there a date in the source?
58-
- [ ] 如果有,包是否正确解析? If there is, can this script provide this info?
59-
- [ ] 如果有提供解析能力,时区是否正确调整? Is the timezone correctly provided?
60-
- 如果有提供日期,但是没有提供解析,请说明原因 If there is a date but this script does not parse, please provide your reason.
61-
- [ ] 是否引入的新的包? Any new package introduced?
62-
- 如果有, 请说明原因. If yes, please state your reason
63-
- [ ] 是否使用了`Puppeteer`? Make use of `Puppeteer`?
64-
- 如果有, 请说明原因. If yes, please state your reason
6516

17+
- [ ] New Route
18+
- [ ] Documentation
19+
- [ ] CN
20+
- [ ] EN
21+
- [ ] 全文获取 fulltext
22+
- [ ] Use Cache
23+
- [ ] 反爬/频率限制 anti-bot or rate limit?
24+
- [ ] 如果有, 是否有对应的措施? If yes, do your code reflect this sign?
25+
- [ ] 日期和时间 date and time
26+
- [ ] 可以解析 Parsed
27+
- [ ] 时区调整 Correct TimeZone
28+
- [ ] 添加了新的包 New package added
29+
- [ ] `Puppeteer`
6630

6731
## 说明 / Note
68-
<!--
69-
Please state your reason/note here
70-
请在这里描述你的原因或留下其他相关的说明
71-
-->

.github/workflows/docker-release.yml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
branches: master
66
paths:
77
- 'lib/**'
8+
- '.github/workflows/**'
89
- 'Dockerfile'
910
- 'package.json'
1011

@@ -13,21 +14,20 @@ jobs:
1314
runs-on: ubuntu-latest
1415
steps:
1516
-
16-
name: Checkout
17-
uses: actions/checkout@v2
18-
-
19-
name: Dockerhub login
20-
env:
21-
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
22-
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
23-
run: |
24-
echo "${DOCKER_PASSWORD}" | docker login --username ${DOCKER_USERNAME} --password-stdin
25-
-
26-
name: Set up Docker Buildx
27-
id: buildx
28-
uses: crazy-max/ghaction-docker-buildx@v1
29-
with:
30-
buildx-version: latest
17+
name: Checkout
18+
uses: actions/checkout@v2
19+
- name: Login to DockerHub
20+
uses: docker/login-action@v1
21+
with:
22+
username: ${{ secrets.DOCKER_USERNAME }}
23+
password: ${{ secrets.DOCKER_PASSWORD }}
24+
25+
- name: Checkout
26+
uses: actions/checkout@v2
27+
- name: Set up QEMU
28+
uses: docker/setup-qemu-action@v1
29+
- name: Set up Docker Buildx
30+
uses: docker/setup-buildx-action@v1
3131
-
3232
name: Build dockerfile (with push)
3333
env:

.github/workflows/docker-test.yml

Lines changed: 14 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -7,31 +7,21 @@ on:
77
- 'lib/**'
88
- 'Dockerfile'
99
- 'package.json'
10-
push:
11-
branches: '*'
12-
paths:
13-
- 'lib/**'
14-
- 'Dockerfile'
15-
- 'package.json'
16-
10+
# Please, always create a pull request instead of push to master.
1711
jobs:
1812
test:
19-
if: github.repository == 'DIYgod/RSSHub'
2013
runs-on: ubuntu-latest
2114
steps:
22-
-
23-
name: Checkout
24-
uses: actions/checkout@v2
25-
-
26-
name: Set up Docker Buildx
27-
id: buildx
28-
uses: crazy-max/ghaction-docker-buildx@v1
29-
with:
30-
buildx-version: latest
31-
-
32-
name: Build dockerfile (without push)
33-
run: |
34-
docker buildx build \
35-
--platform=linux/amd64,linux/arm/v7,linux/arm64 \
36-
--output "type=image,push=false" \
37-
--file ./Dockerfile .
15+
- name: Checkout
16+
uses: actions/checkout@v2
17+
- name: Set up QEMU
18+
uses: docker/setup-qemu-action@v1
19+
- name: Set up Docker Buildx
20+
uses: docker/setup-buildx-action@v1
21+
- name: Build dockerfile and Run (without push)
22+
run: |
23+
docker build \
24+
--tag rsshub:latest \
25+
--file ./Dockerfile .
26+
chmod +x scripts/docker/test-docker.sh
27+
scripts/docker/test-docker.sh

.github/workflows/format.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@ jobs:
1111

1212
steps:
1313
- uses: actions/checkout@v2
14-
- uses: actions/setup-node@v1
14+
- uses: actions/setup-node@v2
1515
with:
1616
node-version: '14'
17+
cache: 'npm'
1718
- run: yarn install
1819
- run: npm run format
1920
- name: Commit files

.github/workflows/npm-publish.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- uses: actions/checkout@v2
15-
- uses: actions/setup-node@v1
15+
- uses: actions/setup-node@v2
1616
with:
1717
node-version: '14'
18+
cache: 'npm'
1819
registry-url: 'https://registry.npmjs.org'
1920
- name: Release
2021
run: |

.github/workflows/pr-lint.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@ jobs:
77
runs-on: ubuntu-latest
88
steps:
99
- uses: actions/checkout@v2
10-
- uses: actions/setup-node@v1
10+
- uses: actions/setup-node@v2
1111
with:
1212
node-version: '14'
13-
- run: yarn install
13+
cache: 'npm'
14+
- run: npm ci
1415
- name: Lint
1516
run: |
1617
npm run lint

.github/workflows/test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ jobs:
1515

1616
strategy:
1717
matrix:
18-
node-version: [12.x, 14.x]
18+
node-version: [14.x]
1919

2020
steps:
2121
- uses: actions/checkout@v2
22-
- uses: actions/setup-node@v1
22+
- uses: actions/setup-node@v2
2323
with:
2424
node-version: ${{ matrix.node-version }}
25-
- run: yarn install
25+
- run: npm ci
2626
- run: npm run jest
2727
env:
2828
REDIS_URL: redis://localhost:${{ job.services.redis.ports[6379] }}/

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,7 @@ tmp
1515
coverage
1616
.env
1717
yarn.lock
18+
app-minimal/
1819

19-
.now
20+
.now
21+
.vercel

Dockerfile

Lines changed: 34 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,60 @@
1-
FROM node:14-slim
1+
FROM node:14-buster-slim as dep-builder
22

33
LABEL MAINTAINER https://github.com/DIYgod/RSSHub/
44

5-
6-
ENV NODE_ENV production
7-
ENV TZ Asia/Shanghai
8-
95
ARG USE_CHINA_NPM_REGISTRY=0;
106
ARG PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=1;
117

128
RUN ln -sf /bin/bash /bin/sh
139

14-
RUN apt-get update && apt-get install -yq libgconf-2-4 apt-transport-https git dumb-init python make g++ build-essential --no-install-recommends \
15-
&& rm -rf /var/lib/apt/lists/*
10+
RUN apt-get update && apt-get install -yq libgconf-2-4 apt-transport-https git dumb-init python3 build-essential --no-install-recommends
1611

1712
WORKDIR /app
18-
19-
COPY package.json tools/clean-nm.sh /app/
13+
COPY . /app
2014

2115
RUN if [ "$USE_CHINA_NPM_REGISTRY" = 1 ]; then \
2216
echo 'use npm mirror'; npm config set registry https://registry.npm.taobao.org; \
2317
fi;
2418

19+
RUN npm i -g npm
20+
2521
RUN if [ "$PUPPETEER_SKIP_CHROMIUM_DOWNLOAD" = 0 ]; then \
26-
apt-get install -y wget --no-install-recommends \
22+
unset PUPPETEER_SKIP_CHROMIUM_DOWNLOAD && npm ci ;\
23+
else \
24+
export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true && npm ci ;\
25+
fi;
26+
27+
RUN node scripts/docker/minify-docker.js
28+
29+
FROM node:14-slim as app
30+
31+
ENV NODE_ENV production
32+
ENV TZ Asia/Shanghai
33+
ARG PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=1;
34+
35+
WORKDIR /app
36+
COPY . /app
37+
COPY --from=dep-builder /app/app-minimal/node_modules /app/node_modules
38+
COPY --from=dep-builder /usr/bin/dumb-init /usr/bin/dumb-init
39+
40+
RUN if [ "$PUPPETEER_SKIP_CHROMIUM_DOWNLOAD" = 0 ]; then \
41+
apt-get update \
42+
&& apt-get install -y wget gnupg ca-certificates --no-install-recommends \
2743
&& wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
2844
&& sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' \
45+
&& set -ex \
2946
&& apt-get update \
30-
&& apt-get install -y google-chrome-unstable fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst ttf-freefont \
47+
&& apt-get install -y google-chrome-unstable fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst fonts-freefont-ttf \
48+
ca-certificates \
49+
fonts-liberation libappindicator3-1 libasound2 libatk-bridge2.0-0 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 \
50+
libfontconfig1 libgbm1 libgcc1 libglib2.0-0 libgtk-3-0 libnspr4 libnss3 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 \
51+
libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 \
52+
libxrender1 libxss1 libxtst6 lsb-release \
3153
--no-install-recommends \
3254
&& rm -rf /var/lib/apt/lists/* \
33-
&& apt-get purge --auto-remove -y wget\
34-
&& rm -rf /src/*.deb \
35-
&& npm install --production && sh ./clean-nm.sh;\
36-
else \
37-
export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true && \
38-
npm install --production && sh ./clean-nm.sh;\
55+
&& apt-get purge --auto-remove -y wget gnupg; \
3956
fi;
4057

41-
COPY . /app
42-
4358
EXPOSE 1200
4459
ENTRYPOINT ["dumb-init", "--"]
4560

0 commit comments

Comments
 (0)