lyg
2024-06-15 7a076746f03382e1da7e6b60dd0779678f6fee8a
src/parse-log.mjs
@@ -53,6 +53,11 @@
          }
          continue;
        }
        reg = /.*没有搜索结果.*/g;
        if (reg.test(line)) {
          book.notFound = true;
          continue;
        }
      }
    }
@@ -71,4 +76,10 @@
  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);
}