add missing staticfile check to singlefile
This commit is contained in:
parent
dfa5d55c36
commit
430be7bc68
1 changed files with 4 additions and 1 deletions
|
@ -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())
|
||||
|
|
Loading…
Reference in a new issue