This looks like a problem with the encoding of the club's name in the following match... https://api.chess.com/pub/match/1279387 "name":"KNOCKOUT S31 R1: \ud83c\udf0f THUNDERSTORM WARRIORS Chess Club \ud83c\udf0f vs Astronomy" Specifically, the data returned in json form is as follows... KNOCKOUT S31 R1: \U0001f30f THUNDERSTORM WARRIORS Chess Club \U0001f30f vs Astronomy So there appears to be a mismatch between the characters displayed in the endpoint in my browser and those given in json? The additional unicode characters are causing my program to crash - Python is giving the following error... Traceback (most recent call last):File "C:\Users\Stephen\Documents\Computing\Python\Chess.py", line 468, in <module>print(f'\nMatch Name: {data["name"]}')UnicodeEncodeError: 'UCS-2' codec can't encode characters in position 30-30: Non-BMP character not supported in Tk It seems the 'earth_asia:' emojis are not supported in Python (my version is reasonably recent), so is there a simple way I can fix this? This is the first time I've hit this snag in several years so it's not exactly a common problem.
stephen_33 Sep 19, 2021
Just a few days ago below worked: var request = new XMLHttpRequest();request.open('GET','https://api.chess.com/pub/club/thailand/members',false);request.send(); Now I get an error: As you can gather, I execute the script directly from the Chrome consule. Any advice?
VirtualKnightJoakim Sep 17, 2021
I know this question is not about the API; it's about something the API doesn't provide and maybe never will. I also know that chess.com might not like seeing scraping in general. However, I'm not attempting to create any competing service or gain any money from this; on the contrary, I need to get a specific set of data that I could send back to chess.com staff and/or other interested members. Getting this data manually is infeasible; it would take an incredible amount of time. What do I want? I'm looking for a script/library, which would allow me to scrape all comments from a given finished vote chess game for a given move. Recommending a script which could scrape all comments from a given chess.com forum would also be very helpful, as I think I could modify it easily to scrape comments from a VC game instead. I haven't written any scraping code before and I guess some of you did, so I hope you could help me. edit: I'm interested in scraping the html content rather than just the text, so that I can extract both the lines/continuations suggested as text and also the PGNs. Scripting language I'd prefer to use Python for this project but I'm afraid I might run into trouble with captchas. In that case, using Javascript might be better, as a bunch of JS code could just be pasted into the browser console, even though it wouldn't be comfortable - it'd still save me a lot of work. Stress/load on the server Clearly, throwing a bunch of requests against a server without thinking could put more stress on a server that a standard browser user would. I intend to slow the script down by increasing the time between two subsequent requests to 1-2 seconds, which shouldn't be much of a problem for the servers. I also won't be scraping all the VC games on the server, just a number of selected games. Why do I want this? I you want to know why do I want this, send me a PM.
WhiteDrake Sep 10, 2021
Hi,I'm using the following endpoint:https://www.chess.com/news/view/published-data-api#pubapi-endpoint-games-archive Upon making a request, it sometimes throws a CORS error:Access to fetch at 'https://api.chess.com/pub/player/username/games/2019/09' from origin 'http://localhost:1234' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled. What's interesting, is that upon a couple of retries, it no longer throws this error. After 5-6 retries I'm able to have all requests come through. I could retry them till success, but it's not an elegant solution. I'm trying to get all games for a player, so I'm sending these requests basically in bulk. It does not seem connected, but worth noting nonetheless. Could you please advise on a solution for that? On an unrelated note, is there a "dummy" player account, that I can use to test my API?
Tricky_Dicky Sep 2, 2021
As part of the process of checking if clubs and their representatives qualify to take part in the leagues I help to run, I test the status of those who claim to be admins of the clubs they enroll. Sometimes members claim to be when they're not and that matters because they can't set-up matches when we ask them to and my program soon identifies them. The only problem is that from time to time it also highlights someone who turns out to be a coordinator. I've been puzzled for some time why coordinators have the same status as ordinary members. Ideally, it would be useful if the endpoint was split into three categories - SA's, ordinary admins and coordinators but I think coordinators should be included in the admin list at the very least. Here's a case in point:- @jamesreed88 has been nominated to represent Squadron Commandos but doesn't appear in the list of admins in the endpoint for the club... https://api.chess.com/pub/club/squadron-commandos
stephen_33 Sep 2, 2021
Simple Question. How do leave a club? I get spammed with hundreds of alerts a day although all my notifications are disabled. Thanks in advance
Martin_Stahl Aug 25, 2021
Hi, We where trying to challenge a club called "Ajedrez Sololá", but we were unable to find it using while searchig for team name at "New Living Match" option.
Tricky_Dicky Aug 25, 2021
Hello developer community! First a quick introduction: I am a programmer and blogger. For the last few years I've been writing a series on the history of the internet, covering the year 1969 onwards, which you can find here: https://simpleprogrammer.com/author/kevinoshaughnessy/ I would like to follow this with a mini series on chess engines and online chess, starting with the earliest AI experiments through to the world champion crushing bots that we have today. I am fairly new to chess and chess engines but find the topic interesting. I'm interested to hear which topics that you would be interested in reading about or feel are important to include. I appreciate your feedback.
vijaypuliparazh Aug 18, 2021
Hi,I am a software engineering student and I am developing a program that analyses a chess.com profile (archived games) and determines if that user is/was cheating. I am wondering if there is a list of profiles banned for cheating so that I could access their games and test my program?Thanks
Kadenstarr Aug 13, 2021
Hello guys, I'm creating something like a cheaper DGT board (It is much expensive in Brazil) and I would like to know if it is possible to make moves from an API like we can do on lichess. There is a API to control game?
rodolpho_netto Aug 11, 2021
This has now been an issue for over 48 hours. Team matches not accessible via API. Could it be prioritised please. Example https://api.chess.com/pub/club/norfolk-knights/matches {"code":0,"message":"An internal error has occurred. Please contact Chess.com Developer's Forum for further help https://www.chess.com/club/chess-com-developer-community ."}
stephen_33 Aug 9, 2021
I'm trying to collate the results for the first stage of this year's TMCL tournament but I keep hitting a small snag with the following club that's taking part... https://www.chess.com/club/the-empire-of-assassins The club name appears to be as it's displayed: "The Empire Of Assassins" No extra spaces or odd characters but my program crashed (as I prefer it to) because the spelling of the name in the club's matches is different from the one I have in my input file. For example... https://api.chess.com/pub/match/1209620 "name":"The Empire Of Assassins" Note the double-space between Of and Assassins! Simple I thought, I'll ask the club SA to edit the club name to remove the superfluous space. They did that but the name given in this and another match remained the same. Interestingly here... https://api.chess.com/pub/club/the-empire-of-assassins "name":"The Empire Of Assassins" The name is given without the extra space but why is the club name different between different endpoints? Without an immutable reference for a club by which an endpoint might be accessed, the task of processing club-related data is difficult enough (some admins just love changing their club's name) but if the name itself isn't held consistently between endpoints, the job becomes a lot harder.
Is there a way to do the following via API: create a live event and add players add specific matches with players/times defined retrieve results of those games (optionally tell if a player was a "no-show" for the specified time) Thanks - appreciate the input (Real)gojira
Hey Guys, I recently started to work on a small project that has a primary use in assisting with the creation of chess-based content. I created a Chrome extension that allows users to hide player details to mask the identity of their opponents or themselves in a stream setting. This project can help public figures who may not want their chess.com profiles in the public eye, such as Twitch streamers, or simply players with Elo anxiety. I'm still trying my best to brainstorm more addons that could improve user experience; feel free to leave any suggestions in the comments below! Thanks, Andrew Chrome Extension Source Code
Pokervane Jul 31, 2021
I have a short program written in Python (I'm running v3.7) that inputs values from a file, adds or subtracts from a running balance and checks the float-value of that running balance, maintained by the program, with that held in the input file. Simple enough you'd think and up until today it's worked nicely but after updating my data file and running the figures through the program, I came across this unexpected result... 41389.46 + 1.70 yielded the result 41391.159999999996 this isn't a problem and reflects the fact that decimal values can't always be represented precisely by binary-based systems. When I need to display such a value I specify two decimal places and that's usually fine. But the next line caused the problem... 41391.159999999996 - 41391.16 yields -7.275957614183426e-12 The expected balance is 0.00 but the following formatting of -7.275957614183426e-12 gives this bizarre (to me) result... f'{-7.275957614183426e-12:.2f}' gives -0.00 (minus zero!) of course when my program compares -0.00 with 0.00, it detects a mismatch. It looks like a possible oversight (if not a bug?) within Python but is there any easy way I can correct this, preferably without the use of additional modules? I've been looking at the Python Decimal module but I'm not sure yet if the solution is in there.
stephen_33 Jul 31, 2021
Hello devs, do you know if chess.com has own OAuth2 system? I would like to add button and action like "log in with chess.com" to my project. Thanks for answers.
henry_in_pt Jul 29, 2021
Hi! I was wondering if there is any endpoints/any plans to build out an endpoint to search for games played between two users? Searching through the archives would be pretty intensive client-side. Has anyone else requested this?
Tricky_Dicky Jul 24, 2021
If anyone is interested I made a Python package that pulls your chess.com or lichess.org games from their APIs and puts them into an SQLite database for you to do analysis, or whatever you'd like. If people want it I'll add support for import PGN files from disk instead of an API. You can find it on PyPI: https://pypi.org/project/pgn_to_sqlite/
EverydayRonin Jul 12, 2021
what's the most efficient way to identify an opening from a PGN without reinventing the wheel? is there an existing python implementation/API?
This member, @gwi02, was fair play banned but FPV has not been registered in the following team match. https://api.chess.com/pub/match/1205416 (It is correctly shown in this team match https://api.chess.com/pub/match/1247201)