From 1feddfa37c48bcdf80ce710cfa82f8b790a1967d Mon Sep 17 00:00:00 2001 From: ikvarxt Date: Sun, 19 Apr 2020 15:21:44 +0800 Subject: [PATCH 001/645] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=E8=BE=BD?= =?UTF-8?q?=E5=AE=81=E5=B7=A5=E7=A8=8B=E6=8A=80=E6=9C=AF=E5=A4=A7=E5=AD=A6?= =?UTF-8?q?=E6=95=99=E5=8A=A1=E5=85=AC=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/university.md | 10 ++++++++++ lib/router.js | 3 +++ lib/routes/universities/lntu/jwnews.js | 26 ++++++++++++++++++++++++++ 3 files changed, 39 insertions(+) create mode 100644 lib/routes/universities/lntu/jwnews.js diff --git a/docs/university.md b/docs/university.md index 0dba433c1c..e058f05418 100644 --- a/docs/university.md +++ b/docs/university.md @@ -664,6 +664,10 @@ jsjxy.hbut.edu.cn 证书链不全,自建 RSSHub 可设置环境变量 NODE_TLS +## 教务公告 + + + ## 井冈山大学 ### 教务处通知 @@ -696,6 +700,12 @@ jsjxy.hbut.edu.cn 证书链不全,自建 RSSHub 可设置环境变量 NODE_TLS +## 辽宁工程技术大学 + +### 教务公告 + + + ## 洛阳理工学院 ### 教务处 diff --git a/lib/router.js b/lib/router.js index a86a28a357..02069acbc1 100644 --- a/lib/router.js +++ b/lib/router.js @@ -2539,4 +2539,7 @@ router.get('/girlimg/album/:tag?/:mode?', require('./routes/girlimg/album')); // etoland router.get('/etoland/:bo_table', require('./routes/etoland/board')); +// 辽宁工程技术大学教务在线公告 +router.get('/lntu/jwnews', require('./routes/universities/lntu/jwnews')); + module.exports = router; diff --git a/lib/routes/universities/lntu/jwnews.js b/lib/routes/universities/lntu/jwnews.js new file mode 100644 index 0000000000..fd7af28b20 --- /dev/null +++ b/lib/routes/universities/lntu/jwnews.js @@ -0,0 +1,26 @@ +const got = require('@/utils/got'); +const cheerio = require('cheerio'); + +module.exports = async (ctx) => { + const link = 'http://jwzx.lntu.edu.cn/index/jwgg.htm'; + const response = await got.get(link); + const $ = cheerio.load(response.data); + const list = $('.tr-ri li').slice(0, 10); + + ctx.state.data = { + title: '辽宁工程技术大学教务公告', + link: link, + description: '辽宁工程技术大学教务公告', + item: + list && + list + .map((index, item) => { + item = $(item); + return { + title: item.find('li a').text(), + link: item.find('li a').attr('href'), + }; + }) + .get(), + }; +}; From cad326add8bdc32383228cdf68560dc2dfdfe9b2 Mon Sep 17 00:00:00 2001 From: ikvarxt Date: Sun, 19 Apr 2020 15:34:06 +0800 Subject: [PATCH 002/645] update docs --- docs/university.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/docs/university.md b/docs/university.md index e058f05418..025b9fe503 100644 --- a/docs/university.md +++ b/docs/university.md @@ -664,10 +664,6 @@ jsjxy.hbut.edu.cn 证书链不全,自建 RSSHub 可设置环境变量 NODE_TLS -## 教务公告 - - - ## 井冈山大学 ### 教务处通知 From 45b3d978b112f50e451d5d495e2249cc1d8d1dc8 Mon Sep 17 00:00:00 2001 From: nczitzk Date: Tue, 27 Oct 2020 22:45:27 +0800 Subject: [PATCH 003/645] =?UTF-8?q?fix:=20=E8=B1=86=E7=93=A3=E6=97=A5?= =?UTF-8?q?=E8=AE=B0=E6=9C=80=E6=96=B0=E5=9B=9E=E5=BA=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/routes/douban/replies.js | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/lib/routes/douban/replies.js b/lib/routes/douban/replies.js index 6f1ba0b9ef..8e95551101 100644 --- a/lib/routes/douban/replies.js +++ b/lib/routes/douban/replies.js @@ -34,25 +34,22 @@ module.exports = async (ctx) => { method: 'get', url: item.link, }); - const content = cheerio.load(detailResponse.data); - const commentsConfig = content('script').eq(16).html().replace('var _COMMENTS_CONFIG =', ''); - const comments = JSON.parse(commentsConfig.match(/'comments':(.*?)}],/)[1] + '}]'); - let title, description, pubDate; + const comments = JSON.parse(detailResponse.data.match(/'comments':(.*)}],/)[1] + '}]'); for (const c of comments) { if (c.id === item.link.split('#')[1]) { - (title = `${c.author.name} 于 ${c.create_time} 的回应`), (description = c.text); - pubDate = new Date(c.create_time + ' GMT+8').toUTCString(); - break; + return { + link: item.link, + title: `${c.author.name} 于 ${c.create_time} 的回应`, + pubDate: new Date(c.create_time + ' GMT+8').toUTCString(), + description: c.text, + author: c.author.name, + }; + } else if (c.replies.length > 0) { + comments.push(...c.replies); } } - - item.title = title; - item.description = description; - item.pubDate = pubDate; - - return item; }) ) ); From 420b3024e435d32503fe1a8f9feea26a2d987033 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 27 Oct 2020 19:30:45 +0000 Subject: [PATCH 004/645] chore(deps-dev): bump eslint from 7.12.0 to 7.12.1 Bumps [eslint](https://github.com/eslint/eslint) from 7.12.0 to 7.12.1. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v7.12.0...v7.12.1) Signed-off-by: dependabot-preview[bot] --- package.json | 2 +- yarn.lock | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 3f8d31dc68..5ed640be70 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "@vuepress/plugin-pwa": "1.7.1", "cross-env": "7.0.2", "entities": "2.1.0", - "eslint": "7.12.0", + "eslint": "7.12.1", "eslint-config-prettier": "6.14.0", "eslint-plugin-prettier": "3.1.4", "jest": "26.6.1", diff --git a/yarn.lock b/yarn.lock index 133ee5eb8a..cba407a778 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1053,10 +1053,10 @@ enabled "2.0.x" kuler "^2.0.0" -"@eslint/eslintrc@^0.2.0": - version "0.2.0" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.2.0.tgz#bc7e3c4304d4c8720968ccaee793087dfb5fe6b4" - integrity sha512-+cIGPCBdLCzqxdtwppswP+zTsH9BOIGzAeKfBIbtb4gW/giMlfMwP0HUSFfhzh20f9u8uZ8hOp62+4GPquTbwQ== +"@eslint/eslintrc@^0.2.1": + version "0.2.1" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.2.1.tgz#f72069c330461a06684d119384435e12a5d76e3c" + integrity sha512-XRUeBZ5zBWLYgSANMpThFddrZZkEbGHgUdt5UJjZfnlN9BGCiUBrf+nvbRupSjMvqzwnQN0qwCmOxITt1cfywA== dependencies: ajv "^6.12.4" debug "^4.1.1" @@ -4938,13 +4938,13 @@ eslint-visitor-keys@^2.0.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz#21fdc8fbcd9c795cc0321f0563702095751511a8" integrity sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ== -eslint@7.12.0: - version "7.12.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.12.0.tgz#7b6a85f87a9adc239e979bb721cde5ce0dc27da6" - integrity sha512-n5pEU27DRxCSlOhJ2rO57GDLcNsxO0LPpAbpFdh7xmcDmjmlGUfoyrsB3I7yYdQXO5N3gkSTiDrPSPNFiiirXA== +eslint@7.12.1: + version "7.12.1" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.12.1.tgz#bd9a81fa67a6cfd51656cdb88812ce49ccec5801" + integrity sha512-HlMTEdr/LicJfN08LB3nM1rRYliDXOmfoO4vj39xN6BLpFzF00hbwBoqHk8UcJ2M/3nlARZWy/mslvGEuZFvsg== dependencies: "@babel/code-frame" "^7.0.0" - "@eslint/eslintrc" "^0.2.0" + "@eslint/eslintrc" "^0.2.1" ajv "^6.10.0" chalk "^4.0.0" cross-spawn "^7.0.2" From c646fa909a52357775bcddddf0f32caf2b0e0225 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 27 Oct 2020 19:31:35 +0000 Subject: [PATCH 005/645] chore(deps): bump puppeteer from 5.4.0 to 5.4.1 Bumps [puppeteer](https://github.com/puppeteer/puppeteer) from 5.4.0 to 5.4.1. - [Release notes](https://github.com/puppeteer/puppeteer/releases) - [Commits](https://github.com/puppeteer/puppeteer/compare/v5.4.0...v5.4.1) Signed-off-by: dependabot-preview[bot] --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 3f8d31dc68..1480b897da 100644 --- a/package.json +++ b/package.json @@ -104,7 +104,7 @@ "parse-torrent": "7.1.3", "pidusage": "2.0.21", "plist": "3.0.1", - "puppeteer": "5.4.0", + "puppeteer": "5.4.1", "query-string": "6.13.6", "redis": "3.0.2", "require-all": "3.0.0", diff --git a/yarn.lock b/yarn.lock index 133ee5eb8a..6b3d013b5d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10160,10 +10160,10 @@ pupa@^2.0.1: dependencies: escape-goat "^2.0.0" -puppeteer@5.4.0: - version "5.4.0" - resolved "https://registry.yarnpkg.com/puppeteer/-/puppeteer-5.4.0.tgz#b83893476e96ea103c9516bb958d17a71a9768ea" - integrity sha512-LgTqVW2ClEP4XGAT64FLQ0QWVhdNSRwJp9HfMFVfoJlZHGQu3HUbuBhR1hBow3DXZH1K3b/WfHxt1n8hr2uayw== +puppeteer@5.4.1: + version "5.4.1" + resolved "https://registry.yarnpkg.com/puppeteer/-/puppeteer-5.4.1.tgz#f2038eb23a0f593ed2cce0d6e7cd5c43aecd6756" + integrity sha512-8u6r9tFm3gtMylU4uCry1W/CeAA8uczKMONvGvivkTsGqKA7iB7DWO2CBFYlB9GY6/IEoq9vkI5slJWzUBkwNw== dependencies: debug "^4.1.0" devtools-protocol "0.0.809251" From 62d037aaae22942018d66071876216044d042c92 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 27 Oct 2020 19:44:16 +0000 Subject: [PATCH 006/645] chore(deps-dev): bump eslint-config-prettier from 6.14.0 to 6.15.0 Bumps [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) from 6.14.0 to 6.15.0. - [Release notes](https://github.com/prettier/eslint-config-prettier/releases) - [Changelog](https://github.com/prettier/eslint-config-prettier/blob/master/CHANGELOG.md) - [Commits](https://github.com/prettier/eslint-config-prettier/compare/v6.14.0...v6.15.0) Signed-off-by: dependabot-preview[bot] --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 5ed640be70..072aff7cfd 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "cross-env": "7.0.2", "entities": "2.1.0", "eslint": "7.12.1", - "eslint-config-prettier": "6.14.0", + "eslint-config-prettier": "6.15.0", "eslint-plugin-prettier": "3.1.4", "jest": "26.6.1", "mockdate": "3.0.2", diff --git a/yarn.lock b/yarn.lock index cba407a778..9062aa6d33 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4891,10 +4891,10 @@ escodegen@^1.14.1, escodegen@^1.8.1, escodegen@^1.9.1: optionalDependencies: source-map "~0.6.1" -eslint-config-prettier@6.14.0: - version "6.14.0" - resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-6.14.0.tgz#390e7863a8ae99970981933826476169285b3a27" - integrity sha512-DbVwh0qZhAC7CNDWcq8cBdK6FcVHiMTKmCypOPWeZkp9hJ8xYwTaWSa6bb6cjfi8KOeJy0e9a8Izxyx+O4+gCQ== +eslint-config-prettier@6.15.0: + version "6.15.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-6.15.0.tgz#7f93f6cb7d45a92f1537a70ecc06366e1ac6fed9" + integrity sha512-a1+kOYLR8wMGustcgAjdydMsQ2A/2ipRPwRKUmfYaSxc9ZPcrku080Ctl6zrZzZNs/U82MjSv+qKREkoq3bJaw== dependencies: get-stdin "^6.0.0" From eb14c450a00b9cd5daede1c20b0f7688c9591ef6 Mon Sep 17 00:00:00 2001 From: Laam Pui Date: Wed, 28 Oct 2020 22:26:39 +0800 Subject: [PATCH 007/645] =?UTF-8?q?fix:=20=E7=8C=8E=E8=B6=A3=E7=9A=84?= =?UTF-8?q?=E5=BC=80=E6=92=AD=E6=8F=90=E9=86=92=E5=A4=B1=E6=95=88=20#5440?= =?UTF-8?q?=20(#6018)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/routes/liequtv/room.js | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/lib/routes/liequtv/room.js b/lib/routes/liequtv/room.js index 7818db534c..cbc8800f35 100644 --- a/lib/routes/liequtv/room.js +++ b/lib/routes/liequtv/room.js @@ -1,25 +1,8 @@ const got = require('@/utils/got'); -const original_host = 'https://liequ.tv'; - module.exports = async (ctx) => { const id = ctx.params.id; - - const cache_key = `liequtv::latest_base_host::${new Date().toJSON().slice(0, 10)}`; - const url = `${(await ctx.cache.get(cache_key)) || original_host}/${id}`; - - const response = await got({ - method: 'get', - url: url, - hooks: { - beforeRedirect: [ - (options) => { - options.url.pathname = `/${id}`; - ctx.cache.set(cache_key, options.url.origin); - }, - ], - }, - }); + const response = await got.get(`https://liequ.njcywl88.com/${id}`); if (response.data.match(/主播不存在/)) { throw '主播不存在'; From aff80d9c6bea9b3f5f06c8dae49e81cef50eb390 Mon Sep 17 00:00:00 2001 From: Henry Date: Wed, 28 Oct 2020 14:41:47 +0000 Subject: [PATCH 008/645] =?UTF-8?q?doc:=20=E8=A1=A5=E5=85=A8=20b=20?= =?UTF-8?q?=E7=AB=99=20badge?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/social-media.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/social-media.md b/docs/social-media.md index eab0f8ef3c..900ac3d974 100644 --- a/docs/social-media.md +++ b/docs/social-media.md @@ -24,7 +24,7 @@ Tiny Tiny RSS 会给所有 iframe 元素添加 `sandbox="allow-scripts"` 属性 ### 用户追番列表 - + ### UP 主投稿 @@ -32,7 +32,7 @@ Tiny Tiny RSS 会给所有 iframe 元素添加 `sandbox="allow-scripts"` 属性 ### UP 主专栏 - + ### UP 主动态 @@ -40,11 +40,11 @@ Tiny Tiny RSS 会给所有 iframe 元素添加 `sandbox="allow-scripts"` 属性 ### UP 主频道 - + ### UP 主默认收藏夹 - + ### UP 主非默认收藏夹 @@ -52,15 +52,15 @@ Tiny Tiny RSS 会给所有 iframe 元素添加 `sandbox="allow-scripts"` 属性 ### UP 主投币视频 - + ### UP 主粉丝 - + ### UP 主关注用户 - + ### 分区视频 From 0e002343ceafa23ab493a5262743111ed44e602e Mon Sep 17 00:00:00 2001 From: Henry Date: Wed, 28 Oct 2020 14:51:54 +0000 Subject: [PATCH 009/645] doc: format --- docs/install/README.md | 49 ++++++++++++++++++++++++++++++------------ 1 file changed, 35 insertions(+), 14 deletions(-) diff --git a/docs/install/README.md b/docs/install/README.md index 03abbcfd51..bbb9bf0822 100644 --- a/docs/install/README.md +++ b/docs/install/README.md @@ -207,7 +207,7 @@ in pkgs.stdenv.mkDerivation { ### 自动更新部署 1. 将 RSSHub [分叉(fork)](https://github.com/login?return_to=%2FDIYgod%2FRSSHub) 到自己的账户下。 -2. 把自己的分叉部署到 Heroku:`https://heroku.com/deploy?template=URL`,其中 `URL` 改为分叉地址 (例如 `https://github.com/USERNAME/RSSHub`)。 +2. 把自己的分叉部署到 Heroku:`https://heroku.com/deploy?template=URL`,其中 `URL` 改为分叉地址 (例如 `https://github.com/USERNAME/RSSHub`)。 3. 检查 Heroku 设置,随代码库更新自动部署。 4. 安装 [Pull](https://github.com/apps/pull) 应用,定期将 RSSHub 改动自动同步至你的分叉。 @@ -328,21 +328,21 @@ RSSHub 支持 `memory` 和 `redis` 两种缓存方式 部分路由反爬严格,可以配置使用代理抓取。 -可通过**代理 URI**或**代理选项**两种方式来配置代理,当两种配置方式同时被设置时,RSSHub 将会使用**代理 URI**中的配置。 +可通过**代理 URI **或**代理选项**两种方式来配置代理,当两种配置方式同时被设置时,RSSHub 将会使用**代理 URI **中的配置。 #### 代理 URI `PROXY_URI`: 代理 URI,支持 socks4, socks5, http, https -> 代理 URI 的格式为: +> 代理 URI 的格式为: > > - `{protocol}://{host}:{port}` -> - `{protocol}://{username}:{password}@{host}:{port}` (带身份凭证) +> - `{protocol}://{username}:{password}@{host}:{port}` (带身份凭证) > -> 一些示例: +> 一些示例: > > - `socks4://127.0.0.1:1080` -> - `socks5://user:pass@127.0.0.1:1080` (用户名为 `user`, 密码为 `pass`) +> - `socks5://user:pass@127.0.0.1:1080` (用户名为 `user`, 密码为 `pass`) > - `socks://127.0.0.1:1080` (protocol 为 socks 时表示 `socks5`) > - `http://127.0.0.1:8080` > - `http://user:pass@127.0.0.1:8080` @@ -484,7 +484,10 @@ RSSHub 支持使用访问密钥 / 码,白名单和黑名单三种方式进行 - bilibili 用户关注视频动态路由 - - `BILIBILI_COOKIE_{uid}`: 对应 uid 的 b 站用户登录后的 Cookie 值,`{uid}` 替换为 uid,如 `BILIBILI_COOKIE_2267573`,获取方式:1. 打开 2. 打开控制台 3. 切换到 Network 面板 4. 刷新 5. 点击 dynamic_new 请求 6. 找到 Cookie + - `BILIBILI_COOKIE_{uid}`: 对应 uid 的 b 站用户登录后的 Cookie 值,`{uid}` 替换为 uid,如 `BILIBILI_COOKIE_2267573`,获取方式: + 1. 打开 + 2. 打开控制台,切换到 Network 面板,刷新 + 3. 点击 dynamic_new 请求,找到 Cookie - 语雀 全部路由:[注册地址](https://www.yuque.com/register) @@ -498,7 +501,11 @@ RSSHub 支持使用访问密钥 / 码,白名单和黑名单三种方式进行 - 吹牛部落 栏目更新 - - `CHUINIU_MEMBER`: 吹牛部落登录后的 x-member,获取方式:1. 登陆后点开文章正文 2. 打开控制台 3. 刷新 4. 找到 开头的请求 5. 找到请求头中的 x-member + - `CHUINIU_MEMBER`: 吹牛部落登录后的 x-member,获取方式 + 1. 登陆后点开文章正文 + 2. 打开控制台,刷新 + 3. 找到 开头的请求 + 4. 找到请求头中的 x-member - 微博 个人时间线路由:[申请地址](https://open.weibo.com/connect) @@ -525,7 +532,11 @@ RSSHub 支持使用访问密钥 / 码,白名单和黑名单三种方式进行 - 北大未名 BBS 全站十大 - - `PKUBBS_COOKIE`: BBS 注册用户登录后的 Cookie 值,获取方式:1. 登录后打开论坛首页 2. 打开控制台 3. 刷新 4. 找到 请求 5. 找到请求头中的 Cookie + - `PKUBBS_COOKIE`: BBS 注册用户登录后的 Cookie 值,获取方式: + 1. 登录后打开论坛首页 + 2. 打开控制台, 刷新 + 3. 找到 请求 + 4. 找到请求头中的 Cookie - nhentai torrent: [注册地址](https://nhentai.net/register/) @@ -534,7 +545,7 @@ RSSHub 支持使用访问密钥 / 码,白名单和黑名单三种方式进行 - discuz cookies 设定 - - `DISCUZ_COOKIE_{cid}`: 某 Discuz 驱动的论坛,用户注册后的 Cookie 值,cid 可自由设定,取值范围[00, 99], 使用 discuz 通用路由时,通过指定 cid 来调用该 cookie + - `DISCUZ_COOKIE_{cid}`: 某 Discuz 驱动的论坛,用户注册后的 Cookie 值,cid 可自由设定,取值范围 [00, 99], 使用 discuz 通用路由时,通过指定 cid 来调用该 cookie - Sci-hub 设置,用于科学期刊路由。 @@ -548,13 +559,17 @@ RSSHub 支持使用访问密钥 / 码,白名单和黑名单三种方式进行 Web 版认证 token 和 iOS 内购回执认证 token 只需选择其一填入即可。如果你在进行上述操作时遇到困难,亦可选择在环境设置中填写明文的用户名和密码: - - `INITIUM_USERNAME`: 端传媒用户名 (邮箱) + - `INITIUM_USERNAME`: 端传媒用户名 (邮箱) - `INITIUM_PASSWORD`: 端传媒密码 - BTBYR - `BTBYR_HOST`: 支持 ipv4 访问的 BTBYR 镜像,默认为原站 `https://bt.byr.cn/`。 - - `BTBYR_COOKIE`: 注册用户登录后的 Cookie 值,获取方式:1. 登录后打开网站首页 2. 打开控制台 3. 刷新 4. 找到 请求 5. 找到请求头中的 Cookie + - `BTBYR_COOKIE`: 注册用户登录后的 Cookie 值,获取方式: + 1. 登录后打开网站首页 + 2. 打开控制台,刷新 + 3. 找到 请求 + 4. 找到请求头中的 Cookie - 小宇宙:需要 App 登陆后抓包获取相应数据。 @@ -573,8 +588,14 @@ RSSHub 支持使用访问密钥 / 码,白名单和黑名单三种方式进行 - 喜马拉雅 - - `XIMALAYA_TOKEN`: 对应 cookie 中的 `1&_token`,获取方式:1. 登陆喜马拉雅网页版 2. 查找名称为`1&_token`的`cookie`,其内容即为`XIMALAYA_TOKEN`的值(即在`cookie` 中查找 `1&_token=***;`,并设置 `XIMALAYA_TOKEN = ***`) + - `XIMALAYA_TOKEN`: 对应 cookie 中的 `1&_token`,获取方式: + 1. 登陆喜马拉雅网页版 + 2. 打开控制台,刷新 + 3. 查找名称为`1&_token`的`cookie`,其内容即为`XIMALAYA_TOKEN`的值(即在`cookie` 中查找 `1&_token=***;`,并设置 `XIMALAYA_TOKEN = ***`) - 4399 论坛 - - `GAME_4399`: 对应登录后的 cookie 值,获取方式:1. 在 4399 首页登录. 2. 打开开发者工具,切换到 Network 面板. 3. 刷新 4. 查找`www.4399.com`的访问请求,点击请求,在右侧 Headers 中找到 Cookie. + - `GAME_4399`: 对应登录后的 cookie 值,获取方式: + 1. 在 4399 首页登录。 + 2. 打开开发者工具,切换到 Network 面板,刷新 + 3. 查找`www.4399.com`的访问请求,点击请求,在右侧 Headers 中找到 Cookie. From 81877beca31a2854b6c607aacff4e1e4191e3f61 Mon Sep 17 00:00:00 2001 From: Laam Pui Date: Wed, 28 Oct 2020 22:57:13 +0800 Subject: [PATCH 010/645] =?UTF-8?q?feat:=20=E8=8E=B7=E5=8F=96=E4=B8=AD?= =?UTF-8?q?=E5=B1=B1=E7=BD=91=E6=96=87=E7=AB=A0=E5=85=A8=E6=96=87=E9=A2=84?= =?UTF-8?q?=E8=A7=88=20(#6029)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/routes/zsnews/index.js | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/lib/routes/zsnews/index.js b/lib/routes/zsnews/index.js index be0c2d49a4..72213760c9 100644 --- a/lib/routes/zsnews/index.js +++ b/lib/routes/zsnews/index.js @@ -1,18 +1,32 @@ const got = require('@/utils/got'); +const cheerio = require('cheerio'); module.exports = async (ctx) => { ctx.params.cateid = ctx.params.cateid || '35'; const response = await got.get(`http://www.zsnews.cn/api/mobile/getlist.html?cateid=${ctx.params.cateid}`); + const out = await Promise.all( + response.data.map( + async (item) => + await ctx.cache.tryGet(item.url, async () => { + try { + const res = await got.get(item.url); + const $ = cheerio.load(res.data); + item.description = $('.article-content').html(); + item.pubDate = new Date($('.article-meta span').first().text().slice(5)).toUTCString(); + item.link = item.url; + return item; + } catch (err) { + return Promise.resolve(''); + } + }) + ) + ); + ctx.state.data = { title: '中山新闻', link: 'https://www.zsnews.cn/', - item: response.data.map((item) => ({ - guid: item.id, - title: item.title, - description: item.title, - link: item.url, - })), + item: out, }; }; From 165566cc258bc9f3c95e5e3f62b05f4c918158f1 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 29 Oct 2020 15:15:03 +0000 Subject: [PATCH 011/645] chore(deps-dev): bump supertest from 5.0.0 to 6.0.0 Bumps [supertest](https://github.com/visionmedia/supertest) from 5.0.0 to 6.0.0. - [Release notes](https://github.com/visionmedia/supertest/releases) - [Commits](https://github.com/visionmedia/supertest/compare/v5.0.0...v6.0.0) Signed-off-by: dependabot-preview[bot] --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index cfb56a1b82..b666c0cd6c 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,7 @@ "remark-preset-prettier": "0.4.0", "staged-git-files": "1.2.0", "string-width": "4.2.0", - "supertest": "5.0.0", + "supertest": "6.0.0", "vuepress": "1.7.1", "yorkie": "2.0.0" }, diff --git a/yarn.lock b/yarn.lock index 42ec7db30f..06100da1ca 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11673,10 +11673,10 @@ superagent@6.1.0: readable-stream "^3.6.0" semver "^7.3.2" -supertest@5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/supertest/-/supertest-5.0.0.tgz#771aedfeb0a95466cc5d100d5d11288736fd25da" - integrity sha512-2JAWpPrUOZF4hHH5ZTCN2xjKXvJS3AEwPNXl0HUseHsfcXFvMy9kcsufIHCNAmQ5hlGCvgeAqaR5PBEouN3hlQ== +supertest@6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/supertest/-/supertest-6.0.0.tgz#8371509fadd616217b42ff3d3be7cc0267baea1b" + integrity sha512-7+Skilm7kvUZIaKfALPgjS3i8zYs11zvEudAeYdqJZL3f+SGGFV4qQkkTVkYcs+zbE6de47HP8o0a0hy1BFlMA== dependencies: methods "1.1.2" superagent "6.1.0" From cfdd52e110f881b62b8d0f4fa8188f0bb97cbf5f Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 29 Oct 2020 15:15:28 +0000 Subject: [PATCH 012/645] chore(deps): bump googleapis from 61.0.0 to 62.0.0 Bumps [googleapis](https://github.com/googleapis/google-api-nodejs-client) from 61.0.0 to 62.0.0. - [Release notes](https://github.com/googleapis/google-api-nodejs-client/releases) - [Changelog](https://github.com/googleapis/google-api-nodejs-client/blob/master/CHANGELOG.md) - [Commits](https://github.com/googleapis/google-api-nodejs-client/compare/v61.0.0...v62.0.0) Signed-off-by: dependabot-preview[bot] --- package.json | 2 +- yarn.lock | 31 +++++++++++++++++++++---------- 2 files changed, 22 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index cfb56a1b82..0b188ee032 100644 --- a/package.json +++ b/package.json @@ -80,7 +80,7 @@ "etag": "1.8.1", "fanfou-sdk": "4.2.0", "git-rev-sync": "3.0.1", - "googleapis": "61.0.0", + "googleapis": "62.0.0", "got": "11.8.0", "he": "1.2.0", "hooman": "1.2.6", diff --git a/yarn.lock b/yarn.lock index 42ec7db30f..8261c13454 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5638,6 +5638,17 @@ gaxios@^3.0.0: is-stream "^2.0.0" node-fetch "^2.3.0" +gaxios@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/gaxios/-/gaxios-4.0.1.tgz#bc7b205a89d883452822cc75e138620c35e3291e" + integrity sha512-jOin8xRZ/UytQeBpSXFqIzqU7Fi5TqgPNLlUsSB8kjJ76+FiGBfImF8KJu++c6J4jOldfJUtt0YmkRj2ZpSHTQ== + dependencies: + abort-controller "^3.0.0" + extend "^3.0.2" + https-proxy-agent "^5.0.0" + is-stream "^2.0.0" + node-fetch "^2.3.0" + gcp-metadata@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/gcp-metadata/-/gcp-metadata-4.0.1.tgz#e97800c4f375e6218707cc4d90dc151ed5c2f960" @@ -5853,25 +5864,25 @@ google-p12-pem@^3.0.0: dependencies: node-forge "^0.9.0" -googleapis-common@^4.4.0: - version "4.4.0" - resolved "https://registry.yarnpkg.com/googleapis-common/-/googleapis-common-4.4.0.tgz#b806e41c4e883f22b68769aafb3ed11802919091" - integrity sha512-Bgrs8/1OZQFFIfVuX38L9t48rPAkVUXttZy6NzhhXxFOEMSHgfFIjxou7RIXOkBHxmx2pVwct9WjKkbnqMYImQ== +googleapis-common@^4.4.1: + version "4.4.2" + resolved "https://registry.yarnpkg.com/googleapis-common/-/googleapis-common-4.4.2.tgz#8d25b5313c2cd68ea4595f38338f0d8c0d385371" + integrity sha512-booWj8k9BwN2j+nbCaThbXscbbsO+FkV4h3xHW+RRC6+RwtqS2I3gqXbP8bqE1BgQBcN+49xFODCfAxy9PGfOQ== dependencies: extend "^3.0.2" - gaxios "^3.0.0" + gaxios "^4.0.0" google-auth-library "^6.0.0" qs "^6.7.0" url-template "^2.0.8" uuid "^8.0.0" -googleapis@61.0.0: - version "61.0.0" - resolved "https://registry.yarnpkg.com/googleapis/-/googleapis-61.0.0.tgz#90f2ff37fda7f4f524c478188ebc67e7fb1a37b9" - integrity sha512-aXaNgWKaALiYrfwrJ0ZYhRo2abyIBcqUjyNMgkbghKJMiCeOwcktlaGseH6JbPlCxXYCE8ZDfvAQqVNsf+6/RA== +googleapis@62.0.0: + version "62.0.0" + resolved "https://registry.yarnpkg.com/googleapis/-/googleapis-62.0.0.tgz#211910a906cbb9497c2141a16d6623d2e9764e30" + integrity sha512-IKWMdnrEzaVcambJ90QjH4Rl6e6L+bljB4SRniPgnhTQ8BG/p/M6fuNhzbBssu61GYu5q8EcxKndmRZQIIo2iQ== dependencies: google-auth-library "^6.0.0" - googleapis-common "^4.4.0" + googleapis-common "^4.4.1" got@11.8.0: version "11.8.0" From d17914c8c52523dfe84a506e57dfc081272dc93a Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 29 Oct 2020 15:16:03 +0000 Subject: [PATCH 013/645] chore(deps): bump @sentry/node from 5.27.1 to 5.27.2 Bumps [@sentry/node](https://github.com/getsentry/sentry-javascript) from 5.27.1 to 5.27.2. - [Release notes](https://github.com/getsentry/sentry-javascript/releases) - [Changelog](https://github.com/getsentry/sentry-javascript/blob/master/CHANGELOG.md) - [Commits](https://github.com/getsentry/sentry-javascript/compare/5.27.1...5.27.2) Signed-off-by: dependabot-preview[bot] --- package.json | 2 +- yarn.lock | 92 ++++++++++++++++++++++++++-------------------------- 2 files changed, 47 insertions(+), 47 deletions(-) diff --git a/package.json b/package.json index cfb56a1b82..d15bdd20b7 100644 --- a/package.json +++ b/package.json @@ -66,7 +66,7 @@ "dependencies": { "@koa/router": "9.4.0", "@postlight/mercury-parser": "2.2.0", - "@sentry/node": "5.27.1", + "@sentry/node": "5.27.2", "aes-js": "3.1.2", "art-template": "4.13.2", "cheerio": "1.0.0-rc.3", diff --git a/yarn.lock b/yarn.lock index 42ec7db30f..305ed57609 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1345,72 +1345,72 @@ dependencies: safe-buffer "^5.0.1" -"@sentry/core@5.27.1": - version "5.27.1" - resolved "https://registry.yarnpkg.com/@sentry/core/-/core-5.27.1.tgz#489604054d821e1de155f80fe650085b37cad235" - integrity sha512-n5CxzMbOAT6HZK4U4cOUAAikkRnnHhMNhInrjfZh7BoiuX1k63Hru2H5xk5WDuEaTTr5RaBA/fqPl7wxHySlwQ== +"@sentry/core@5.27.2": + version "5.27.2" + resolved "https://registry.yarnpkg.com/@sentry/core/-/core-5.27.2.tgz#94d62364e3d0bf9d0b9b891699ad35d31cd69da3" + integrity sha512-FMX0Aignhi9Rk4tZkjwSXCsFFQc8FIOgUTvfIKCdayLhKxfbY0H37b0fFNzaQ9v15SFzIZJ9uzw4PTmjzEh6Uw== dependencies: - "@sentry/hub" "5.27.1" - "@sentry/minimal" "5.27.1" - "@sentry/types" "5.27.1" - "@sentry/utils" "5.27.1" + "@sentry/hub" "5.27.2" + "@sentry/minimal" "5.27.2" + "@sentry/types" "5.27.2" + "@sentry/utils" "5.27.2" tslib "^1.9.3" -"@sentry/hub@5.27.1": - version "5.27.1" - resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-5.27.1.tgz#c95faaf18257c365acc09246fafd27276bfd6a2f" - integrity sha512-RBHo3T92s6s4Ian1pZcPlmNtFqB+HAP6xitU+ZNA48bYUK+R1vvqEcI8Xs83FyNaRGCgclp9erDFQYyAuxY4vw== +"@sentry/hub@5.27.2": + version "5.27.2" + resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-5.27.2.tgz#06923e0b7b5e96cd2cd8b1d44cb83dbd8b8eed26" + integrity sha512-KCAWF5oDXd/Pjzbcmfj53F5ZzOX53Rzi23a2mWyUXMdPXoXIiMrIcdC/DqrqKV787LvOJcSFaTychJCH3t15/A== dependencies: - "@sentry/types" "5.27.1" - "@sentry/utils" "5.27.1" + "@sentry/types" "5.27.2" + "@sentry/utils" "5.27.2" tslib "^1.9.3" -"@sentry/minimal@5.27.1": - version "5.27.1" - resolved "https://registry.yarnpkg.com/@sentry/minimal/-/minimal-5.27.1.tgz#d6ce881ba3c262db29520177a4c1f0e0f5388697" - integrity sha512-MHXCeJdA1NAvaJuippcM8nrWScul8iTN0Q5nnFkGctGIGmmiZHTXAYkObqJk7H3AK+CP7r1jqN2aQj5Nd9CtyA== +"@sentry/minimal@5.27.2": + version "5.27.2" + resolved "https://registry.yarnpkg.com/@sentry/minimal/-/minimal-5.27.2.tgz#c9b90d71383891e69f4abecf32fdba9d91d3328a" + integrity sha512-n9SssI30rpS1tw6hH0ylxVlONdmZCqiPy60fotxUzql6mCo/nW7tcADsW15fvQlUQ160VaGf3iMj+hpHkRBerw== dependencies: - "@sentry/hub" "5.27.1" - "@sentry/types" "5.27.1" + "@sentry/hub" "5.27.2" + "@sentry/types" "5.27.2" tslib "^1.9.3" -"@sentry/node@5.27.1": - version "5.27.1" - resolved "https://registry.yarnpkg.com/@sentry/node/-/node-5.27.1.tgz#17f94e46a42ebdec41996c4783714a64b8d74774" - integrity sha512-OJCpUK6bbWlDCqiTZVP4ybQQDSly2EafbvvO7hoQ5ktr87WkRCgLpTNI7Doa5ANGuLNnVUvRNIsIH1DJqLZLNg== +"@sentry/node@5.27.2": + version "5.27.2" + resolved "https://registry.yarnpkg.com/@sentry/node/-/node-5.27.2.tgz#50f98d5b812460e97a7b3f2c25b29925b0507fab" + integrity sha512-JHY+EYjq3iqVnTPIow7KzKX+lIqJXZGVT0xHdPrhaVcfBtUUBYTpjO7SSCkINPt6dPKVRq0QDzIfevd5nybR7A== dependencies: - "@sentry/core" "5.27.1" - "@sentry/hub" "5.27.1" - "@sentry/tracing" "5.27.1" - "@sentry/types" "5.27.1" - "@sentry/utils" "5.27.1" + "@sentry/core" "5.27.2" + "@sentry/hub" "5.27.2" + "@sentry/tracing" "5.27.2" + "@sentry/types" "5.27.2" + "@sentry/utils" "5.27.2" cookie "^0.4.1" https-proxy-agent "^5.0.0" lru_map "^0.3.3" tslib "^1.9.3" -"@sentry/tracing@5.27.1": - version "5.27.1" - resolved "https://registry.yarnpkg.com/@sentry/tracing/-/tracing-5.27.1.tgz#198cd97514363369d29eef9b597be9332ab170c4" - integrity sha512-GBmdR8Ky/nv4KOa6+DEnOSBkFOFhM+asR8Y/gw2qSUWCwzKuWHh9BEnDwxtSI8CMvgUwOIZ5wiiqJGc1unYfCw== +"@sentry/tracing@5.27.2": + version "5.27.2" + resolved "https://registry.yarnpkg.com/@sentry/tracing/-/tracing-5.27.2.tgz#a87bed1d96dacdb443894732abb5828e950b14ed" + integrity sha512-5Lptd32VtKBzIzTmFqcKgcetTMRraMvjPFTX8kFVX4aGDaUGOx0cCZeAURNoHDfHfjCazYK8yV6BkJfi6YJNww== dependencies: - "@sentry/hub" "5.27.1" - "@sentry/minimal" "5.27.1" - "@sentry/types" "5.27.1" - "@sentry/utils" "5.27.1" + "@sentry/hub" "5.27.2" + "@sentry/minimal" "5.27.2" + "@sentry/types" "5.27.2" + "@sentry/utils" "5.27.2" tslib "^1.9.3" -"@sentry/types@5.27.1": - version "5.27.1" - resolved "https://registry.yarnpkg.com/@sentry/types/-/types-5.27.1.tgz#031480a4cf8f0b6e6337fb03ee884deedcef6f40" - integrity sha512-g1aX0V0fz5BTo0mjgSVY9XmPLGZ6p+8OEzq3ubKzDUf59VHl+Vt8viZ8VXw/vsNtfAjBHn7BzSuzJo7cXJJBtA== +"@sentry/types@5.27.2": + version "5.27.2" + resolved "https://registry.yarnpkg.com/@sentry/types/-/types-5.27.2.tgz#606e973cee865e83e75491e33e9b2732a0f79c94" + integrity sha512-oszEOlWJuySvGc2HJ2KLTgtYwRFnHWDu8YIZ99UhmO2PcGQ5HlZJpV2oC8n3x0g1YSSlAaThjKbliJEAT7fmPg== -"@sentry/utils@5.27.1": - version "5.27.1" - resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-5.27.1.tgz#0ed9d9685aae6f4ef9eb6b9ebb81e361fd1c5452" - integrity sha512-VIzK8utuvFO9EogZcKJPgmLnlJtYbaPQ0jCw7od9HRw1ckrSBc84sA0uuuY6pB6KSM+7k6EjJ5IdIBaCz5ep/A== +"@sentry/utils@5.27.2": + version "5.27.2" + resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-5.27.2.tgz#9d52a2ad73aaab41c45202c289c4a63127ce4ebb" + integrity sha512-ZrdRgcFapi1NACbtvnPLOIXKjBPVTlhGzmXNCVao0uRBBRNJa5i2Mjp/U/Xy/fT0K1MGJQ+F9YZjZPnAMsDNbw== dependencies: - "@sentry/types" "5.27.1" + "@sentry/types" "5.27.2" tslib "^1.9.3" "@sindresorhus/is@^0.14.0": From 1bd87d00dc8f579de01bccfe021d1c79612ad807 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 29 Oct 2020 15:16:29 +0000 Subject: [PATCH 014/645] chore(deps): bump parse-torrent from 7.1.3 to 8.0.0 Bumps [parse-torrent](https://github.com/webtorrent/parse-torrent) from 7.1.3 to 8.0.0. - [Release notes](https://github.com/webtorrent/parse-torrent/releases) - [Commits](https://github.com/webtorrent/parse-torrent/compare/v7.1.3...v8.0.0) Signed-off-by: dependabot-preview[bot] --- package.json | 2 +- yarn.lock | 70 +++++++++++++++++++++++----------------------------- 2 files changed, 32 insertions(+), 40 deletions(-) diff --git a/package.json b/package.json index cfb56a1b82..687f7f31f0 100644 --- a/package.json +++ b/package.json @@ -101,7 +101,7 @@ "markdown-it": "12.0.2", "module-alias": "2.2.2", "opencc": "1.1.1", - "parse-torrent": "7.1.3", + "parse-torrent": "8.0.0", "pidusage": "2.0.21", "plist": "3.0.1", "puppeteer": "5.4.1", diff --git a/yarn.lock b/yarn.lock index 42ec7db30f..22fbc6ac8a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2771,7 +2771,7 @@ bcrypt-pbkdf@^1.0.0: dependencies: tweetnacl "^0.14.3" -bencode@^2.0.0: +bencode@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/bencode/-/bencode-2.0.1.tgz#667a6a31c5e038d558608333da6b7c94e836c85b" integrity sha512-2uhEl8FdjSBUyb69qDTgOEeeqDTa+n3yMQzLW0cOzNf1Ow5bwcg3idf+qsWisIKRH8Bk8oC7UXL8irRcPA8ZEQ== @@ -2812,10 +2812,10 @@ bl@^4.0.1: inherits "^2.0.4" readable-stream "^3.4.0" -blob-to-buffer@^1.2.6: - version "1.2.8" - resolved "https://registry.yarnpkg.com/blob-to-buffer/-/blob-to-buffer-1.2.8.tgz#78eeeb332f1280ed0ca6fb2b60693a8c6d36903a" - integrity sha512-re0AIxakF504MgeMtIyJkVcZ8T5aUxtp/QmTMlmjyb3P44E1BEv5x3LATBGApWAJATyXHtkXRD+gWTmeyYLiQA== +blob-to-buffer@^1.2.9: + version "1.2.9" + resolved "https://registry.yarnpkg.com/blob-to-buffer/-/blob-to-buffer-1.2.9.tgz#a17fd6c1c564011408f8971e451544245daaa84a" + integrity sha512-BF033y5fN6OCofD3vgHmNtwZWRcq9NLyyxyILx9hfMy1sXYy4ojFl765hJ2lP0YaN2fuxPaLO2Vzzoxy0FLFFA== bluebird@^2.6.2: version "2.11.0" @@ -4250,13 +4250,6 @@ decompress-response@^3.3.0: dependencies: mimic-response "^1.0.0" -decompress-response@^4.2.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-4.2.1.tgz#414023cc7a302da25ce2ec82d0d5238ccafd8986" - integrity sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw== - dependencies: - mimic-response "^2.0.0" - decompress-response@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-5.0.0.tgz#7849396e80e3d1eba8cb2f75ef4930f76461cb0f" @@ -5671,10 +5664,10 @@ get-stdin@^6.0.0: resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-6.0.0.tgz#9e09bf712b360ab9225e812048f71fde9c89657b" integrity sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g== -get-stdin@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-7.0.0.tgz#8d5de98f15171a125c5e516643c7a6d0ea8a96f6" - integrity sha512-zRKcywvrXlXsA0v0i9Io4KDRaAw7+a1ZpjRwl9Wox8PFlVCCHra7E9c4kqXCoCM9nR5tBkaTTZRBoCm60bFqTQ== +get-stdin@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-8.0.0.tgz#cbad6a73feb75f6eeb22ba9e01f89aa28aa97a53" + integrity sha512-sY22aA6xchAzprjyqmSEQv4UbAAzRN0L2dQB0NlN5acTTK9Don6nhoc3eAbUnpZiCANAMfd/+40kVdKfFygohg== get-stream@^3.0.0: version "3.0.0" @@ -8105,13 +8098,12 @@ lz-string@1.4.4: resolved "https://registry.yarnpkg.com/lz-string/-/lz-string-1.4.4.tgz#c0d8eaf36059f705796e1e344811cf4c498d3a26" integrity sha1-wNjq82BZ9wV5bh40SBHPTEmNOiY= -magnet-uri@^5.1.3: - version "5.2.4" - resolved "https://registry.yarnpkg.com/magnet-uri/-/magnet-uri-5.2.4.tgz#7afe5b736af04445aff744c93a890a3710077688" - integrity sha512-VYaJMxhr8B9BrCiNINUsuhaEe40YnG+AQBwcqUKO66lSVaI9I3A1iH/6EmEwRI8OYUg5Gt+4lLE7achg676lrg== +magnet-uri@^5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/magnet-uri/-/magnet-uri-5.3.0.tgz#5dd2efbfcf44c41ce54fe309030bce4ee120b79b" + integrity sha512-8GuTc9mXYfaKrXz687kzx2YTEhMR/X1Qgt6tkTNwPlb2fUy3QfU+O9zuoB5DKAa/IyVdLGxe9xSFUtaA+ZG5tQ== dependencies: - thirty-two "^1.0.1" - uniq "^1.0.1" + thirty-two "^1.0.2" mailparser@3.0.0: version "3.0.0" @@ -9330,17 +9322,17 @@ parse-json@^5.0.0: json-parse-even-better-errors "^2.3.0" lines-and-columns "^1.1.6" -parse-torrent@7.1.3: - version "7.1.3" - resolved "https://registry.yarnpkg.com/parse-torrent/-/parse-torrent-7.1.3.tgz#5981a0d9381b16297a7af053763068e8da5c9610" - integrity sha512-to8zT7+o6bVTyP35r2QgG1svuFGMFO1mE6ri1oWHgL9tlgnOtfjmfHmA3mOuP9HTIU/8OiZw0NG5zbyqVLxhvA== +parse-torrent@8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/parse-torrent/-/parse-torrent-8.0.0.tgz#a608748d0ce7c9477d07a12c764a0aa47413d6f4" + integrity sha512-vS6qZtAQbVak2/cbDobmxBLfeBAyuMQEIW315Iq4tyfto8+8vtzMb7j3WG7x1FQkTqBh5hlhF7clINIVW6npJQ== dependencies: - bencode "^2.0.0" - blob-to-buffer "^1.2.6" - get-stdin "^7.0.0" - magnet-uri "^5.1.3" - simple-get "^3.0.1" - simple-sha1 "^3.0.0" + bencode "^2.0.1" + blob-to-buffer "^1.2.9" + get-stdin "^8.0.0" + magnet-uri "^5.3.0" + simple-get "^4.0.0" + simple-sha1 "^3.0.1" parse5@4.0.0: version "4.0.0" @@ -11064,16 +11056,16 @@ simple-concat@^1.0.0: resolved "https://registry.yarnpkg.com/simple-concat/-/simple-concat-1.0.0.tgz#7344cbb8b6e26fb27d66b2fc86f9f6d5997521c6" integrity sha1-c0TLuLbib7J9ZrL8hvn21Zl1IcY= -simple-get@^3.0.1: - version "3.1.0" - resolved "https://registry.yarnpkg.com/simple-get/-/simple-get-3.1.0.tgz#b45be062435e50d159540b576202ceec40b9c6b3" - integrity sha512-bCR6cP+aTdScaQCnQKbPKtJOKDp/hj9EDLJo3Nw4y1QksqaovlW/bnptB6/c1e+qmNIDHRK+oXFDdEqBT8WzUA== +simple-get@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/simple-get/-/simple-get-4.0.0.tgz#73fa628278d21de83dadd5512d2cc1f4872bd675" + integrity sha512-ZalZGexYr3TA0SwySsr5HlgOOinS4Jsa8YB2GJ6lUNAazyAu4KG/VmzMTwAt2YVXzzVj8QmefmAonZIK2BSGcQ== dependencies: - decompress-response "^4.2.0" + decompress-response "^6.0.0" once "^1.3.1" simple-concat "^1.0.0" -simple-sha1@^3.0.0: +simple-sha1@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/simple-sha1/-/simple-sha1-3.0.1.tgz#b34c3c978d74ac4baf99b6555c1e6736e0d6e700" integrity sha512-q7ehqWfHc1VhOm7sW099YDZ4I0yYX7rqyhqqhHV1IYeUTjPOhHyD3mXvv8k2P+rO7+7c8R4/D+8ffzC9BE7Cqg== @@ -11870,7 +11862,7 @@ thenify-all@^1.0.0: dependencies: any-promise "^1.0.0" -thirty-two@^1.0.1: +thirty-two@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/thirty-two/-/thirty-two-1.0.2.tgz#4ca2fffc02a51290d2744b9e3f557693ca6b627a" integrity sha1-TKL//AKlEpDSdEueP1V2k8prYno= From 3d248cf233768e28dc14869fddb08a3c50bddb81 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 29 Oct 2020 15:17:09 +0000 Subject: [PATCH 015/645] chore(deps): bump tiny-async-pool from 1.1.0 to 1.2.0 Bumps [tiny-async-pool](https://github.com/rxaviers/async-pool) from 1.1.0 to 1.2.0. - [Release notes](https://github.com/rxaviers/async-pool/releases) - [Commits](https://github.com/rxaviers/async-pool/compare/v1.1.0...v1.2.0) Signed-off-by: dependabot-preview[bot] --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index cfb56a1b82..c5b765c63b 100644 --- a/package.json +++ b/package.json @@ -110,7 +110,7 @@ "require-all": "3.0.0", "rss-parser": "3.9.0", "socks-proxy-agent": "5.0.0", - "tiny-async-pool": "1.1.0", + "tiny-async-pool": "1.2.0", "tough-cookie": "4.0.0", "tunnel": "0.0.6", "twit": "2.2.11", diff --git a/yarn.lock b/yarn.lock index 42ec7db30f..f2899af5cf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11910,10 +11910,10 @@ timsort@^0.3.0: resolved "https://registry.yarnpkg.com/timsort/-/timsort-0.3.0.tgz#405411a8e7e6339fe64db9a234de11dc31e02bd4" integrity sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q= -tiny-async-pool@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/tiny-async-pool/-/tiny-async-pool-1.1.0.tgz#cd3fdafaae84f2aa2539a07b428b40f801219c5b" - integrity sha512-jIglyHF/9QdCC3662m/UMVADE6SlocBDpXdFLMZyiAfrw8MSG1pml7lwRtBMT6L/z4dddAxfzw2lpW2Vm42fyQ== +tiny-async-pool@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/tiny-async-pool/-/tiny-async-pool-1.2.0.tgz#22132957e18f8b6020a94b390d07718fd519cc71" + integrity sha512-PY/OiSenYGBU3c1nTuP1HLKRkhKFDXsAibYI5GeHbHw2WVpt6OFzAPIRP94dGnS66Jhrkheim2CHAXUNI4XwMg== dependencies: semver "^5.5.0" yaassertion "^1.0.0" From cdb583b82139e9b6530615862d500e4a6a02b289 Mon Sep 17 00:00:00 2001 From: Ethan Shen Date: Thu, 29 Oct 2020 23:38:21 +0800 Subject: [PATCH 016/645] =?UTF-8?q?fix:=20=E8=85=BE=E8=AE=AF=E6=9F=A0?= =?UTF-8?q?=E6=AA=AC=E7=B2=BE=E9=80=89=20Mac=20Apps=20(#6033)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/routes/tencent/lemon/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/routes/tencent/lemon/index.js b/lib/routes/tencent/lemon/index.js index d3816da822..ce091b811a 100644 --- a/lib/routes/tencent/lemon/index.js +++ b/lib/routes/tencent/lemon/index.js @@ -4,7 +4,7 @@ const date = require('@/utils/date'); module.exports = async (ctx) => { const url = 'https://lemon.qq.com/lab/js/source.js'; - let data = (await got.get(url)).data.match(/(?<=(var list = ))(.*)(\])/gs)[0]; + let data = (await got.get(url)).data.match(/(?<=(const list = ))(.*)(\])/gs)[0]; // eslint-disable-next-line no-eval data = eval('(' + data + ')').slice(0, 10); From ace5a1fd0dc3d393704cb47d392bd5d0f1776679 Mon Sep 17 00:00:00 2001 From: EsuRt <15177069+EsuRt@users.noreply.github.com> Date: Thu, 29 Oct 2020 23:46:00 +0800 Subject: [PATCH 017/645] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Diyouport?= =?UTF-8?q?=E5=9C=A8=E6=9F=90=E4=BA=9B=E9=98=85=E8=AF=BB=E5=99=A8=E4=B8=AD?= =?UTF-8?q?=E5=9B=BE=E7=89=87=E9=87=8D=E5=A4=8D=E6=98=BE=E7=A4=BA=E9=97=AE?= =?UTF-8?q?=E9=A2=98=20(#6007)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: EsuRt --- lib/routes/iyouport/utils.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/routes/iyouport/utils.js b/lib/routes/iyouport/utils.js index e3d7a9de00..a30b41fffc 100644 --- a/lib/routes/iyouport/utils.js +++ b/lib/routes/iyouport/utils.js @@ -9,8 +9,10 @@ const ProcessFeed = async (link) => { $('.sharedaddy.sd-sharing-enabled').remove(); $('.sharedaddy.sd-block.sd-like.jetpack-likes-widget-wrapper.jetpack-likes-widget-unloaded').remove(); $('.jp-relatedposts').remove(); - // $('img').removeAttr('data-lazy-srcset'); - // $('img').removeAttr('srcset'); + $('.entry-content noscript').remove(); + $('.entry-content img').removeAttr('data-lazy-src'); + $('.entry-content img').removeAttr('data-lazy-srcset'); + $('.entry-content img').removeAttr('srcset'); const fullText = $('.entry-content').html(); return fullText; }; From be88a822b1f2d703aa591f65b30942af3d30089d Mon Sep 17 00:00:00 2001 From: XYenon Date: Thu, 29 Oct 2020 23:54:30 +0800 Subject: [PATCH 018/645] =?UTF-8?q?feat:=20add=20=E5=93=88=E5=B0=94?= =?UTF-8?q?=E6=BB=A8=E5=B8=82=E7=A7=91=E6=8A=80=E5=B1=80=20(#6006)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/government.md | 6 ++++++ lib/router.js | 3 +++ lib/routes/gov/harbin/kjj.js | 40 ++++++++++++++++++++++++++++++++++++ 3 files changed, 49 insertions(+) create mode 100644 lib/routes/gov/harbin/kjj.js diff --git a/docs/government.md b/docs/government.md index aef1911ee4..b5f6468956 100644 --- a/docs/government.md +++ b/docs/government.md @@ -65,6 +65,12 @@ pageClass: routes +## 哈尔滨市科技局 + +### 政务公开 + + + ## 联合国 ### 安理会否决了决议 diff --git a/lib/router.js b/lib/router.js index 91b5ab1ee6..6224f0a728 100644 --- a/lib/router.js +++ b/lib/router.js @@ -3396,4 +3396,7 @@ router.get('/sagawa/:id', require('./routes/sagawa/index')); // QNAP router.get('/qnap/release-notes/:id', require('./routes/qnap/release-notes')); +// 哈尔滨市科技局 +router.get('/gov/harbin/kjj', require('./routes/gov/harbin/kjj')); + module.exports = router; diff --git a/lib/routes/gov/harbin/kjj.js b/lib/routes/gov/harbin/kjj.js new file mode 100644 index 0000000000..fef7135288 --- /dev/null +++ b/lib/routes/gov/harbin/kjj.js @@ -0,0 +1,40 @@ +const got = require('@/utils/got'); +const cheerio = require('cheerio'); +const url = require('url'); + +const baseUrl = 'http://xxgk.harbin.gov.cn'; + +module.exports = async (ctx) => { + const response = await got({ + headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, + method: 'post', + url: `${baseUrl}/module/xxgk/search.jsp?infotypeId=&vc_title=&vc_number=&area=002276772`, + body: 'infotypeId=0&jdid=2&divid=div11565&vc_title=&vc_number=&currpage=&vc_filenumber=&vc_all=&texttype=&fbtime=&infotypeId=&vc_title=&vc_number=&area=002276772', + }); + const data = response.data; + + const $ = cheerio.load(data); + const list = $('.tr_main_value_odd, .tr_main_value_even'); + let items = list.map((_, e) => ({ title: $('a', e).attr('title'), link: $('a', e).attr('href'), pubDate: $('td:nth-child(3)', e).text() })).get(); + items = await Promise.all( + items.map( + async (item) => + await ctx.cache.tryGet(item.link, async () => { + const result = await got({ method: 'get', url: item.link }); + const content = cheerio.load(result.data); + item.description = content('.bt_content') + .html() + .replace(/src="\//g, `src="${url.resolve(baseUrl, '.')}`) + .replace(/href="\//g, `href="${url.resolve(baseUrl, '.')}`) + .trim(); + return item; + }) + ) + ); + + ctx.state.data = { + title: '哈尔滨市科技局', + link: `${baseUrl}/col/col11565/index.html`, + item: items, + }; +}; From 876b9133b56104108e5e02d0e9e3a4d664143975 Mon Sep 17 00:00:00 2001 From: Jamch <34964717+jamch@users.noreply.github.com> Date: Thu, 29 Oct 2020 23:56:41 +0800 Subject: [PATCH 019/645] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=A4=A7?= =?UTF-8?q?=E9=A3=8E=E5=8F=B7api=20(#6022)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit feat: 大风号支持内嵌视频 Co-authored-by: Jamch Hong --- lib/routes/ifeng/feng.js | 2 +- lib/routes/ifeng/utils.js | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/routes/ifeng/feng.js b/lib/routes/ifeng/feng.js index d2e54cd7a6..9962bb0341 100644 --- a/lib/routes/ifeng/feng.js +++ b/lib/routes/ifeng/feng.js @@ -40,7 +40,7 @@ module.exports = async (ctx) => { const response = await got.get(link); const $ = cheerio.load(response.data); if (type === 'doc') { - const dom = new JSDOM(``, { + const dom = new JSDOM(``, { runScripts: 'dangerously', }); const data = dom.window.allData; diff --git a/lib/routes/ifeng/utils.js b/lib/routes/ifeng/utils.js index 30691f3ff7..5443c011e9 100644 --- a/lib/routes/ifeng/utils.js +++ b/lib/routes/ifeng/utils.js @@ -12,10 +12,12 @@ const extractContent = (data) => .map((item) => { const type = item.type; if (type === 'video') { - return `