This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(async () => { | |
year=2023 | |
username = 'hikaru' | |
for(var month=1; month<=12; month++) { | |
let url = `https://api.chess.com/pub/player/${username}/games/${year}/${month}/pgn` | |
response = await fetch(url) | |
const bodyText = await response.text(); | |
const blob = new Blob([bodyText], { type: 'text/plain' }); | |
const a = document.createElement('a'); | |
a.style.display = 'none'; |
OlderNewer