Fix no RemoteDebuggingPort

This commit is contained in:
Nexus 2024-01-15 10:37:12 +00:00
parent 54eed00571
commit c41f912690
Signed by: nex
GPG key ID: 0FA334385D0B689F

View file

@ -25,8 +25,10 @@ class ScreenshotCog(commands.Cog):
self.chrome_options.add_argument("--headless")
self.chrome_options.add_argument("--disable-extensions")
self.chrome_options.add_argument("--incognito")
self.chrome_options.add_argument("--remote-debugging-port=9222")
if os.getuid() == 0:
self.chrome_options.add_argument("--no-sandbox")
self.chrome_options.add_argument("--disable-setuid-sandbox")
self.log.warning("Running as root, disabling chrome sandbox.")
prefs = {