[Python] identify the correct class name - selenium python

Discussão em 'Python' iniciado por Stack, Abril 8, 2025.

  1. Stack

    Stack Membro Participativo

    I am trying to extract information from this page I want to get the names from the leftmost column. But any class name or selector or xpath I try, it returns an empty list. This is my code with a sample class name but others I tried also did not work. Please help select the right class name or selector. Thank you. My code:

    import selenium
    from selenium.webdriver.chrome import options
    from selenium.webdriver.common.by import By
    chrome_options = options.Options()
    chrome_options.add_experimental_option("detach", True)
    get_page = selenium.webdriver.Chrome(options = chrome_options)
    get_page.get(r"https://app.folk.app/shared/US-VCs-oc71Oi94yB9vwbfh1XWIQPHTAGQE7FQ1?_gl=1*i6fxi5*_gcl_au*MjAxNDc5NDg2MC4xNzQzOTk2NzMy*_ga*MTczMTg1ODA3OS4xNzQzOTk2NzI5*_ga_WRYT325C9X*MTc0NDA0NDYyMi4yLjAuMTc0NDA0NDYyMy41OS4wLjY3MzkyNTk0MA..*_fplc*djJ1clZwbjFnR1RBUU9EQTkyTU9DaFQlMkZ4SUZhdG9ENHR3QUE0cFFTQjFaU21JQkJ6SFNxYktTbThSVyUyQjFJVEdKWUZVbEMwNGplN1paMG1mcTlXZnhqVUJNQ1ZxQnY4RVZaSVl3enJya2VxQjZZU0ZVdUs3ZFdxOGZOOFJTZyUzRCUzRA..")
    list_of_investors = get_page.find_elements(By.CLASS_NAME, "c-jMIjwW-drVgRi")
    for l in list_of_investors:
    print (l.text)

    Continue reading...

Compartilhe esta Página