mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-13 14:44:29 -04:00
search for node dependencies in output dir first
This commit is contained in:
parent
4566904db2
commit
7144e0bdce
3 changed files with 5 additions and 5 deletions
|
@ -780,7 +780,7 @@ globals().update(CONFIG)
|
||||||
os.environ["TZ"] = 'UTC'
|
os.environ["TZ"] = 'UTC'
|
||||||
|
|
||||||
# add ./node_modules/.bin to $PATH so we can use node scripts in extractors
|
# add ./node_modules/.bin to $PATH so we can use node scripts in extractors
|
||||||
NODE_BIN_PATH = str((Path(CONFIG["OUTPUT_DIR"]) / 'node_modules' / '.bin').resolve())
|
NODE_BIN_PATH = str((Path(CONFIG["OUTPUT_DIR"]).absolute() / 'node_modules' / '.bin'))
|
||||||
sys.path.append(NODE_BIN_PATH)
|
sys.path.append(NODE_BIN_PATH)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ from ..util import (
|
||||||
from ..config import (
|
from ..config import (
|
||||||
TIMEOUT,
|
TIMEOUT,
|
||||||
SAVE_READABILITY,
|
SAVE_READABILITY,
|
||||||
READABILITY_BINARY,
|
DEPENDENCIES,
|
||||||
READABILITY_VERSION,
|
READABILITY_VERSION,
|
||||||
)
|
)
|
||||||
from ..logging_util import TimedProgress
|
from ..logging_util import TimedProgress
|
||||||
|
@ -73,7 +73,7 @@ def save_readability(link: Link, out_dir: Optional[str]=None, timeout: int=TIMEO
|
||||||
temp_doc.close()
|
temp_doc.close()
|
||||||
|
|
||||||
cmd = [
|
cmd = [
|
||||||
READABILITY_BINARY,
|
DEPENDENCIES['READABILITY_BINARY']['path'],
|
||||||
temp_doc.name
|
temp_doc.name
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ from ..util import (
|
||||||
from ..config import (
|
from ..config import (
|
||||||
TIMEOUT,
|
TIMEOUT,
|
||||||
SAVE_SINGLEFILE,
|
SAVE_SINGLEFILE,
|
||||||
SINGLEFILE_BINARY,
|
DEPENDENCIES,
|
||||||
SINGLEFILE_VERSION,
|
SINGLEFILE_VERSION,
|
||||||
CHROME_BINARY,
|
CHROME_BINARY,
|
||||||
)
|
)
|
||||||
|
@ -43,7 +43,7 @@ def save_singlefile(link: Link, out_dir: Optional[str]=None, timeout: int=TIMEOU
|
||||||
|
|
||||||
# SingleFile CLI Docs: https://github.com/gildas-lormeau/SingleFile/tree/master/cli
|
# SingleFile CLI Docs: https://github.com/gildas-lormeau/SingleFile/tree/master/cli
|
||||||
cmd = [
|
cmd = [
|
||||||
SINGLEFILE_BINARY,
|
DEPENDENCIES['SINGLEFILE_BINARY']['path'],
|
||||||
'--browser-executable-path={}'.format(CHROME_BINARY),
|
'--browser-executable-path={}'.format(CHROME_BINARY),
|
||||||
'--browser-args="{}"'.format(json.dumps(browser_args[1:])),
|
'--browser-args="{}"'.format(json.dumps(browser_args[1:])),
|
||||||
link.url,
|
link.url,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue