-
Notifications
You must be signed in to change notification settings - Fork 108
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] Date format problem #126
Comments
"Jumatatu" is apparently Swahili for "Monday". Swahili isn't even a supported language on WhoScored, so it is probably a bug in the website (which will resolve itself automatically) or a plugin in your browser which translates the dates automatically. Which league / season are you trying to scrape? |
Premier League 2022 |
Hello, I've got the same problem as well. Trying to pull any match from any league, the page automatically translate to swahili and the data format doesn't match. I even turned on my VPN to see if the problem is here in Brazil but nothing really change |
I have no issues on the main domain, but experience the same problem on the 1xbet subdomain. For example on https://1xbet.whoscored.com/Regions/252/Tournaments/2/England-Premier-League. It seems that WhoScored uses Swahili as the default locale, but I haven't managed to figure out how to force WhoScored to set the English locale. One workaround I see is to create a fallback function that attempts to parse dates as Swahilian if parsing as an English date fails. One thing to keep in mind here is that most people will not have the Swahili ("sw_KE") locale on their system, so I think it is best to just create a dict with days of the week and months to create the mapping. If someone would like to implement this, please go ahead. |
Sorry for bother you again but i'm really a newbie in Python, more accustomed to R, do u know any place i can find a tutorial to make that dict? |
I'll see if I can implement this during the weekend. Currently not sure how to do it best either. I do not have experience with parsing non-English dates. |
One possible workaround is routing traffic through a country in which 1xbet is not allowed to operate, as that will keep you within the main domain |
Ah, interesting. Such as Belgium apparently 😃 I can browse directly to 1xbet.whoscored.com, but did not know that it gets redirected in other countries. Anyway, I think the fix that I implemented in a3bf31b is more straightforward. I only re-opened this issue because it looks like I made a small mistake (see ML-KULeuven/socceraction#474). |
Hello,
I'm trying to pull the schedule from any league, but it keeps getting an error in the date format. Even when I input the match ID, keeps with problem to read the data because of the date format. How can I solve it?
ValueError:
time data 'Jumatatu, Des 26 2022 12:30' does not match format '%A, %b %d %Y %H:%M'
The text was updated successfully, but these errors were encountered: