-
Notifications
You must be signed in to change notification settings - Fork 353
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
self.driver = driver_klass(**driver_kwargs) TypeError: WebDriver.__init__() got an unexpected keyword argument 'executable_path' #128
Comments
I have the same issue:
I use chromedriver on windows. |
Selenium 4 executable_path is depreciated and Service() is used instead.
|
Same problem? |
It seems the best way is to fork the package and change the SeleniumMiddleware.init the way you used to work with Selenium. Actually it's just a few lines of code and you won't end up with ancient Selenium 3 |
But How ton77v? Do you mean to use selenium integration in spider class ? |
I mean something like this:
And you have your own scrapy-selenium fork that you may adjust further as you wish while preserving the original scrapy-selenium API |
i have also facing same issue, i am finding the solution for 5 days and there is not video on internet about this error, can you please make a short video on it, as you say above, thanks in advance, i'll wait for it. this will be a huge favor from your side. |
should we use selenium 3 for fork package? |
Credits @ton77v for the answer, I can help simplify his answer:
Quick explanation of what's happening:
If this worked for you, be sure to like this message and show @ton77v some love! @ahmedraxa23 please close the issue if this worked for you |
thanks alot, and appreciated, just want to know little bit more about it, i want "undetected-chromedriver" to do the same thing, that selenium webdriver perform in middlewares.py, how will changes made? |
It's possible but makes no sense. Will work just fine with the latest version |
Thank you for your work @jg3wilso, your solution work like a charm, however it seems to work when using 'chrome' as the browser and it's kinda slow, you know. Then I try to use it with 'firefox' or 'safari' (by adjusting the setting.py), the script won't work as it used to when using 'chrome' in the setting file
|
That's because the solution was just for Chrome. It wouldn't work for any other browser. It's likely not very hard to make an universal one so let's hope someone will add it here 😀 |
In order to use all the browsers, I'd recommend creating a service object and passing that into the webdriver. An example of that implementation is https://github.com/clemfromspace/scrapy-selenium/pull/135/files. NB: The service object takes up additional arguments like |
I can't get it working, i can't find the selenium folder you mentioned |
I don't this issue should be closed; since it requires a workaround not a 'proper' solution that works out of the box. |
Hi. I've made a naive fix in: #133 (comment). |
Chrome driver
The text was updated successfully, but these errors were encountered: