我尝试用requests_html废弃一些东西。有几个div标签包含我想要废弃的类名。我知道你可以选择first=True的第一个元素:
requests_html
first=True
driver.html.find(".company__item-value", first=True)
但是,如果我只想选择班级company__item的最后一个元素,我该怎么办?
company__item
找到所有元素并获得最后一个find(...)[-1]
find(...)[-1]