I'm running a Selenium Python script that opens YouTube in headless mode, waits 5 seconds, and then quits. The script works perfectly on my local machine. However, when I deploy it on a VPS (Linux, with a running gunicorn server and nginx proxy), it fails. I previously had an error saying the ChromeDriver was out of date, so I updated it. Now I get a 500 Internal Server Error and sometimes headless Chrome doesn’t open at all. I suspect this is a display issue with headless mode on the VPS. Here my full code Continue reading...