save progress more frequently (#64)

This commit is contained in:
Yuankui Li 2023-03-07 10:46:48 +08:00 committed by GitHub
parent 5d2b174f8e
commit 4b21d6f523
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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()