Python 3.x python中的异常输出

Python 3.x python中的异常输出,python-3.x,selenium,Python 3.x,Selenium,我从网站上得到评论,我已经试过了,效果很好,但现在它给了我不寻常的输出 我的部分代码: comments = driver.find_elements_by_class_name("comment-text") time.sleep(1) print(comments[1]) 输出: 您想要什么 print(comments[1].text) 您正在打印元素本身,它只是一些GUID(我想)。我假设您想要元素中包含的文本,这意味着您需要.text

我从网站上得到评论,我已经试过了,效果很好,但现在它给了我不寻常的输出

我的部分代码:

comments = driver.find_elements_by_class_name("comment-text")
time.sleep(1)
print(comments[1])
输出:

您想要什么

print(comments[1].text)
您正在打印元素本身,它只是一些GUID(我想)。我假设您想要元素中包含的文本,这意味着您需要
.text