Sequel to this question: Live statistics chess960 from chess.com?
So suppose I go to like
https://api.chess.com/pub/player/gmwso/games/2020/12
or
https://api.chess.com/pub/player/gmwso/games/2020/12/pgn
there's gonna be a bunch of stuff like say
[UTCDate "2018.01.03"]
[WhiteElo "2706"]
[BlackElo "2940"]
How do I get this data into a spreadsheet like column 1 is all the dates, column 2 is the corresponding white elo, column 3 black elo, col4 white username and col5 black username?
Update 2: Fixed now. see the 'json' vs the 'preformed'. WOW.
Update 1: It appears Mike Steelson has an answer here, where the code is given as
=arrayformula( regexextract(split( substitute(substitute(substitute(getDataJSON(A1;"/games";"/pgn");"[";"");"]";"");"""";"") ;char(10));"\s.*") )
with an example given here
https://docs.google.com/spreadsheets/d/1MX1o5qdy0K3gTMzbimUV3SmFf-0XPCSJ8Vz4IjI-8Ak/copy
It appears there's a problem when it gets to the case of chess960 only. Consider for example this player: Replacing 'gmwso' with the player's username will yield a weird output. i imagine the output will be messier for mixed chess960 and chess.
From lichess.org, assuming the pgn file has been loaded into your drive (if I catch info directly from lichess.org, google alerts 'Exceeded maximum execution time')
https://docs.google.com/spreadsheets/d/1ZX-YefSfeNx0z6mo7Bo3EY_tOkYcVLT7Ke0fqQUiHNI/copy