can’t download replies to a comments on youtube using python

the code is able to get the commenters usernames and is able to click on the replies button to show the people that replie to a comment but i just can’t get it to extract the usernames of the people that replied to a comment . i don’t know why but i tried to extract the usernames of the people that replied but they just don’t show up on the result

from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
import time

def extract_usernames(video_url):
    # Initialize the Chrome driver
    driver = webdriver.Chrome()

    # Navigate to the video URL
    driver.get(video_url)

    # Wait for the page to load completely
    time.sleep(10)  # Increase this value if your internet connection is slow

    # Scroll to the bottom of the page to load all comments
    last_height = driver.execute_script("return document.documentElement.scrollHeight")
    while True:
        driver.execute_script("window.scrollTo(0, document.documentElement.scrollHeight);")
        time.sleep(2)  # Slowly scroll down to load all comments
        new_height = driver.execute_script("return document.documentElement.scrollHeight")
        if new_height == last_height:
            break
        last_height = new_height

    # Find all the comment elements
    comment_elements = driver.find_elements(By.CSS_SELECTOR, "ytd-comment-thread-renderer")

    # Extract the usernames from the comment elements (including replies)
    usernames = []
    for comment_element in comment_elements:
        # Click on the "View replies" button if it exists
        try:
            view_replies_button = comment_element.find_element(By.CSS_SELECTOR, "#more-replies.more-button.style-scope.ytd-comment-replies-renderer")
            view_replies_button.click()
            time.sleep(2)  # Wait for replies to load after clicking
        except:
            pass

        extract_usernames_recursive(comment_element, usernames)

    # Close the browser
    driver.quit()

    return usernames

def extract_usernames_recursive(comment_element, usernames):
    # Extract the username from the top-level comment
    username_element = comment_element.find_element(By.CSS_SELECTOR, "h3.style-scope.ytd-comment-view-model > a.yt-simple-endpoint.style-scope.ytd-comment-view-model")
    username_link = username_element.get_attribute('href')
    if username_link.startswith('https://www.youtube.com/@'):
        username = username_link.split('@')[1]
        usernames.append(username)

    # Check for replies and extract usernames recursively
    reply_elements = comment_element.find_elements(By.CSS_SELECTOR, "ytd-comment-thread-renderer")
    for reply_element in reply_elements:
        extract_usernames_recursive(reply_element, usernames)

# Example usage
video_url = "https://www.youtube.com/watch?v=A1III_DQU4I"  # Replace with the actual video URL
usernames = extract_usernames(video_url)
print(usernames)

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật