Skip to content

Releases: lukwam/nytimes-games

v0.9.2

Choose a tag to compare

@lukwam lukwam released this 05 Oct 14:30
b5352e7

Added

  • connections_latest(puzzle_ids) and strands_latest(puzzle_ids): your
    saved Connections and Strands games, shaped like wordle_latest() (up to
    30 puzzle IDs per call; states only includes games you've played). Game
    data is lenient, since older games vary: every field is optional and extra
    fields are kept. isPlayingArchive tells games played from the archive
    apart. Requested by nyt-puzzles.
  • nytg history connections (won or lost, mistakes, groups found) and
    nytg history strands (solved, other words found).
  • GET /connections/latest and GET /strands/latest in the API.

v0.9.1

Choose a tag to compare

@lukwam lukwam released this 05 Oct 01:21
a399094

Fixed

  • nytg archive crossword-* saved only one puzzle on dates with two (such as
    2022-12-31, where it kept the Supermega and skipped the daily). Crosswords
    are now listed from the games archive and fetched by ID; dates with two
    puzzles save each as YYYY-MM-DD-ID, and single-puzzle dates keep their
    YYYY-MM-DD names, so existing archives resume as before. Future dates
    are still fetched by date.

v0.9.0: an MCP server for AI agents

Choose a tag to compare

@lukwam lukwam released this 05 Oct 00:50
bf95c58

Added

  • nytg-mcp, a local MCP server for AI agents, behind the mcp extra
    (pip install "nytimes-games[mcp]"): 15 tools for puzzles (with crossword
    entries and crossings), WordleBot, the puzzle archive, your stats, today's
    games and histories, and crossword export. Answers are hidden unless
    include_answers is set; cookies come from NYT_COOKIES or your nytg
    profile and are never returned or logged; every tool is read-only except
    export_crossword.
  • nytgames.views: the plain data behind nytg's commands (puzzle views with
    answers hidden, today, histories, WordleBot comparisons), shared by nytg and
    the MCP server.

v0.8.4

Choose a tag to compare

@lukwam lukwam released this 05 Oct 00:39
1903fb8

Fixed

  • Saved game states from older games failed validation, failing whole
    batches in spelling_bee_latest() and wordle_latest(): Spelling Bee
    games without a rank, and Wordle games in a rounds-based format
    (rounds, currentRoundIndex, puzzleComplete, no guesses). These fields
    are now optional, the rounds-based fields are typed, and
    WordleGameData.rounds_format tells the formats apart. print_date (often
    empty on older games) and timestamp are optional too. Found by
    nyt-puzzles.
  • nytg today and nytg history show these games as "played".

v0.8.3: cookie safety fix

Choose a tag to compare

@lukwam lukwam released this 05 Oct 00:15
1d53806

Security

  • nytg could print cookie values in a traceback when NYT_COOKIES or
    --cookies held a Cookie-Editor JSON export: it was parsed as a Cookie
    header string, producing an invalid header whose error message contained
    every cookie. Reported by nyt-puzzles. If you hit this, rotate your NYT
    cookies (log out and back in).

Fixed

  • parse_cookies() (and so NYTGamesClient, NYT_COOKIES and
    --cookies) accepts a JSON export or JSON object as a string.
  • Cookies are checked before any request; invalid ones raise ValueError
    naming the cookie but never showing its value.
  • nytg never prints raw tracebacks: unexpected errors print a one-line
    message with any cookie values redacted.

v0.8.2: WordleBot

Choose a tag to compare

@lukwam lukwam released this 04 Oct 23:07
0f35125

Added

  • WordleBot: wordlebot() returns your analysis of today's Wordle (luck and
    skill, overall and by round; needs cookies, today only, after you've opened
    WordleBot), and wordlebot_summary(date) returns how everyone did on any
    day since 2021-06-19, including the bot's solve paths.
  • nytg wordlebot [DATE] compares your luck and skill with everyone's and
    shows where your skill falls among players; --answers shows the bot's
    paths. API routes /wordlebot and /wordlebot/{date}/summary.
  • Cookies are only sent to NYT's main site, never to its static file server.

v0.8.1

Choose a tag to compare

@lukwam lukwam released this 04 Oct 22:44
c96ed46

Fixed

  • archive() could silently drop the first day of a 31-day window when a
    date in it had two puzzles, because NYT returns at most 31 puzzles per
    request (e.g. 2022-12-01, next to 2022-12-31's daily and Supermega).
    Windows that hit the limit are now split and fetched again. Both puzzles on
    a two-puzzle date are returned, sorted by date and ID. Found by nyt-puzzles.

Added

  • crossword_by_id(puzzle_id) for any crossword by ID, such as the second
    puzzle on a date that has two. API route /crosswords/id/{puzzle_id} and
    nytg crossword --id.

v0.8.0: puzzle structure, retries, fidelity reports and a live NYT check

Choose a tag to compare

@lukwam lukwam released this 04 Oct 22:36
72522ac

Added

  • A live check of every game against NYT runs every morning, with a README
    badge showing the latest result. Failures open an issue automatically.

  • A coverage badge.

  • Puzzle structure helpers: CrosswordPuzzle.entries() (each entry's clue,
    full answer, squares, coordinates, crossings and referenced clues) and
    .squares(), StrandsPuzzle.words() (words with their paths) and
    ConnectionsPuzzle.board(). Special puzzles are kept as they are.

  • formats.fidelity(puzzle, fmt, game=None): what an export approximates or
    leaves out, such as shading shown as circles in .puz or italics in clues.
    nytg crossword --save prints these notes.

  • nytg archive keeps a manifest.json per game with each file's retrieval
    time, NYT's update time, the nytimes-games version and a SHA-256 hash.
    With --overwrite, puzzles NYT has changed keep their previous version
    in revisions/ and are reported as changed.

  • Examples: a Letter Boxed solver, clue reuse across crosswords, and solve
    times by weekday and constructor.

  • A README capability matrix: what each method returns and which fields are
    spoilers.

  • Retries with exponential backoff for failed connections, timeouts, rate
    limits and NYT server errors, honoring Retry-After
    (NYTGamesClient(retries=3, backoff=0.5)). Sessions you pass in are used
    as is.

  • NYTGamesRateLimitError (429 after retries) with retry_after, and a
    matching nytg message.

  • NYTGamesClient(base_url=...), for proxies and testing.

  • urllib3 is declared as a dependency (it comes with requests).

Fixed

  • crossword_puzzles() returned a validation error when NYT sends null
    results (for empty ranges and ranges that are too long); it now returns an
    empty list. Its docs recommend ranges of 90 days or less.

v0.7.0: export crosswords to .puz, .ipuz and XML

Choose a tag to compare

@lukwam lukwam released this 04 Oct 21:22
6d73707

Added

  • nytgames.formats: export crosswords to Across Lite .puz, .ipuz and
    Crossword Compiler rectangular-puzzle .xml, with the user's saved
    progress (fill, revealed and penciled squares, and the .puz timer).
    Rebus squares, circles and shading are kept where the format allows.
    export(), to_puz(), to_ipuz(), to_xml() and export_problems().
  • NYTGamesExportError for puzzles whose gimmicks a format can't represent,
    with the reasons.
  • nytg crossword ... --save FILE [--progress] and
    nytg archive crossword-* --as puz|ipuz|xml.
  • API route /crosswords/{publish_type}/{date}/download?format=puz.

v0.6.1

Choose a tag to compare

@lukwam lukwam released this 04 Oct 19:11
54d50c7

Fixed

  • Crosswords with special square labels no longer fail validation.
    CrosswordPuzzleCell.label is still an int for numbered squares, and a
    string for text labels such as CW or arrows (2000-02-13, 2007-07-01,
    2017-07-02). CrosswordPuzzleClue.label is optional, for special clues
    like 2016-03-24's "Around" clue.
  • nytg crossword --answers no longer repeats letters in clues that turn a
    corner.