From 9599845b564eceeeaa17bf00457e2d5f98ef9dab Mon Sep 17 00:00:00 2001 From: Nick Sweeting Date: Mon, 13 Mar 2023 10:49:26 +0000 Subject: [PATCH] ensure DOM HTML dump is non-zero length file when retrying --- archivebox/extractors/dom.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/archivebox/extractors/dom.py b/archivebox/extractors/dom.py index ec2df073..e1c3571a 100644 --- a/archivebox/extractors/dom.py +++ b/archivebox/extractors/dom.py @@ -26,7 +26,8 @@ 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(): - return False + if (out_dir / 'output.html').stat().st_size > 1: + return False return SAVE_DOM