Chrome Dino game automation

 try:

from selenium import webdriver

import pyautogui

path="Path To Selenium Driver"

d=webdriver.Chrome(path)

d.get("https://chromedino.com/")

pyautogui.press('space')

js="Runner.prototype.gameOver=function(){}"

d.execute_script(js)


except Exception as e:

print(e)