报错:NameError: name 'NoSuchElementException' is not defined
如图

解决方法:
头部加一句:from selenium.common.exceptions import NoSuchElementException 可解决

参考:https://stackoverflow.com/questions/19200497/python-selenium-webscraping-nosuchelementexception-not-recognized