mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-13 14:44:29 -04:00
switch youtube_dl install for yt-dlp
Some checks failed
Build Debian package / build (push) Has been cancelled
Build Docker image / buildx (push) Has been cancelled
Build Homebrew package / build (push) Has been cancelled
Run linters / lint (push) Has been cancelled
Build Pip package / build (push) Has been cancelled
Run tests / python_tests (ubuntu-22.04, 3.11) (push) Has been cancelled
Run tests / docker_tests (push) Has been cancelled
Some checks failed
Build Debian package / build (push) Has been cancelled
Build Docker image / buildx (push) Has been cancelled
Build Homebrew package / build (push) Has been cancelled
Run linters / lint (push) Has been cancelled
Build Pip package / build (push) Has been cancelled
Run tests / python_tests (ubuntu-22.04, 3.11) (push) Has been cancelled
Run tests / docker_tests (push) Has been cancelled
This commit is contained in:
parent
038e9f32af
commit
57ed2ebcb2
1 changed files with 4 additions and 4 deletions
|
@ -980,16 +980,16 @@ def setup(out_dir: Path=OUTPUT_DIR) -> None:
|
||||||
'--upgrade',
|
'--upgrade',
|
||||||
'--no-cache-dir',
|
'--no-cache-dir',
|
||||||
'--no-warn-script-location',
|
'--no-warn-script-location',
|
||||||
'youtube_dl',
|
'yt-dlp',
|
||||||
], capture_output=False, cwd=out_dir)
|
], capture_output=False, cwd=out_dir)
|
||||||
pkg_path = run_shell([
|
pkg_path = run_shell([
|
||||||
PYTHON_BINARY, '-m', 'pip',
|
PYTHON_BINARY, '-m', 'pip',
|
||||||
'show',
|
'show',
|
||||||
'youtube_dl',
|
'yt-dlp',
|
||||||
], capture_output=True, text=True, cwd=out_dir).stdout.decode().split('Location: ')[-1].split('\n', 1)[0]
|
], capture_output=True, text=True, cwd=out_dir).stdout.decode().split('Location: ')[-1].split('\n', 1)[0]
|
||||||
NEW_YOUTUBEDL_BINARY = Path(pkg_path) / 'youtube_dl' / '__main__.py'
|
NEW_YOUTUBEDL_BINARY = Path(pkg_path) / 'yt-dlp' / '__main__.py'
|
||||||
os.chmod(NEW_YOUTUBEDL_BINARY, 0o777)
|
os.chmod(NEW_YOUTUBEDL_BINARY, 0o777)
|
||||||
assert NEW_YOUTUBEDL_BINARY.exists(), f'youtube_dl must exist inside {pkg_path}'
|
assert NEW_YOUTUBEDL_BINARY.exists(), f'yt-dlp must exist inside {pkg_path}'
|
||||||
config(f'YOUTUBEDL_BINARY={NEW_YOUTUBEDL_BINARY}', set=True, out_dir=out_dir)
|
config(f'YOUTUBEDL_BINARY={NEW_YOUTUBEDL_BINARY}', set=True, out_dir=out_dir)
|
||||||
except BaseException as e: # lgtm [py/catch-base-exception]
|
except BaseException as e: # lgtm [py/catch-base-exception]
|
||||||
stderr(f'[X] Failed to install python packages: {e}', color='red')
|
stderr(f'[X] Failed to install python packages: {e}', color='red')
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue