I am trying to scrape travel times between two points from Google Maps:

I have used inspect to find the XPath of the travel time in the HTML file:

The following code raises an exception:
from selenium.webdriver.chrome.service import Service
from selenium import webdriver
from selenium.webdriver.common.by import By
url = 'https://www.google.com/maps/dir/35.7290613,+51.238014/35.7504171,51.2244444/@35.7296931,51.2580754,13z/data=!4m8!4m7!1m5!1m1!1s0x0:0x3a1893ebcae30b2e!2m2!1d51.238014!2d35.7290613!1m0'
#initialize web driver
with webdriver.Chrome() as driver:
#navigate to the url
driver.get(url)
#find element by xpath
myDiv = driver.find_element(By.XPATH, '/html/body/div/div[12]/div[2]/div/div[2]/div/div[3]/button[1]/div/div[1]/div/h1/span[2]/span/span')
print(myDiv)
print(myDiv.text)
The exception:
NoSuchElementException: no such element: Unable to locate element: {"method":"xpath","selector":"/html/body/div/div[12]/div[2]/div/div[2]/div/div[3]/button[1]/div/div[1]/div/h1/span[2]/span/span"} (Session info: chrome=108.0.5359.125)
Are there any workarounds?