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
598 stars 103 forks source link

[WhoScored] Blocked in headless mode #395

Closed shufinskiy closed 1 year ago

shufinskiy commented 1 year ago

Hello.

I try get schedule EPL 2023-24 from whoscored.com with

import soccerdata as sd
ws = sd.Whoscored(leagues="ENG-Premier League", seasons=2023)
epl_schedule = ws.read_schedule()

With headless=False all work good, but headless=True code broken on call Whoscored._parse_season_stages() method

Снимок экрана от 2023-10-05 13-46-08

I check ws._driver.page_source and get very strange html about blocking:

Снимок экрана от 2023-10-05 13-47-59

About 3 weeks ago everything was working fine

version package: soccerdata 1.5.1 selenium 4.12.0 undetected-chromedriver 3.5.3 Chrome 117.0.5938.62 Ubuntu 18.04

probberechts commented 1 year ago

This will have to be fixed in undetected-chromedriver.