How to extract the text from the search results of duckduckgo using Selenium Python
问题 I am trying to get the link descriptions of duckduck of search results using the following: results=browser.find_elements_by_xpath("//div[@id='links']/div/div/div[2]") description=[] for result in results: description.append(result.text) I am getting the error 'list' object has no attribute 'text'. I was able to use a similar method to get the search result titles, but for some reason I am unable to extract the text from this particular xpath. 回答1: To extract the link descriptions of the