From 8bf47698ad518538882b3fa708418704ea020f33 Mon Sep 17 00:00:00 2001 From: jkluio78 <74967641+jkluio78@users.noreply.github.com> Date: Tue, 14 Sep 2021 15:23:49 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9E=E8=AE=BE=E7=BD=AEnot?= =?UTF-8?q?=5Fcheck=5Farticle(#25)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/core/searcher.js | 4 ++-- my_config.example.js | 8 +++++++- package.json | 4 ++-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/lib/core/searcher.js b/lib/core/searcher.js index 25bb34b..71afec5 100644 --- a/lib/core/searcher.js +++ b/lib/core/searcher.js @@ -317,7 +317,7 @@ class Searcher { if (isRelayed) { _weight += 1; } - if (_weight >= weight) { + if (_weight >= weight && !config.not_check_article) { log.warn('获取动态', `1/2动态曾经转过,该专栏或已查看,故中止`) _dyinfos = [] break @@ -368,4 +368,4 @@ class Searcher { } -module.exports = { Searcher }; \ No newline at end of file +module.exports = { Searcher }; diff --git a/my_config.example.js b/my_config.example.js index 13a3450..a620130 100644 --- a/my_config.example.js +++ b/my_config.example.js @@ -73,6 +73,12 @@ module.exports = { * - 获取专栏数量 */ article_scan_page: 3, + + /** + * - 不检查专栏是否看过,若选择检查可以提高检测效率 + * - 默认false(检查) + */ + not_check_article: false, /** * - 开奖时间距离现在的最大天数 @@ -249,4 +255,4 @@ module.exports = { config_1: {}, config_2: {}, config_3: {} -} \ No newline at end of file +} diff --git a/package.json b/package.json index faf7e33..dc3f8c7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "lottery-auto-script", - "version": "2.1.5", + "version": "2.1.6", "description": "自动参与B站动态抽奖", "main": "main.js", "scripts": { @@ -52,4 +52,4 @@ "chalk": "^4.1.1", "nodemailer": "^6.5.0" } -} \ No newline at end of file +}