Albin Larsson: Blog

Culture, Climate, and Code

New York Times Sudoku Scraper

12th May 2023

You get home late and go to bed only to find that you missed the New York Times’ daily sudoku puzzle? Maybe you skip the puzzle one day? Or maybe you just want to play it in an app of your choise.

I just wrote a basic script, which uses Regular Expressions to extract the puzzle from the New York Times website. I’m particularly fond of how it parses the JavaScript game data as JSON, who knows how long it will last. Combined with a sheduled Github Action’s workflow and a little bit of Git scraping it should pull the hard pussle each day and store it in a .sdk file.

The script is available on Github and hopefully it will build up a nice Sudoku archive over time. Now I just need to make it easier to load custom games into GNOME Sudoku.

Related posts