From 4b21d6f523270193d14561efb764a0f27d50864c Mon Sep 17 00:00:00 2001 From: Yuankui Li Date: Tue, 7 Mar 2023 10:46:48 +0800 Subject: [PATCH] save progress more frequently (#64) --- make_book.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/make_book.py b/make_book.py index 1a4eb3d..710767f 100644 --- a/make_book.py +++ b/make_book.py @@ -192,6 +192,8 @@ class BEPUB: self.p_to_save.append(new_p.text) p.insert_after(new_p) index += 1 + if index % 50 == 0: + self.save_progress() if IS_TEST and index > TEST_NUM: break i.content = soup.prettify().encode()