Hi,
In order to scrape some images for an Image Classification example, I would like to use Selenium and Chromedriver or, maybe better, Geckodriver. See the below example:
from selenium import webdriver
options = webdriver.ChromeOptions()
#options.binary_location = “/home/work/hslu-deep-learning/notebooks/Block 5/Selenium test/chromedriver”
driver = webdriver.Chrome(chrome_options=options)
driver.get(‘https://imgur.com/’)
images = driver.find_elements_by_tag_name(‘img’)
for image in images:
print(image.get_attribute(‘src’))
driver.close()
Error message:
WebDriverException: Message: ‘chromedriver’ executable needs to be in PATH.
The problem now is, that I need to add the executable to PATH. I tried various ways to achive this, with no succes. Could somebody give me advice? Or is adding executables to PATH just not allowed?
Thanks in advance for any help!
Simon