Skip to content
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

[WhoScored] Enable setting ChomeDriver version manually #156

Open
JeremieSiller opened this issue Feb 3, 2023 · 1 comment
Open

[WhoScored] Enable setting ChomeDriver version manually #156

JeremieSiller opened this issue Feb 3, 2023 · 1 comment
Labels
enhancement New feature or request WhoScored Issue or pull request related to the WhoScored scraper

Comments

@JeremieSiller
Copy link

JeremieSiller commented Feb 3, 2023

I have just tried using the library on an older machine and Chrome was a bit outdated, which caused the library to raise:

     The ChromeDriver was unable to initiate/spawn a new                                                                                                                                                                                                          
     WebBrowser. You will not be able to scrape new data.                                                                                                                                                                                                         
     Message: unknown error: cannot connect to chrome at 127.0.0.1:57261                                                                                                                                                                                          
     from session not created: This version of ChromeDriver only supports Chrome version 109                                                                                                                                                                                      
     Current browser version is 108.0.5359.124

This can easily be fixed, by allowing to add version_main to the undetected_chromedriver.ChromeDriver.
For me I had to change the line 412 in _common.py to:

return uc.Chrome(options=chrome_options, version_main=108) # 108, because that's the main version of the installed chrome browser

But it would be great to have the user set this when initializing the WhoScored object or any other object that needs a Chrome-driver (but I think this is only relevant for WhoScored?)

@probberechts probberechts added the enhancement New feature or request label Feb 10, 2023
@probberechts probberechts added the WhoScored Issue or pull request related to the WhoScored scraper label May 30, 2023
@pytoni
Copy link

pytoni commented Sep 1, 2023

I got the same issue. My Chrome version is 116.
I did change _common.py to return uc.Chrome(options=chrome_options, version_main=116), but it's not working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request WhoScored Issue or pull request related to the WhoScored scraper
Projects
None yet
Development

No branches or pull requests

3 participants