Instagramlovemachine / download_browsers.py
nakas's picture
Create download_browsers.py
cdf309d verified
raw
history blame contribute delete
587 Bytes
import subprocess
import sys
def download_playwright_browsers():
try:
print("Installing Playwright browsers...")
result = subprocess.run([sys.executable, "-m", "playwright", "install", "chromium"],
capture_output=True,
text=True)
print("Installation output:", result.stdout)
if result.stderr:
print("Installation errors:", result.stderr)
except Exception as e:
print(f"Error installing browsers: {e}")
if __name__ == "__main__":
download_playwright_browsers()