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