1
0
mirror of https://github.com/ciromattia/kcc synced 2026-05-30 11:13:15 +00:00

ignore exceptions when epub parsing (#1360)

* ignore exceptions when epub parsing

* Update comic2ebook.py

* Update comic2ebook.py
This commit is contained in:
Alex Xu
2026-05-26 09:13:22 -07:00
committed by GitHub
parent 08070cdd97
commit b95cf6e179
+4 -3
View File
@@ -975,10 +975,11 @@ def getWorkFolder(afile, workdir=None):
manifest_dict[manifest_item.attrib.get('id')] = manifest_item.attrib.get('href')
ordered_image_paths = []
for i, spine_item in enumerate(spine):
if spine_item not in manifest_dict:
try:
page_path = os.path.join(os.path.dirname(opf_path), manifest_dict[spine_item])
page = ET.parse(page_path)
except Exception:
continue
page_path = os.path.join(os.path.dirname(opf_path), manifest_dict[spine_item])
page = ET.parse(page_path)
imgs = page.findall(r'.//{*}img') + page.findall(r'.//{*}image')
largest_size = 0