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

[WhoScored] Headless option doesn't seems to work #242

Closed clairesecehDS closed 1 year ago

clairesecehDS commented 1 year ago

Hi Pieter and thanks for this repo very useful!

I'm trying to run it in a Docker image, and I want to enable the headless mode.

I have this error: 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:53487 from unknown error: unable to discover open pages

The WhoScored function is perfectly functional without the headless mode.

Do you have any idea on how to run it in a Docker image?

clairesecehDS commented 1 year ago

This has been solved by replacing: chrome_options.add_argument("--headless") with chrome_options.add_argument("--headless=new") in the _common.py file