1
0
mirror of https://github.com/pirate/ArchiveBox.git synced 2025-08-21 21:57:26 +02:00

ensure DOM HTML dump is non-zero length file when retrying

This commit is contained in:
Nick Sweeting
2023-03-13 10:49:26 +00:00
parent f94e8cd9b2
commit 9599845b56

View File

@@ -26,6 +26,7 @@ def should_save_dom(link: Link, out_dir: Optional[Path]=None, overwrite: Optiona
out_dir = out_dir or Path(link.link_dir)
if not overwrite and (out_dir / 'output.html').exists():
if (out_dir / 'output.html').stat().st_size > 1:
return False
return SAVE_DOM