To use this older code should fist make
I did a quick test and this code
Code use Selenium and and goes to Google for search,Google has of course changed since 2018.
Also Selenium has changes so need some Path fix,before comes to this error.
From code:
virtual environment
and clone Repo a use older Python version,then do pip install -r requirements.txt
I did a quick test and this code
dos not work
anymore,have to do a rewrite of code as there are servals problems.Code use Selenium and and goes to Google for search,Google has of course changed since 2018.
Also Selenium has changes so need some Path fix,before comes to this error.
From code:
""" Search on Google and returns the list of PAA questions in SERP. """ def newSearch(browser,query): if lang== "en": browser.get("https://www.google.com?hl=en") searchbox = browser.find_element_by_xpath("//input[@aria-label='Search']") else: browser.get("https://www.google.com?hl=es") searchbox = browser.find_element_by_xpath("//input[@aria-label='Buscar']") searchbox.send_keys(query)
Error:selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//input[@aria-label='Search']"}