From 430be7bc68983b0dd711f8aaa987033bcd9712fa Mon Sep 17 00:00:00 2001 From: Nick Sweeting Date: Mon, 10 Aug 2020 13:42:20 -0400 Subject: [PATCH] add missing staticfile check to singlefile --- archivebox/extractors/singlefile.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/archivebox/extractors/singlefile.py b/archivebox/extractors/singlefile.py index 3a1a3759..28641b66 100644 --- a/archivebox/extractors/singlefile.py +++ b/archivebox/extractors/singlefile.py @@ -9,7 +9,8 @@ from ..index.schema import Link, ArchiveResult, ArchiveError from ..system import run, chmod_file from ..util import ( enforce_types, - chrome_args + is_static_file, + chrome_args, ) from ..config import ( TIMEOUT, @@ -24,6 +25,8 @@ from ..logging_util import TimedProgress @enforce_types def should_save_singlefile(link: Link, out_dir: Optional[str]=None) -> bool: out_dir = out_dir or link.link_dir + if is_static_file(link.url): + return False output = Path(out_dir or link.link_dir) / 'singlefile.html' return SAVE_SINGLEFILE and (not output.exists())