I'm trying to crawling news comment. I want to crawling the text, '72' from this bluelined HTML code
So, this is my code
per_male = driver.find_element_by_css_selector('div.u_cbox_chart_progress u_cbox_chart_male >
span.u_cbox_chart_per')
print('per_male : ' + per_male.get_attribute('text'))
But I have this error
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"css selector","selector":"div.u_cbox_chart_progress u_cbox_chart_male > span.u_cbox_chart_per"}
(Session info: chrome=83.0.4103.97)
I also use this code
per_male = driver.find_element_by_css_selector('div.u_cbox_chart_progress u_cbox_chart_male >
span.u_cbox_chart_per')
print('per_male : ' + per_male.text)
But I have same error, how can I solve this problem?
Thx.