Python 3.x Selenium-在抓取google maps reveiws时无法找到此类元素

Python 3.x Selenium-在抓取google maps reveiws时无法找到此类元素,python-3.x,selenium,google-maps,web-scraping,css-selectors,Python 3.x,Selenium,Google Maps,Web Scraping,Css Selectors,我正试图刮谷歌地图评论,但当我试图实现滚动部分,硒抛出错误 这是我的密码 def __scroll(self): scrollable_div = self.driver.find_element_by_css_selector('div.section-layout.section-scrollbox.scrollable-y.scrollable-show') self.driver.execute_script('arguments[0].scrollTop

我正试图刮谷歌地图评论,但当我试图实现滚动部分,硒抛出错误

这是我的密码

def __scroll(self):
        scrollable_div = self.driver.find_element_by_css_selector('div.section-layout.section-scrollbox.scrollable-y.scrollable-show')
        self.driver.execute_script('arguments[0].scrollTop = arguments[0].scrollHeight', scrollable_div) 

这只是滚动部分,这里selenium抛出错误

selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"css selector","selector":"div.section-layout.section-scrollbox.mapsConsumerUiCommonScrollable__scrollable-y.mapsConsumerUiCommonScrollable__scrollable-show"}
  (Session info: headless chrome=90.0.4430.212)
我在github上尝试了其他建议,但都没有奏效。有什么办法可以实现这一部分吗

UPD: 这是指向所用谷歌地图的链接:

如我所见,该元素的正确且唯一的css选择器是

div.section-layout.section-scrollbox
那么,试试这个:

scrollable_div = self.driver.find_element_by_css_selector('div.section-layout.section-scrollbox')

你能提供网页的链接吗?这个
选择器有一个例外:div.section-layout.section-scrollbox.mapsConsumerUiCommonScrollable\uuuuuScrollable-y.mapsConsumerUiCommonScrollable\uuuuuScrollable-show
请分享相关代码。以下是一个示例url:@Prophet,但它基本上是所有Google Maps places Reviews谢谢你的工作,但你能告诉我你是如何找到正确的选择器的吗?我试着检查网页的来源,但还是弄不明白。但是现在它抛出了
uncaughtrangeerror:超过了最大调用堆栈大小
,我刚刚打开页面并检查了dev工具中的元素。您添加的最后两个类名实际上并不正确。我猜它们是在滚动元素等之后添加的。是的,我认为这就是提取评论所需要的,因为仅仅添加名称本身就会抛出js递归错误