How to download all games played from chess.com with times (not one page of games)

Sort:
cezarywagner

Is there any tool to do it?

I can use archive but it allow download only one page of games (or I do not know how to do it)?

I learned that there some api so maybe someone write some application to do it.

Your advice or hint are welcome.

Martin_Stahl
cezarywagner wrote:

Is there any tool to do it?

I can use archive but it allow download only one page of games (or I do not know how to do it)?

I learned that there some api so maybe someone write some application to do it.

Your advice or hint are welcome.

 

There is no site available method.

 

There is a developer API, so if you know how to code, you might be able to script a way to do it.

https://www.chess.com/developers

 

SocialistEgypt

Hack the website database.
SOLVED

cezarywagner
Martin_Stahl wrote:
cezarywagner wrote:

Is there any tool to do it?

I can use archive but it allow download only one page of games (or I do not know how to do it)?

I learned that there some api so maybe someone write some application to do it.

Your advice or hint are welcome.

 

There is no site available method.

 

There is a developer API, so if you know how to code, you might be able to script a way to do it.

https://www.chess.com/developers

 

 

Strange thing but is reasonable. I can program it.

cezarywagner
Mythaar wrote:

Yes, I found a fully functional code on Reddit here: https://www.reddit.com/r/chess/comments/9ifkaq/how_i_downloaded_all_my_chesscom_games_using/

As long as you have Python installed, it should work. However, make sure that you open the Python version you are using (e.g. Python 3.8) and allow install Certificate shell commands, otherwise you will have an SSL problem.

Thank you. It looks good I am expert in programming (10 years+). I Know Python very good and use it as often as possible. This should be work I think.

Burnelr

I hesitate to ask because I know you guys have already done a lot of work here.  But for somebody who thinks python is a snake, could somebody post a step by step?

I did download python and pasted the code in, but got a syntax error.  I found a website that suggested making a script so I gave that a try with the same result.

Seems like it would be a lot easier for chess.com to just add a download all button than for me to have to learn to code, but that's a separate discussion.

kodiboz

yes, please help.

 

kodiboz

nevermind. I downloaded python and made the changes and it worked like a charm. YAHOO!!

kodiboz

also, if you want to merge all the files into one pgn file, you can use the following in cmd. Make sure you are in the directory that contains your pgn files.

type *.pgn > merged.pgn

This is great. I am using ChessX ( free chess application) to look at my games. 

dunai19

I can't make this work

kodiboz

1. do you have python installed?

2. are you saving the script as a .py filetype?

3. Also, are you using Windows, Linux, or Mac ?

kodiboz

i am curious how to tweak the script to only download certain game types.  For example, if I only wanted to retrieve bullet or blitz games.  That would be useful.  Also, if there was a way to download only games after certain date or year.

muzzleplayer

Probably it's too late to join the party.

I have created a program to download all games at once from chess.com and lichess.com

https://github.com/kgcorner/chess-archiver

I request other members to add more scrappers if they can

kevinpatey

Hi,

I get this error: could you help??

 

Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/http/client/HttpClient
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
at java.lang.Class.getMethod0(Class.java:3018)
at java.lang.Class.getMethod(Class.java:1784)
at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:650)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:632)
Caused by: java.lang.ClassNotFoundException: org.apache.http.client.HttpClient
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
... 7 more

Thanks a lot for making this as well...

K

jacksonEcooper

I also wrote a program for downloading all of your chess.com games at once, and my program will also add the move count (PlyCount) to every game, which chess.com omits for some reason: https://github.com/jacksoncooper12/PGNScraper just open the shortcut icon and give it your username! Note: .NET Framework 5.0 will need to be installed on your machine

blunder_and_lightning
jacksonEcooper wrote:

I also wrote a program for downloading all of your chess.com games at once, and my program will also add the move count (PlyCount) to every game, which chess.com omits for some reason: https://github.com/jacksoncooper12/PGNScraper just open the shortcut icon and give it your username! Note: .NET Framework 5.0 will need to be installed on your machine

How do you use this? There are no download instructions or installation instructions. All I see is a folder called Code and a file called PGNScraper.lnk

cezarywagner

I done better tool much simpler and always working wink.png

https://github.com/ChameleonRed/cw_download_chess_com_games

blunder_and_lightning
cezarywagner wrote:

I done better tool much simpler and always working

https://github.com/ChameleonRed/cw_download_chess_com_games

 

How do you use this tool? Are there installation instructions for people who aren't familiar with code?

 

cezarywagner
blunder_and_lightning wrote:
cezarywagner wrote:

I done better tool much simpler and always working

https://github.com/ChameleonRed/cw_download_chess_com_games

 

How do you use this tool? Are there installation instructions for people who aren't familiar with code?

 

You need install Python than:
pip install cw-download-chess-com-games

Rest is here command line.
https://github.com/ChameleonRed/cw_download_chess_com_games

It just work if you follow instructions.

Of course instruction can be more detailed but I assume that installation of Python not need knowledge of programming at all.

Possible is also to make exe package for antiprogrammers but if you learn how to install Python it is not need (click, click, ...). Whatever "exe" is little insecure so better to install Python on your own and run pip which is included in Python.

zsbostonma

Another option is to use this link to get all your games by month in pgn format. It only took a small amount of time to download and import into Chessbase for me.

 

https://api.chess.com/pub/player/hikaru/games/2022/12/pgn