From ce8cb9c851fa66c7c2902ceb57e369d3cecf1a28 Mon Sep 17 00:00:00 2001
From: lyg <1543117173@qq.com>
Date: 星期四, 01 八月 2024 01:48:56 +0800
Subject: [PATCH] 复制bt下载的文件,bt任务控制

---
 src/parse-log.mjs |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/src/parse-log.mjs b/src/parse-log.mjs
index 3875c1c..98ed4ea 100644
--- a/src/parse-log.mjs
+++ b/src/parse-log.mjs
@@ -53,6 +53,11 @@
           }
           continue;
         }
+        reg = /.*娌℃湁鎼滅储缁撴灉.*/g;
+        if (reg.test(line)) {
+          book.notFound = true;
+          continue;
+        }
       }
 
     }
@@ -71,4 +76,13 @@
   const failedBookUrls = books.filter(book => !book.download && book.downloadUrl)
     .map(book => book.downloadUrl).join('\n');
   fs.writeFileSync('./failed-book-urls.txt', failedBookUrls);
+
+  const notFoundBooks = books.filter(book => book.notFound).map(book => book.bookId).join('\n');
+  fs.writeFileSync('./not-found-books.txt', notFoundBooks);
+
+  const noFileBooks = books.filter(book => !book.download && !book.downloadUrl).map(book => book.bookId).join('\n');
+  fs.writeFileSync('./no-file-books.txt', noFileBooks);
+
+  const successBooks = books.filter(book => book.download).map(book => book.bookId).join('\n');
+  fs.writeFileSync('./success-books.txt', successBooks);
 }
\ No newline at end of file

--
Gitblit v1.9.1