Windows is stupid af
This commit is contained in:
@@ -17,7 +17,7 @@ def check_dependencies():
|
|||||||
try:
|
try:
|
||||||
result = subprocess.run(['yt-dlp', '--version'],
|
result = subprocess.run(['yt-dlp', '--version'],
|
||||||
capture_output=True, text=True, check=True)
|
capture_output=True, text=True, check=True)
|
||||||
print(f"✓ yt-dlp is installed: {result.stdout.strip()}")
|
print(f"[OK] yt-dlp is installed: {result.stdout.strip()}")
|
||||||
return True
|
return True
|
||||||
except (subprocess.CalledProcessError, FileNotFoundError):
|
except (subprocess.CalledProcessError, FileNotFoundError):
|
||||||
return False
|
return False
|
||||||
@@ -28,10 +28,10 @@ def install_ytdlp():
|
|||||||
try:
|
try:
|
||||||
subprocess.run([sys.executable, '-m', 'pip', 'install', 'yt-dlp'],
|
subprocess.run([sys.executable, '-m', 'pip', 'install', 'yt-dlp'],
|
||||||
check=True)
|
check=True)
|
||||||
print("✓ yt-dlp installed successfully!")
|
print("[OK] yt-dlp installed successfully!")
|
||||||
return True
|
return True
|
||||||
except subprocess.CalledProcessError:
|
except subprocess.CalledProcessError:
|
||||||
print("✗ Failed to install yt-dlp automatically.")
|
print("[UH OH] Failed to install yt-dlp automatically.")
|
||||||
print("Please install yt-dlp manually:")
|
print("Please install yt-dlp manually:")
|
||||||
print(" pip install yt-dlp")
|
print(" pip install yt-dlp")
|
||||||
print(" or visit: https://github.com/yt-dlp/yt-dlp")
|
print(" or visit: https://github.com/yt-dlp/yt-dlp")
|
||||||
@@ -127,7 +127,7 @@ def download_channel(channel_url, output_dir, quality='best', audio_only=False,
|
|||||||
# Run the download command
|
# Run the download command
|
||||||
subprocess.run(cmd, check=True, cwd=output_dir)
|
subprocess.run(cmd, check=True, cwd=output_dir)
|
||||||
print("-" * 50)
|
print("-" * 50)
|
||||||
print("✓ Download completed successfully!")
|
print("[OK] Download completed successfully!")
|
||||||
|
|
||||||
except subprocess.CalledProcessError as e:
|
except subprocess.CalledProcessError as e:
|
||||||
print(f"✗ Download failed with error code: {e.returncode}")
|
print(f"✗ Download failed with error code: {e.returncode}")
|
||||||
@@ -135,7 +135,7 @@ def download_channel(channel_url, output_dir, quality='best', audio_only=False,
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
print("\n⚠ Download interrupted by user.")
|
print("\n[UH OH] Download interrupted by user.")
|
||||||
print("You can resume later - already downloaded videos won't be re-downloaded.")
|
print("You can resume later - already downloaded videos won't be re-downloaded.")
|
||||||
return False
|
return False
|
||||||
|
|
||||||
@@ -207,7 +207,7 @@ Examples:
|
|||||||
)
|
)
|
||||||
|
|
||||||
if success:
|
if success:
|
||||||
print(f"\n✓ All videos downloaded to: {output_dir}")
|
print(f"\n[OK] All videos downloaded to: {output_dir}")
|
||||||
print(f"Archive file created at: {output_dir / 'download_archive.txt'}")
|
print(f"Archive file created at: {output_dir / 'download_archive.txt'}")
|
||||||
else:
|
else:
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
Reference in New Issue
Block a user