probberechts / soccerdata

⛏⚽ Scrape soccer data from Club Elo, ESPN, FBref, FiveThirtyEight, Football-Data.co.uk, FotMob, Sofascore, SoFIFA, Understat and WhoScored.
https://soccerdata.readthedocs.io/en/latest/
Other
529 stars 90 forks source link

Bug with selenium=4.10 #269

Closed augustomaillo closed 11 months ago

augustomaillo commented 1 year ago

using selenium-4.10.0 (compatible with lib dependencies) raises error in undetected_chromedriver Chrome class init

how to reproduce soccerdata==1.4.0 selenium==4.10.0

Code:

import soccerdata as sd
sd.WhoScored('ENG-Premier League', seasons=2021)

Output:

[06/19/23 22:29:31] INFO     No custom team name replacements found. You can configure these in /root/soccerdata/config/teamname_replacements.json.                                            _config.py:85
                    INFO     No custom league dict found. You can configure additional leagues in /root/soccerdata/config/league_dict.json.                                                   _config.py:159
                    INFO     Saving cached data to /root/soccerdata/data/WhoScored                                                                                                             _common.py:89

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
<stdin> 1 <module>
1

whoscored.py 185 __init__
super().__init__(

_common.py 387 __init__
self._driver = self._init_webdriver()

_common.py 415 _init_webdriver
return uc.Chrome(options=chrome_options)

__init__.py 453 __init__
super(Chrome, self).__init__(

TypeError:
__init__() got an unexpected keyword argument 'executable_path'
probberechts commented 1 year ago

I cannot reproduce this with

soccerdata==1.4.0 selenium==4.10.0 undetected-chromedriver==3.5.0

What version of undetected-chromedriver do you have?

augustomaillo commented 1 year ago

Same version, 3.5.0 I faced this issue in a WSL2 environment, maybe this is the problem But i downgrade the selenium version and crawler works