Package: xword-dl
xword-dlxword-dlis a command-line tool to download .puz files for online crossword puzzles from supported outlets or arbitrary URLs with embedded crossword solvers. For a supported outlet, you can easily download the latest puzzle, or specify one from the archives.Supported outlets:OutletKeywordDownload latestSearch by dateSearch by URLAtlanticatl✔️✔️Crossword Clubclub✔️✔️✔️The Daily Beastdb✔️Der Standardstd✔️✔️The Globe And Mail cryptictgam✔️✔️✔️Guardian Crypticgrdc✔️✔️Guardian Everymangrde✔️✔️Guardian Prizegrdp✔️✔️Guardian Quickgrdq✔️✔️Guardian Quipticgrdu✔️✔️Guardian Speedygrds✔️✔️Guardian Weekendgrdw✔️✔️Los Angeles Timeslat✔️✔️The McKinsey Crosswordmck✔️✔️✔️The Modern Crosswordmod✔️✔️✔️New York Timesnyt✔️✔️✔️New York Times Mininytm✔️✔️✔️New York Times Varietynytv✔️The New Yorkertny✔️✔️✔️Newsdaynd✔️✔️Simply Daily Puzzlessdp✔️✔️✔️Simply Daily Puzzles Crypticsdpc✔️✔️✔️Simply Daily Puzzles Quicksdpq✔️✔️✔️Universaluni✔️✔️USA Todayusa✔️✔️Voxvox✔️Wall Street Journalwsj✔️✔️Washington Postwp✔️✔️To download a puzzle, installxword-dland run it on the command line.InstallationThe easiest way to installxword-dlis throughpip. Install the latest version with:pip install xword-dlYou can also installxword-dlby downloading or cloning this repository from Github. From a terminal, simply runningpython setup.py installin the downloaded directory may be enough.But in either case, you probably want to installxword-dland its dependencies in a dedicated virtual environment. I usevirtualenvandvirtualenvwrapperpersonally, but that's a matter of preference. If you're already feeling overwhelmed by the thought of managing Python packages, know you're not alone. Theofficial documentation is pretty good, but it's a hard problem, and it's not just you. If it's any consolation, learning how to use virtual environments today on something sort of frivolous like a crossword puzzle downloader will probably save you from serious headaches in the future when the stakes are higher.UsageOnce installed, you can invokexword-dl, providing the short code of the site from which to download. If you runxword-dlwithout providing a site keyword, it will print some usage instructions and then exit.For example, to download the latest Newsday puzzle, you could run:xword-dl nd --latestor simplyxword-dl ndYou can also download puzzles that are embedded in AmuseLabs solvers or on supported sites by providing a URL, such as:xword-dl https://rosswordpuzzles.com/2021/01/03/cover-up/In either case, the resulting .puz file can be opened withcursewordsor any other puz file reader.Specifying puzzle dateSome outlets allow specification of a puzzle to download by date using the--dateor-dflag. For example, to download the Universal puzzle from September 22, 2021, you could run:xword-dl uni --date 9/22/21The argument provided after the flag is parsed pretty liberally, and you can use relative descriptors such as "yesterday" or  "monday". Use quotes if your date contains spaces (such as "June 16, 2022").Specifying filenamesBy default, files will be given a descriptive name based on puzzle metadata. If you want to specify a name for a given download, you can do so with the-oor--outputflag. The following tokens are available:TokenValue%outletOutlet name%prefixHardcoded outlet prefix%titlePuzzle title%authorPuzzle author%cmdPuzzle outlet keyword%netlocNetwork location (domain and subdomain)date tokensstrftimetokensConfiguration fileWhen runningxword-dl, a configuration file is created to store persistent settings. By default, this file is located at~/.config/xword-dl/xword-dl.yaml. You can manually edit this file to pass options toxword-dlat runtime.Most settings are specified by the command keyword. For example, if you want to saveUSA Todaypuzzles in this format:USA Today - By Brooke Husic  Ed. Erik Agard - Right Turns - 221115.puzyou can specify that by editing your config file to include the following lines:usa:
  filename: '%prefix - %author - %title - %y%m%d'In addition to command keywords, you can also use the keysgeneral(to apply to all puzzles),url(to apply to embedded puzzles selected by URL at runtime) or with a givennetloc(to apply to embedded puzzles at a given domain or subdomain).New York Times authenticationNew York Times puzzles are only available to subscribers. Attempting to download with thenytkeyword without authentication will fail. To authenticate, run:xword-dl nyt --authenticateand you will be prompted for your New York Times username and password. (Those credentials can also be passed at runtime with the--usernameand--passwordflags.)If authentication is successful, an authentication token will be stored in a config file. Once that token is stored, you can download puzzles withxword-dl nyt.In some cases, the authentication may fail because of anti-automation efforts on New York Times servers. If the automatic authentication doesn't work for you, you canmanually find your NYT-S tokenand save it in your config file.