使用 requests_html 抓取时如何获取最后一个元素

How to get last element when scraping with requests_html

我尝试用requests_html抓取一些东西。 有几个 div 标签包含我要废弃的 class 名称。 我知道你可以 select 只是 first=True 的第一个元素,因为它是:

driver.html.find(".company__item-value", first=True)

但是如果我只想 select class company__item 的最后一个元素怎么办?

查找所有元素并得到最后一个find(...)[-1]