How can I get Youtube video length using selenium webdriver

I’m trying to automate youtube via selenium but I’m stuck in between I want to create a program that will take list of song which user have to listen and then it will play the song on youtube one after the other automatically. So I’m able to play one song but after that i dont know how to get length of the video automatically and then wait until the video ends and then search the next song and play it.(like a loop until the list ends) plz help me My code

import os
from selenium import webdriver
from getpass import getpass
from time import sleep
from import Options

# Adblocker Extension 
executable_path = "/webdrivers"
os.environ[""] = executable_path
chrome_options = Options()

# Chrome Driver
driver = webdriver.Chrome(chrome_options=chrome_options)

# Song name to search :
searchbox = driver.find_element_by_xpath('/html/body/ytd-app/div/div/ytd-masthead/div[3]/div[2]/ytd-searchbox/form/div/div[1]/input')
searchbox.send_keys('Can e Sanem - Mean It')

searchbutton = driver.find_element_by_xpath('//*[@id="search-icon-legacy"]')

# Play the first song on the list
playbutton = driver.find_element_by_xpath('/html/body/ytd-app/div/ytd-page-manager/ytd-search/div[1]/ytd-two-column-search-results-renderer/div/ytd-section-list-renderer/div[2]/ytd-item-section-renderer/div[3]/ytd-video-renderer[1]/div[1]/div/div[1]/div/h3/a/yt-formatted-string')

# Play the nect song after the first ends
# playnext = driver.find_element_by_xpath('/html/body/ytd-app/div/ytd-page-manager/ytd-watch-flexy/div[4]/div[1]/div/div[11]/ytd-watch-next-secondary-results-renderer/div[2]/ytd-compact-autoplay-renderer/div[2]/ytd-compact-video-renderer/div[1]/div')