'Webdrivers' executable may have wrong permissions. Please see https://sites.google.com/a/chromium.org/chromedriver/home

前端 未结 11 562
醉梦人生
醉梦人生 2020-11-22 16:23

I\'ve looked around checked both documentations and have found no answer.

I\'ve been trying to use InstaPy a instagram api for python. After failing with multiple er

11条回答
  •  北海茫月
    2020-11-22 17:04

    we can fix this issue for centos

    #Install package chromedriver. Install it using yum    
    yum install chromedriver
    
    #Import following package in python.
    from selenium import webdriver
    
    #Add following options before initializing the webdriver
    chromeOptions = webdriver.ChromeOptions()
    chromeOptions.add_argument("--headless")
    chromeOptions.add_argument("--remote-debugging-port=9222")
    chromeOptions.add_argument('--no-sandbox')
    driver = webdriver.Chrome('/usr/bin/chromedriver',chrome_options=chromeOptions)
    

提交回复
热议问题