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