args=['--disable-gpu'] # Add this line to disable GPU

This commit is contained in:
fred 2023-10-09 22:59:46 +02:00
parent 2224544b95
commit bd44f61755
1 changed files with 4 additions and 1 deletions

View File

@ -3,7 +3,10 @@ import sys
from pyppeteer import launch
async def take_screenshot(url, output_file, width, height):
browser = await launch(headless=True)
browser = await launch(
headless=True,
args=['--disable-gpu'] # Add this line to disable GPU
)
page = await browser.newPage()
try: