I'm trying to get all the "title" of the class "lien-jv topic-title", my code is running without any error. But the print function is showing nothing, the code just ends without showing any result.
What I want to get is all the topics title in the page. In the example below, it would be: "Pourquoi les gens déprécient le COSTARD/COSTUME de nos jours ?"
<a class="lien-jv topic-title" href="/forums/42-51-68065824-1-0-1-0-pourquoi-les-gens-deprecient-le-costard-costume-de-nos-jours.htm" title="Pourquoi les gens déprécient le COSTARD/COSTUME de nos jours ?">Pourquoi les gens déprécient le COSTARD/COSTUME de nos jours ?
</a>
Website = https://www.jeuxvideo.com/forums/0-51-0-1-0-1-0-blabla-18-25-ans.htm
import os
import webbrowser
from selenium import webdriver
from selenium.webdriver.support.select import Select
from selenium.webdriver.common.by import By
import time
os.system('cls')
browser = webdriver.Chrome(executable_path=r"C:\Users\Desktop\Webdriver\chromedriver.exe")
browser.get('https://www.jeuxvideo.com/forums/0-51-0-1-0-1-0-blabla-18-25-ans.htm')
time.sleep(2)
list_topic_main=browser.find_elements_by_css_selector("lien-jv topic-title")
for x in list_topic_main:
print(x.title)
browser.close()
os.system('pause')
Thanks !