GitHub - atmz/nytccli: NYT Cooking CLI

1 min read Original article ↗

nytc

CLI tool for NYT Cooking recipes.

Installation

Using pipx (recommended)

This installs nytc globally in an isolated environment.

Development install

make install-dev
source .venv/bin/activate

Setup

Before using, configure your NYT Cooking authentication:

You'll need to grab your cookie and user ID from your browser:

  1. Log into cooking.nytimes.com
  2. Open Developer Tools (F12)
  3. Go to Application > Cookies > cooking.nytimes.com
  4. Copy the NYT-S cookie value
  5. Find your user ID in regi_cookie (look for regi_id=XXXXXXXX)

Usage

Search for recipes

nytc search "chicken parmesan"

Get recipe details

List saved recipes

All commands output JSON to stdout. Errors are output to stderr.

Development

make install-dev    # Install with dev dependencies
make test           # Run tests
make clean          # Remove venv and caches