mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-19 01:15:11 -04:00
fix: Commit code review suggestions
This commit is contained in:
parent
853685668c
commit
787a5ad43e
1 changed files with 3 additions and 4 deletions
|
@ -23,10 +23,9 @@ from ..logging_util import TimedProgress
|
||||||
@enforce_types
|
@enforce_types
|
||||||
def should_save_singlefile(link: Link, out_dir: Optional[str]=None) -> bool:
|
def should_save_singlefile(link: Link, out_dir: Optional[str]=None) -> bool:
|
||||||
out_dir = out_dir or link.link_dir
|
out_dir = out_dir or link.link_dir
|
||||||
if not os.path.exists(out_dir):
|
|
||||||
return False
|
|
||||||
|
|
||||||
return SAVE_SINGLEFILE
|
output = Path(out_dir or link.link_dir) / 'single-file.html'
|
||||||
|
return SAVE_SINGLEFILE and (not output.exists())
|
||||||
|
|
||||||
|
|
||||||
@enforce_types
|
@enforce_types
|
||||||
|
@ -36,7 +35,7 @@ def save_singlefile(link: Link, out_dir: Optional[str]=None, timeout: int=TIMEOU
|
||||||
out_dir = out_dir or link.link_dir
|
out_dir = out_dir or link.link_dir
|
||||||
output = str(Path(out_dir).absolute() / "single-file.html")
|
output = str(Path(out_dir).absolute() / "single-file.html")
|
||||||
|
|
||||||
# WGET CLI Docs: https://www.gnu.org/software/wget/manual/wget.html
|
# SingleFile CLI Docs: https://github.com/gildas-lormeau/SingleFile/tree/master/cli
|
||||||
cmd = [
|
cmd = [
|
||||||
SINGLEFILE_BINARY,
|
SINGLEFILE_BINARY,
|
||||||
'--browser-executable-path={}'.format(CHROME_BINARY),
|
'--browser-executable-path={}'.format(CHROME_BINARY),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue