Answer the question
In order to leave comments, you need to log in
Xpath python how to take 2 element with similar class?
I want to parse all topics, they are in a row with the same class
. I can only take the first element with
getting_url = parsing_table_urls.find_element_by_xpath("//a[@class='listBlock main PreviewTooltip']")
getting_url = parsing_table_urls.find_element_by_xpath("//a[@class='listBlock main PreviewTooltip'][2]")
Answer the question
In order to leave comments, you need to log in
items = node.find_elements_by_xpath('xpath')
for item in items:
print(item.get_attribute('href'))
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question