thisisparker / xword-dl

⬛⬜⬛ Command line tool to scrape crosswords from online solvers and save them as .puz files ⬛⬜⬛
MIT License
147 stars 32 forks source link

Support for the Globe and Mail's cryptic crosswords? #52

Closed nekohayo closed 2 years ago

nekohayo commented 2 years ago

This is purely a wishlist item on my part, as I have no competency to provide a patch, but I'm filing it in case someone is interested by the challenge :)

My dad plays The Globe and Mail's "Cryptic Crossword" everyday and it would be nice if he didn't have to go through a browser for it, and if it was made available in GNOME Crosswords, so I'll presume this library here is where the scraping magic happens. The Globe and Mail has various puzzles and crosswords:

thisisparker commented 2 years ago

Hi there!

The Universal one you linked to is not a cryptic — it looks like it's actually the syndicated Universal crossword which xword-dl already supports. So, at least that one's easy!

The Daily Cryptic is scrapeable, and I've actually previously written code to do so, but it's not merged into the main branch for esoteric reasons. I like the idea of it though, and maybe this is the nudge I need to get that done! I'll keep this ticket open until it lands.

Thanks!

mixographer commented 2 years ago

While this is open I'll add the feature request for the Guardian puzzles. I saw you were helping rentalcustard with https://github.com/rentalcustard/guardianpuz the guardian cryptics. He's got the basic parsing, but doesn't put the solutions in the .puz output. I'll take a look at your comments on his repo and see if I can parse the solutions, but if you're adding some cryptics, my vote would be for the guardian ones as well.

thisisparker commented 2 years ago

Quick update on this front: #64 (which is merged but not yet shipped in a release) adds support for Crossword Compiler widgets like the ones that Globe and Mail uses BUT cannot yet find the file containing the data on a Globe and Mail page.

For example a script loaded by a page like https://www.theglobeandmail.com/puzzles-and-crosswords/cryptic-crossword/?date=141122&T=0 loads another javascript file that contains all the puzzle data we need, but I haven't found a good way yet of determining where that file is automatically.

thisisparker commented 2 years ago

Alright, Globe and Mail support should be covered by #65, which is also merged but not yet shipped. I'll close this issue when the next release goes out!

mixographer commented 2 years ago

I pulled these latest changes and tested it out on every Globe and Mail cryptic I could find. Worked great! Thanks for taking this one on.

thisisparker commented 2 years ago

Closed in v2022.11.16 🎉

nekohayo commented 1 year ago

After a long winter, I finally got around to testing this out with the latest versions of GNOME Crosswords etc., and it "Just Works". Thank you very much @thisisparker, this is awesome and a much better user experience to have it in a dedicated app (and to have crosswords from multiple sources!)... I am quite sure my dad will be STOKED 🤩