From a09af933ae904f7d5aeff5194a173acbc0348b13 Mon Sep 17 00:00:00 2001 From: DIYgod Date: Tue, 21 Apr 2020 15:54:34 +0800 Subject: [PATCH 01/18] Revert "chore(deps): bump @koa/router from 8.0.8 to 9.0.0" (#4513) This reverts commit 7279d20f79e428d9d68b2cb19e717a4a8868dd22. --- package.json | 2 +- yarn.lock | 25 ++++++++++++++++--------- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 02cefd0de0..2d21fac556 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,7 @@ "yorkie": "2.0.0" }, "dependencies": { - "@koa/router": "9.0.0", + "@koa/router": "8.0.8", "@postlight/mercury-parser": "2.2.0", "@sentry/node": "5.15.4", "aes-js": "3.1.2", diff --git a/yarn.lock b/yarn.lock index db743498a1..68b05e8f95 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1218,16 +1218,16 @@ "@types/yargs" "^15.0.0" chalk "^3.0.0" -"@koa/router@9.0.0": - version "9.0.0" - resolved "https://registry.yarnpkg.com/@koa/router/-/router-9.0.0.tgz#ceec54a20f5e34b19091b4e0c8fea8d00a4a0ad8" - integrity sha512-JPi8XHgCrHkc81V7vrwuTJIFM51BNt4WryOd+0t4mCouuT5HpZa/VOzrT0Ts/ksa3b1ZyBHZeARtGObPoMHEdg== +"@koa/router@8.0.8": + version "8.0.8" + resolved "https://registry.yarnpkg.com/@koa/router/-/router-8.0.8.tgz#95f32d11373d03d89dcb63fabe9ac6f471095236" + integrity sha512-FnT93N4NUehnXr+juupDmG2yfi0JnWdCmNEuIXpCG4TtG+9xvtrLambBH3RclycopVUOEYAim2lydiNBI7IRVg== dependencies: debug "^4.1.1" http-errors "^1.7.3" koa-compose "^4.1.0" methods "^1.1.2" - path-to-regexp "^6.1.0" + path-to-regexp "1.x" urijs "^1.19.2" "@mrmlnc/readdir-enhanced@^2.2.1": @@ -6641,6 +6641,11 @@ is-yarn-global@^0.3.0: resolved "https://registry.yarnpkg.com/is-yarn-global/-/is-yarn-global-0.3.0.tgz#d502d3382590ea3004893746754c89139973e232" integrity sha512-VjSeb/lHmkoyd8ryPVIKvOCn4D1koMqY+vqyjjUfc3xyKtP4dYOxM44sZrnqQSzSds3xyOrUTLTC9LVCVgLngw== +isarray@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" + integrity sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8= + isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" @@ -9015,10 +9020,12 @@ path-to-regexp@0.1.7: resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" integrity sha1-32BBeABfUi8V60SQ5yR6G/qmf4w= -path-to-regexp@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-6.1.0.tgz#0b18f88b7a0ce0bfae6a25990c909ab86f512427" - integrity sha512-h9DqehX3zZZDCEm+xbfU0ZmwCGFCAAraPJWMXJ4+v32NjZJilVg3k1TcKsRgIb8IQ/izZSaydDc1OhJCZvs2Dw== +path-to-regexp@1.x: + version "1.8.0" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-1.8.0.tgz#887b3ba9d84393e87a0a0b9f4cb756198b53548a" + integrity sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA== + dependencies: + isarray "0.0.1" path-type@^3.0.0: version "3.0.0" From 4f2ace0e8edb1224c03b947b2db7c702de088aba Mon Sep 17 00:00:00 2001 From: mifang Date: Tue, 21 Apr 2020 19:44:52 +0800 Subject: [PATCH 02/18] =?UTF-8?q?feat:=20youtube=E8=B7=AF=E7=94=B1?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0maxResults=E5=8F=82=E6=95=B0=EF=BC=8C?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E5=8A=A8=E6=80=81=E4=BC=A0=E5=85=A5=E6=9C=80?= =?UTF-8?q?=E5=A4=A7=E8=BF=94=E5=9B=9E=E7=BB=93=E6=9E=9C=E6=95=B0=20(#4495?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/routes/youtube/utils.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/routes/youtube/utils.js b/lib/routes/youtube/utils.js index 0a9c1d67b9..c796ae8c76 100644 --- a/lib/routes/youtube/utils.js +++ b/lib/routes/youtube/utils.js @@ -29,6 +29,7 @@ const youtubeUtils = { const res = await getYoutube().playlistItems.list({ part, playlistId: id, + maxResults: 50, // youtube api param value default is 5 }); return res; }, From 8d61595d3fdad6e9f0bba2a43bc8f99f550484a3 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 21 Apr 2020 11:46:11 +0000 Subject: [PATCH 03/18] chore(deps): bump dayjs from 1.8.24 to 1.8.25 Bumps [dayjs](https://github.com/iamkun/dayjs) from 1.8.24 to 1.8.25. - [Release notes](https://github.com/iamkun/dayjs/releases) - [Changelog](https://github.com/iamkun/dayjs/blob/v1.8.25/CHANGELOG.md) - [Commits](https://github.com/iamkun/dayjs/compare/v1.8.24...v1.8.25) 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 2d21fac556..c66d7de789 100644 --- a/package.json +++ b/package.json @@ -70,7 +70,7 @@ "co-redis": "2.1.1", "crypto-js": "4.0.0", "currency-symbol-map": "4.0.4", - "dayjs": "1.8.24", + "dayjs": "1.8.25", "dotenv": "8.2.0", "emailjs-imap-client": "3.1.0", "etag": "1.8.1", diff --git a/yarn.lock b/yarn.lock index 68b05e8f95..3b251567b9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4020,10 +4020,10 @@ date-now@^0.1.4: resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b" integrity sha1-6vQ5/U1ISK105cx9vvIAZyueNFs= -dayjs@1.8.24, dayjs@^1.8.19: - version "1.8.24" - resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.8.24.tgz#2ef8a2ab9425eaf3318fe78825be1c571027488d" - integrity sha512-bImQZbBv86zcOWOq6fLg7r4aqMx8fScdmykA7cSh+gH1Yh8AM0Dbw0gHYrsOrza6oBBnkK+/OaR+UAa9UsMrDw== +dayjs@1.8.25, dayjs@^1.8.19: + version "1.8.25" + resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.8.25.tgz#d09a8696cee7191bc1289e739f96626391b9c73c" + integrity sha512-Pk36juDfQQGDCgr0Lqd1kw15w3OS6xt21JaLPE3lCfsEf8KrERGwDNwvK1tRjrjqFC0uZBJncT4smZQ4F+uV5g== de-indent@^1.0.2: version "1.0.2" From 16041e7aa364a2ac4e427e1269fb390d10cab4b4 Mon Sep 17 00:00:00 2001 From: Xunco Date: Tue, 21 Apr 2020 19:46:23 +0800 Subject: [PATCH 04/18] fix: facebook pages not working (#4501) --- lib/routes/facebook/page.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/routes/facebook/page.js b/lib/routes/facebook/page.js index c2f0c3a105..7f9ba36d94 100644 --- a/lib/routes/facebook/page.js +++ b/lib/routes/facebook/page.js @@ -80,9 +80,10 @@ module.exports = async (ctx) => { const html = await fetchPageHtml(linkPath, pageId, ctx.cache); const $ = cheerio.load(html); - const itemLinks = $('div[role=article] > div:nth-child(2) > div:nth-child(2)') + const itemLinks = $('footer > div:nth-child(2) > a:nth-child(1)') .toArray() - .map((div) => $(div).find('a').last().attr('href')); + .map((a) => $(a).attr('href')); + const items = await Promise.all( itemLinks.map(async (itemLink) => { if (new RegExp(`^/.+/photos/`).test(itemLink)) { From f76f5867849e9cbe5c41ceae140dd9c065dfe5a1 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 21 Apr 2020 17:13:12 +0000 Subject: [PATCH 05/18] chore(deps-dev): bump prettier from 2.0.4 to 2.0.5 Bumps [prettier](https://github.com/prettier/prettier) from 2.0.4 to 2.0.5. - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/2.0.5/CHANGELOG.md) - [Commits](https://github.com/prettier/prettier/compare/2.0.4...2.0.5) 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 c66d7de789..edca786d41 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "nodejieba": "2.4.1", "nodemon": "2.0.3", "pinyin": "2.9.0", - "prettier": "2.0.4", + "prettier": "2.0.5", "prettier-check": "2.0.0", "pretty-quick": "2.0.1", "supertest": "4.0.2", diff --git a/yarn.lock b/yarn.lock index 3b251567b9..dab1326141 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9566,10 +9566,10 @@ prettier@1.16.3: resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.16.3.tgz#8c62168453badef702f34b45b6ee899574a6a65d" integrity sha512-kn/GU6SMRYPxUakNXhpP0EedT/KmaPzr0H5lIsDogrykbaxOpOfAFfk5XA7DZrJyMAv1wlMV3CPcZruGXVVUZw== -prettier@2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.0.4.tgz#2d1bae173e355996ee355ec9830a7a1ee05457ef" - integrity sha512-SVJIQ51spzFDvh4fIbCLvciiDMCrRhlN3mbZvv/+ycjvmF5E73bKdGfU8QDLNmjYJf+lsGnDBC4UUnvTe5OO0w== +prettier@2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.0.5.tgz#d6d56282455243f2f92cc1716692c08aa31522d4" + integrity sha512-7PtVymN48hGcO4fGjybyBSIWDsLU4H4XlvOHfq91pz9kkGlonzwTfYkaIEwiRg/dAJF9YlbsduBAgtYLi+8cFg== pretty-bytes@^5.1.0: version "5.2.0" From d585ec4ed65b897d8e3b276e529f3fd430130e7a Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 21 Apr 2020 19:31:09 +0000 Subject: [PATCH 06/18] chore(deps-dev): bump eslint-config-prettier from 6.10.1 to 6.11.0 Bumps [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) from 6.10.1 to 6.11.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.10.1...v6.11.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 edca786d41..91a6ce0c92 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "cross-env": "7.0.2", "entities": "2.0.0", "eslint": "6.8.0", - "eslint-config-prettier": "6.10.1", + "eslint-config-prettier": "6.11.0", "eslint-plugin-prettier": "3.1.3", "jest": "25.4.0", "mockdate": "2.0.5", diff --git a/yarn.lock b/yarn.lock index dab1326141..5777248bef 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4682,10 +4682,10 @@ escodegen@^1.11.1, escodegen@^1.14.1, escodegen@^1.8.1, escodegen@^1.9.1: optionalDependencies: source-map "~0.6.1" -eslint-config-prettier@6.10.1: - version "6.10.1" - resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-6.10.1.tgz#129ef9ec575d5ddc0e269667bf09defcd898642a" - integrity sha512-svTy6zh1ecQojvpbJSgH3aei/Rt7C6i090l5f2WQ4aB05lYHeZIR1qL4wZyyILTbtmnbHP5Yn8MrsOJMGa8RkQ== +eslint-config-prettier@6.11.0: + version "6.11.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-6.11.0.tgz#f6d2238c1290d01c859a8b5c1f7d352a0b0da8b1" + integrity sha512-oB8cpLWSAjOVFEJhhyMZh6NOEOtBVziaqdDQ86+qhDHFbZXoRTM7pNSvFRfW/W/L/LrQ38C99J5CGuRBBzBsdA== dependencies: get-stdin "^6.0.0" From 7abf4a3994f29041e1e529afe60921af7ff18f50 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 22 Apr 2020 11:35:23 +0000 Subject: [PATCH 07/18] chore(deps): bump @sentry/node from 5.15.4 to 5.15.5 Bumps [@sentry/node](https://github.com/getsentry/sentry-javascript) from 5.15.4 to 5.15.5. - [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.15.4...5.15.5) Signed-off-by: dependabot-preview[bot] --- package.json | 2 +- yarn.lock | 108 +++++++++++++++++++++++++-------------------------- 2 files changed, 55 insertions(+), 55 deletions(-) diff --git a/package.json b/package.json index 91a6ce0c92..55b114d4e8 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,7 @@ "dependencies": { "@koa/router": "8.0.8", "@postlight/mercury-parser": "2.2.0", - "@sentry/node": "5.15.4", + "@sentry/node": "5.15.5", "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 5777248bef..747dcda30a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1283,83 +1283,83 @@ dependencies: safe-buffer "^5.0.1" -"@sentry/apm@5.15.4": - version "5.15.4" - resolved "https://registry.yarnpkg.com/@sentry/apm/-/apm-5.15.4.tgz#59af766d2bb4c9d98eda5ddba7a32a79ecc807a2" - integrity sha512-gcW225Jls1ShyBXMWN6zZyuVJwBOIQ63sI+URI2NSFsdpBpdpZ8yennIm+oMlSfb25Nzt9SId7TRSjPhlSbTZQ== +"@sentry/apm@5.15.5": + version "5.15.5" + resolved "https://registry.yarnpkg.com/@sentry/apm/-/apm-5.15.5.tgz#dc0515f16405de52b3ba0d26f8a6dc2fcefe5fcc" + integrity sha512-2PyifsiQdvFEQhbL7tQnCKGLOO1JtZeqso3bc6ARJBvKxM77mtyMo/D0C2Uzt9sXCYiALhQ1rbB1aY8iYyglpg== dependencies: - "@sentry/browser" "5.15.4" - "@sentry/hub" "5.15.4" - "@sentry/minimal" "5.15.4" - "@sentry/types" "5.15.4" - "@sentry/utils" "5.15.4" + "@sentry/browser" "5.15.5" + "@sentry/hub" "5.15.5" + "@sentry/minimal" "5.15.5" + "@sentry/types" "5.15.5" + "@sentry/utils" "5.15.5" tslib "^1.9.3" -"@sentry/browser@5.15.4": - version "5.15.4" - resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-5.15.4.tgz#5a7e7bad088556665ed8e69bceb0e18784e4f6c7" - integrity sha512-l/auT1HtZM3KxjCGQHYO/K51ygnlcuOrM+7Ga8gUUbU9ZXDYw6jRi0+Af9aqXKmdDw1naNxr7OCSy6NBrLWVZw== +"@sentry/browser@5.15.5": + version "5.15.5" + resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-5.15.5.tgz#d9a51f1388581067b50d30ed9b1aed2cbb333a36" + integrity sha512-rqDvjk/EvogfdbZ4TiEpxM/lwpPKmq23z9YKEO4q81+1SwJNua53H60dOk9HpRU8nOJ1g84TMKT2Ov8H7sqDWA== dependencies: - "@sentry/core" "5.15.4" - "@sentry/types" "5.15.4" - "@sentry/utils" "5.15.4" + "@sentry/core" "5.15.5" + "@sentry/types" "5.15.5" + "@sentry/utils" "5.15.5" tslib "^1.9.3" -"@sentry/core@5.15.4": - version "5.15.4" - resolved "https://registry.yarnpkg.com/@sentry/core/-/core-5.15.4.tgz#08b617e093a636168be5aebad141d1f744217085" - integrity sha512-9KP4NM4SqfV5NixpvAymC7Nvp36Zj4dU2fowmxiq7OIbzTxGXDhwuN/t0Uh8xiqlkpkQqSECZ1OjSFXrBldetQ== +"@sentry/core@5.15.5": + version "5.15.5" + resolved "https://registry.yarnpkg.com/@sentry/core/-/core-5.15.5.tgz#40ea79bff5272d3fbbeeb4a98cdc59e1adbd2c92" + integrity sha512-enxBLv5eibBMqcWyr+vApqeix8uqkfn0iGsD3piKvoMXCgKsrfMwlb/qo9Ox0lKr71qIlZVt+9/A2vZohdgnlg== dependencies: - "@sentry/hub" "5.15.4" - "@sentry/minimal" "5.15.4" - "@sentry/types" "5.15.4" - "@sentry/utils" "5.15.4" + "@sentry/hub" "5.15.5" + "@sentry/minimal" "5.15.5" + "@sentry/types" "5.15.5" + "@sentry/utils" "5.15.5" tslib "^1.9.3" -"@sentry/hub@5.15.4": - version "5.15.4" - resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-5.15.4.tgz#cb64473725a60eec63b0be58ed1143eaaf894bee" - integrity sha512-1XJ1SVqadkbUT4zLS0TVIVl99si7oHizLmghR8LMFl5wOkGEgehHSoOydQkIAX2C7sJmaF5TZ47ORBHgkqclUg== +"@sentry/hub@5.15.5": + version "5.15.5" + resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-5.15.5.tgz#f5abbcdbe656a70e2ff02c02a5a4cffa0f125935" + integrity sha512-zX9o49PcNIVMA4BZHe//GkbQ4Jx+nVofqU/Il32/IbwKhcpPlhGX3c1sOVQo4uag3cqd/JuQsk+DML9TKkN0Lw== dependencies: - "@sentry/types" "5.15.4" - "@sentry/utils" "5.15.4" + "@sentry/types" "5.15.5" + "@sentry/utils" "5.15.5" tslib "^1.9.3" -"@sentry/minimal@5.15.4": - version "5.15.4" - resolved "https://registry.yarnpkg.com/@sentry/minimal/-/minimal-5.15.4.tgz#113f01fefb86b7830994c3dfa7ad4889ba7b2003" - integrity sha512-GL4GZ3drS9ge+wmxkHBAMEwulaE7DMvAEfKQPDAjg2p3MfcCMhAYfuY4jJByAC9rg9OwBGGehz7UmhWMFjE0tw== +"@sentry/minimal@5.15.5": + version "5.15.5" + resolved "https://registry.yarnpkg.com/@sentry/minimal/-/minimal-5.15.5.tgz#a0e4e071f01d9c4d808094ae7203f6c4cca9348a" + integrity sha512-zQkkJ1l9AjmU/Us5IrOTzu7bic4sTPKCatptXvLSTfyKW7N6K9MPIIFeSpZf9o1yM2sRYdK7GV08wS2eCT3JYw== dependencies: - "@sentry/hub" "5.15.4" - "@sentry/types" "5.15.4" + "@sentry/hub" "5.15.5" + "@sentry/types" "5.15.5" tslib "^1.9.3" -"@sentry/node@5.15.4": - version "5.15.4" - resolved "https://registry.yarnpkg.com/@sentry/node/-/node-5.15.4.tgz#e7bc3962d321a12b633743200165ca5f1757cb68" - integrity sha512-OfdhNEvOJZ55ZkCUcVgctjaZkOw7rmLzO5VyDTSgevA4uLsPaTNXSAeK2GSQBXc5J0KdRpNz4sSIyuxOS4Z7Vg== +"@sentry/node@5.15.5": + version "5.15.5" + resolved "https://registry.yarnpkg.com/@sentry/node/-/node-5.15.5.tgz#f64cfcf8770cc0249f48b3ef439a7efcabdcec1d" + integrity sha512-BK0iTOiiIM0UnydLeT/uUBY1o1Sp85aqwaQRMfZbjMCsgXERLNGvzzV68FDH1cyC1nR6dREK3Gs8bxS4S54aLQ== dependencies: - "@sentry/apm" "5.15.4" - "@sentry/core" "5.15.4" - "@sentry/hub" "5.15.4" - "@sentry/types" "5.15.4" - "@sentry/utils" "5.15.4" + "@sentry/apm" "5.15.5" + "@sentry/core" "5.15.5" + "@sentry/hub" "5.15.5" + "@sentry/types" "5.15.5" + "@sentry/utils" "5.15.5" cookie "^0.3.1" https-proxy-agent "^4.0.0" lru_map "^0.3.3" tslib "^1.9.3" -"@sentry/types@5.15.4": - version "5.15.4" - resolved "https://registry.yarnpkg.com/@sentry/types/-/types-5.15.4.tgz#37f30e35b06e8e12ad1101f1beec3e9b88ca1aab" - integrity sha512-quPHPpeAuwID48HLPmqBiyXE3xEiZLZ5D3CEbU3c3YuvvAg8qmfOOTI6z4Z3Eedi7flvYpnx3n7N3dXIEz30Eg== +"@sentry/types@5.15.5": + version "5.15.5" + resolved "https://registry.yarnpkg.com/@sentry/types/-/types-5.15.5.tgz#16c97e464cf09bbd1d2e8ce90d130e781709076e" + integrity sha512-F9A5W7ucgQLJUG4LXw1ZIy4iLevrYZzbeZ7GJ09aMlmXH9PqGThm1t5LSZlVpZvUfQ2rYA8NU6BdKJSt7B5LPw== -"@sentry/utils@5.15.4": - version "5.15.4" - resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-5.15.4.tgz#02865ab3c9b745656cea0ab183767ec26c96f6e6" - integrity sha512-lO8SLBjrUDGADl0LOkd55R5oL510d/1SaI08/IBHZCxCUwI4TiYo5EPECq8mrj3XGfgCyq9osw33bymRlIDuSQ== +"@sentry/utils@5.15.5": + version "5.15.5" + resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-5.15.5.tgz#dec1d4c79037c4da08b386f5d34409234dcbfb15" + integrity sha512-Nl9gl/MGnzSkuKeo3QaefoD/OJrFLB8HmwQ7HUbTXb6E7yyEzNKAQMHXGkwNAjbdYyYbd42iABP6Y5F/h39NtA== dependencies: - "@sentry/types" "5.15.4" + "@sentry/types" "5.15.5" tslib "^1.9.3" "@sindresorhus/is@^0.14.0": From 48c7da4bba6bf2a24e5dff89df19b8695eabd169 Mon Sep 17 00:00:00 2001 From: hoilc Date: Wed, 22 Apr 2020 19:45:56 +0800 Subject: [PATCH 08/18] fix: remove trailing slash (#4502) --- lib/router.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/router.js b/lib/router.js index 29d440f8cd..bf2a436206 100644 --- a/lib/router.js +++ b/lib/router.js @@ -30,7 +30,7 @@ router.get('/rsshub/routes', require('./routes/rsshub/routes')); router.get('/rsshub/sponsors', require('./routes/rsshub/sponsors')); // 1draw -router.get('/1draw/', require('./routes/1draw/index')); +router.get('/1draw', require('./routes/1draw/index')); // 1X Magazine router.get('/1x/magazine', require('./routes/1x/magazine')); @@ -143,7 +143,7 @@ router.get('/mzitu/tag/:tag', require('./routes/mzitu/tag')); // pixiv router.get('/pixiv/user/bookmarks/:id', require('./routes/pixiv/bookmarks')); router.get('/pixiv/user/illustfollows', require('./routes/pixiv/illustfollow')); -router.get('/pixiv/user/:id/', require('./routes/pixiv/user')); +router.get('/pixiv/user/:id', require('./routes/pixiv/user')); router.get('/pixiv/ranking/:mode/:date?', require('./routes/pixiv/ranking')); router.get('/pixiv/search/:keyword/:order?/:r18?', require('./routes/pixiv/search')); @@ -694,8 +694,8 @@ router.get('/whu/news/:type?', require('./routes/universities/whu/news')); // 华中科技大学 router.get('/hust/auto/notice/:type?', require('./routes/universities/hust/aia/notice')); -router.get('/hust/auto/news/', require('./routes/universities/hust/aia/news')); -router.get('/hust/aia/news/', require('./routes/universities/hust/aia/news')); +router.get('/hust/auto/news', require('./routes/universities/hust/aia/news')); +router.get('/hust/aia/news', require('./routes/universities/hust/aia/news')); router.get('/hust/aia/notice/:type?', require('./routes/universities/hust/aia/notice')); // 井冈山大学 @@ -778,7 +778,7 @@ router.get('/guokr/:channel', require('./routes/guokr/calendar')); // 联合早报 router.get('/zaobao/realtime/:section?', require('./routes/zaobao/realtime')); router.get('/zaobao/znews/:section?', require('./routes/zaobao/znews')); -router.get('/zaobao/:type/:section', require('./routes/zaobao/')); +router.get('/zaobao/:type/:section', require('./routes/zaobao/index')); // Apple router.get('/apple/exchange_repair/:country?', require('./routes/apple/exchange_repair')); @@ -1228,7 +1228,7 @@ router.get('/wenku8/chapter/:id', require('./routes/wenku8/chapter')); // 鲸跃汽车 router.get('/whalegogo/home', require('./routes/whalegogo/home')); -router.get('/whalegogo/portal/:type_id/:tagid?/', require('./routes/whalegogo/portal')); +router.get('/whalegogo/portal/:type_id/:tagid?', require('./routes/whalegogo/portal')); // 爱思想 router.get('/aisixiang/column/:id', require('./routes/aisixiang/column')); @@ -1379,7 +1379,7 @@ router.get('/zju/cst/:type', require('./routes/universities/zju/cst')); // 浙江大学城市学院 router.get('/zucc/news/latest', require('./routes/universities/zucc/news')); -router.get('/zucc/cssearch/latest/:webVpn/:key/', require('./routes/universities/zucc/cssearch')); +router.get('/zucc/cssearch/latest/:webVpn/:key', require('./routes/universities/zucc/cssearch')); // 华中师范大学 router.get('/ccnu/career', require('./routes/universities/ccnu/career')); @@ -1898,11 +1898,11 @@ router.get('/latexstudio/home', require('./routes/latexstudio/home')); // 上证债券信息网 - 可转换公司债券公告 router.get('/sse/convert/:query?', require('./routes/sse/convert')); -router.get('/sse/renewal/', require('./routes/sse/renewal')); -router.get('/sse/inquire/', require('./routes/sse/inquire')); +router.get('/sse/renewal', require('./routes/sse/renewal')); +router.get('/sse/inquire', require('./routes/sse/inquire')); // 深圳证券交易所——上市公告 -router.get('/szse/notice/', require('./routes/szse/notice')); +router.get('/szse/notice', require('./routes/szse/notice')); router.get('/szse/inquire/:type', require('./routes/szse/inquire')); // 前端艺术家每日整理&&飞冰早报 From f2dd2751205da794ec186492cde0848122d65139 Mon Sep 17 00:00:00 2001 From: mifang Date: Wed, 22 Apr 2020 20:08:01 +0800 Subject: [PATCH 09/18] =?UTF-8?q?feat:=20=E8=BF=BD=E6=96=B0=E7=95=AA,=20et?= =?UTF-8?q?oland=E5=A2=9E=E5=8A=A0radar=E8=A7=84=E5=88=99=20(#4521)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/radar-rules.js | 22 ++++++++++++++++++++++ docs/bbs.md | 2 +- docs/multimedia.md | 2 +- 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a/assets/radar-rules.js b/assets/radar-rules.js index 5d5c74edea..2e6057168f 100644 --- a/assets/radar-rules.js +++ b/assets/radar-rules.js @@ -1678,4 +1678,26 @@ }, ], }, + 'zhuixinfan.com': { + _name: '追新番日剧站', + '.': [ + { + title: '更新列表', + docs: 'https://docs.rsshub.app/multimedia.html#zhui-xin-fan-ri-ju-zhan', + source: ['/main.php'], + target: '/zhuixinfan/list', + }, + ], + }, + 'etoland.co.kr': { + _name: 'eTOLAND', + '.': [ + { + title: '主题贴', + docs: 'https://docs.rsshub.app/bbs.html#etoland', + source: ['/bbs/board.php', '/plugin/mobile/board.php'], + target: (url) => `/etoland/${new URL(url).searchParams.get('bo_table')}`, + }, + ], + }, }); diff --git a/docs/bbs.md b/docs/bbs.md index 1ed898fbbc..cddea5504d 100644 --- a/docs/bbs.md +++ b/docs/bbs.md @@ -86,7 +86,7 @@ pageClass: routes ### 主题贴 - + ## LearnKu diff --git a/docs/multimedia.md b/docs/multimedia.md index 17836e7608..50dded82c3 100644 --- a/docs/multimedia.md +++ b/docs/multimedia.md @@ -474,7 +474,7 @@ pageClass: routes ### 更新列表 - + ## 字幕库 From c55867fa55ab18c517540965770dc9e5fc5d8e84 Mon Sep 17 00:00:00 2001 From: MisteryMonster <40703811+MisteryMonster@users.noreply.github.com> Date: Wed, 22 Apr 2020 20:30:43 +0800 Subject: [PATCH 10/18] =?UTF-8?q?feat:=20=E4=BF=AE=E5=A4=8D=E8=B7=AF?= =?UTF-8?q?=E7=94=B1=20=E9=A2=84=E6=8A=A5=E9=A2=84=E8=AD=A6|=E5=85=A8?= =?UTF-8?q?=E5=9B=BD=E6=B0=94=E8=B1=A1=E9=A2=84=E8=AD=A6=20(#4511)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/forecast.md | 2 +- lib/router.js | 2 +- lib/routes/weatheralarm/index.js | 28 +++++++++++++++------------- 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/docs/forecast.md b/docs/forecast.md index 9d87c667ce..cea9fb737d 100644 --- a/docs/forecast.md +++ b/docs/forecast.md @@ -98,7 +98,7 @@ pageClass: routes ### 全国气象预警 - + 可通过全局过滤参数订阅您感兴趣的地区. diff --git a/lib/router.js b/lib/router.js index bf2a436206..a415d610be 100644 --- a/lib/router.js +++ b/lib/router.js @@ -528,7 +528,7 @@ router.get('/novel/ptwxz/:id1/:id2', require('./routes/novel/ptwxz')); router.get('/novel/zhaishuyuan/:id', require('./routes/novel/zhaishuyuan')); // 中国气象网 -router.get('/weatheralarm', require('./routes/weatheralarm')); +router.get('/weatheralarm/:province?', require('./routes/weatheralarm')); // Gitlab router.get('/gitlab/explore/:type', require('./routes/gitlab/explore')); diff --git a/lib/routes/weatheralarm/index.js b/lib/routes/weatheralarm/index.js index f41b9815f6..4537ef7f91 100644 --- a/lib/routes/weatheralarm/index.js +++ b/lib/routes/weatheralarm/index.js @@ -1,23 +1,25 @@ const got = require('@/utils/got'); -const cheerio = require('cheerio'); -const date = require('@/utils/date'); module.exports = async (ctx) => { - const alarmInfoURL = 'http://www.nmc.cn/f/alarm.html'; - const html = (await got.get(alarmInfoURL)).data; - const $ = cheerio.load(html); - const alarmElements = $('.alarmlist > div:not(.pagination)').toArray(); + const province = encodeURIComponent(ctx.params.province) || '&'; + const alarmInfoURL = `http://www.nmc.cn/rest/findAlarm?pageNo=1&pageSize=20&signaltype=&signallevel=&province=${province}`; + const response = await got({ + method: 'get', + url: alarmInfoURL, + }); + const data = response.data.data; + const list = data.page.list; ctx.state.data = { title: '中央气象台全国气象预警', - link: alarmInfoURL, - item: alarmElements.map((el) => { - const $el = $(el); - const $aEl = $el.find('a'); + link: `http://www.nmc.cn/publish/alarm.html`, + item: list.map((item) => { + const title = item.title; + const url = item.url; return { - title: $aEl.text(), - link: `http://www.nmc.cn${$aEl.attr('href')}`, - pubDate: date($el.find('.date').text(), 8), + title: `${title}`, + link: `http://www.nmc.cn${url}`, + pubDate: `${item.issuetime}`, }; }), }; From 3b8143b09ec2562efaee4d1859895aa943994984 Mon Sep 17 00:00:00 2001 From: zhangpeng2k <32725281+zhangpeng2k@users.noreply.github.com> Date: Wed, 22 Apr 2020 07:31:29 -0500 Subject: [PATCH 11/18] =?UTF-8?q?feat:=20add=20ScoreSaber=20=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E5=8A=A8=E6=80=81=20(#4531)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/game.md | 5 ++++ lib/router.js | 3 +++ lib/routes/scoresaber/user.js | 44 +++++++++++++++++++++++++++++++++++ 3 files changed, 52 insertions(+) create mode 100644 lib/routes/scoresaber/user.js diff --git a/docs/game.md b/docs/game.md index 437cee6217..469d6bc358 100644 --- a/docs/game.md +++ b/docs/game.md @@ -174,6 +174,11 @@ pageClass: routes +## ScoreSaber + +### 用户动态 + + ## Steam ### Steam search diff --git a/lib/router.js b/lib/router.js index a415d610be..d55e276812 100644 --- a/lib/router.js +++ b/lib/router.js @@ -2555,4 +2555,7 @@ router.get('/51voa/:channel', require('./routes/51voa/channel')); // zhuixinfan router.get('/zhuixinfan/list', require('./routes/zhuixinfan/list')); +// scoresaber +router.get('/scoresaber/user/:id', require('./routes/scoresaber/user')); + module.exports = router; diff --git a/lib/routes/scoresaber/user.js b/lib/routes/scoresaber/user.js new file mode 100644 index 0000000000..f39f2091c8 --- /dev/null +++ b/lib/routes/scoresaber/user.js @@ -0,0 +1,44 @@ +const got = require('@/utils/got'); +const cheerio = require('cheerio'); + +module.exports = async (ctx) => { + const id = ctx.params.id; + const hostname = 'https://scoresaber.com'; + + const response = await got({ + method: 'get', + url: `${hostname}/u/${id}&sort=2`, + }); + + const $ = cheerio.load(response.data); + + const username = $('.is-5 a').text(); + const list = $('tbody tr').reverse(); + + const result1 = list + .map((index, item) => { + item = $(item); + const song = item.find('.songTop.pp').text(); + const mapper = item.find('.songTop.mapper').text(); + const rank = item.find('.rank').text(); + const time = item.find('.time').attr('title'); + const ppValue = item.find('.ppValue').text(); + const ppWeightedValue = item.find('.ppWeightedValue').text(); + const scoreBottom = item.find('.scoreBottom').text(); + + return { + title: `【${song}】${mapper} ${time} ${rank} PP:${ppValue}${ppWeightedValue} - ${scoreBottom}`, + description: $('.box:first-child').html(), + link: hostname + item.find('a').attr('href') + '?search=' + username, + pubDate: time, + author: 'scoresaber', + }; + }) + .get(); + + ctx.state.data = { + title: `${username}的ScoreSaber动态`, + link: `https://scoresaber.com/u/${id}&sort=2`, + item: result1, + }; +}; From 67a480dccf837fc622245e190d542abcb773a3d2 Mon Sep 17 00:00:00 2001 From: zhangpeng2k <32725281+zhangpeng2k@users.noreply.github.com> Date: Wed, 22 Apr 2020 09:18:51 -0500 Subject: [PATCH 12/18] docs: fix link (#4532) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix: 修复链接错误 --- docs/game.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/game.md b/docs/game.md index 469d6bc358..ba6bad0af8 100644 --- a/docs/game.md +++ b/docs/game.md @@ -178,7 +178,8 @@ pageClass: routes ### 用户动态 - + + ## Steam ### Steam search From a82d56a464c25effe8eaef262c9894894e36a746 Mon Sep 17 00:00:00 2001 From: MisteryMonster <40703811+MisteryMonster@users.noreply.github.com> Date: Wed, 22 Apr 2020 22:37:57 +0800 Subject: [PATCH 13/18] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=85=A8?= =?UTF-8?q?=E5=9B=BD=E6=B0=94=E8=B1=A1=E9=A2=84=E8=AD=A6=E7=A9=BA=E8=B7=AF?= =?UTF-8?q?=E7=94=B1=20(#4534)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/routes/weatheralarm/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/routes/weatheralarm/index.js b/lib/routes/weatheralarm/index.js index 4537ef7f91..810601299a 100644 --- a/lib/routes/weatheralarm/index.js +++ b/lib/routes/weatheralarm/index.js @@ -1,7 +1,7 @@ const got = require('@/utils/got'); module.exports = async (ctx) => { - const province = encodeURIComponent(ctx.params.province) || '&'; + const province = ctx.params.province || '&'; const alarmInfoURL = `http://www.nmc.cn/rest/findAlarm?pageNo=1&pageSize=20&signaltype=&signallevel=&province=${province}`; const response = await got({ method: 'get', From 4384214326db67eb08c6a0e94bb7a634f01dfab7 Mon Sep 17 00:00:00 2001 From: fengkx Date: Thu, 23 Apr 2020 19:18:47 +0800 Subject: [PATCH 14/18] feat: robots not index config (#4503) --- docs/en/install/README.md | 2 ++ docs/install/README.md | 2 ++ lib/config.js | 1 + lib/router.js | 11 +++++++++++ lib/routes/index.js | 2 ++ lib/views/welcome.art | 3 +++ test/router.js | 13 +++++++++++++ 7 files changed, 34 insertions(+) diff --git a/docs/en/install/README.md b/docs/en/install/README.md index 736764cb3d..f61113f08b 100644 --- a/docs/en/install/README.md +++ b/docs/en/install/README.md @@ -347,6 +347,8 @@ Access control includes a whitelist and a blacklist, support IP and route, use ` `SENTRY`: [Sentry](https://sentry.io) dsn, used for error tracking +`DISALLOW_ROBOT`: prevent indexing by search engine + ### Route-specific Configurations - pixiv: [Registration](https://accounts.pixiv.net/signup) diff --git a/docs/install/README.md b/docs/install/README.md index 561ef2904d..5393e32fa9 100644 --- a/docs/install/README.md +++ b/docs/install/README.md @@ -351,6 +351,8 @@ RSSHub 支持 `memory` 和 `redis` 两种缓存方式 `SENTRY`: [Sentry](https://sentry.io) dsn,用于错误追踪 +`DISALLOW_ROBOT`: 防止被搜索引擎收录 + ### 部分 RSS 模块配置 - pixiv 全部路由: [注册地址](https://accounts.pixiv.net/signup) diff --git a/lib/config.js b/lib/config.js index d9691ed51a..cf17473e7b 100644 --- a/lib/config.js +++ b/lib/config.js @@ -40,6 +40,7 @@ const calculateValue = () => { requestRetry: parseInt(envs.REQUEST_RETRY) || 2, // 请求失败重试次数 // 是否显示 Debug 信息,取值 boolean 'false' 'key' ,取值为 'false' false 时永远不显示,取值为 'key' 时带上 ?debug=key 显示 debugInfo: envs.DEBUG_INFO || true, + disallowRobot: envs.DISALLOW_ROBOT !== '0' && envs.DISALLOW_ROBOT !== 'false', titleLengthLimit: parseInt(envs.TITLE_LENGTH_LIMIT) || 150, redis: { url: envs.REDIS_URL || 'redis://localhost:6379/', diff --git a/lib/router.js b/lib/router.js index d55e276812..1c53c2dc6f 100644 --- a/lib/router.js +++ b/lib/router.js @@ -1,4 +1,5 @@ const Router = require('@koa/router'); +const config = require('@/config').value; const router = new Router(); // 遍历整个 routes 文件夹,导入模块路由 router.js 和 router-custom.js 文件 @@ -24,6 +25,16 @@ router.get('/', require('./routes/index')); // test router.get('/test/:id', require('./routes/test')); +router.get('/robots.txt', async (ctx, next) => { + if (config.disallowRobot) { + ctx.set('Content-Type', 'text/plain'); + ctx.body = 'User-agent: *\nDisallow: /'; + } else { + ctx.throw(404, 'Not Found'); + } + await next(); +}); + // RSSHub router.get('/rsshub/rss', require('./routes/rsshub/routes')); // 弃用 router.get('/rsshub/routes', require('./routes/rsshub/routes')); diff --git a/lib/routes/index.js b/lib/routes/index.js index e55db0c95e..cef9fa9fca 100644 --- a/lib/routes/index.js +++ b/lib/routes/index.js @@ -61,11 +61,13 @@ module.exports = async (ctx) => { } else { showDebug = config.debugInfo === true || config.debugInfo === ctx.query.debug; } + const { disallowRobot } = config; const stats = await pidusage(process.pid); ctx.body = art(path.resolve(__dirname, '../views/welcome.art'), { showDebug, + disallowRobot, debug: [ config.nodeName ? { diff --git a/lib/views/welcome.art b/lib/views/welcome.art index 800409772b..d3868592d8 100644 --- a/lib/views/welcome.art +++ b/lib/views/welcome.art @@ -3,6 +3,9 @@ Welcome to RSSHub! + {{ if disallowRobot }} + + {{ /if }}