Skip to content

Add downloader for Financial Times puzzles - #180

Open
lmfont wants to merge 316 commits into
thisisparker:mainfrom
lmfont:financial-times
Open

lmfont wants to merge 316 commits into
thisisparker:mainfrom
lmfont:financial-times

Conversation

@lmfont

@lmfont lmfont commented Feb 3, 2024

Copy link
Copy Markdown
Contributor

This adds a downloader for the three Financial Times puzzles - the daily Cryptic, the weekly Polymath, and weekly Weekend puzzle.

This adds a new dependency on pycryptodome for AES decryption. I approached this in such a way that the dependency could easily be swapped out with a different one if preferable.

federicomenaquintero and others added 30 commits November 10, 2020 12:16
Instead of stuffing it back in self.output
…omputed

And remove that check from AmuseLabsDownloader.save_puz().  The
additional check for self.output is already covered in
BaseDownloader.save_puz().
Now the downloader does not have to be concerned with saving.
Keep that concern in main().  This moves the check for the ".puz"
suffix to main() also.
thisisparker and others added 20 commits January 5, 2024 22:52
…er#158)

* add --preserve-html flag to preserve html
* add --preserve-html and lossy conversion info to README
I think I'm going to have to test this pretty much live in the repo, so let's give it a shot
…parker#162)

McKinsey's class names have not been totally stable, but the link order seems to be. I think it's enough to grab the first one that matches this path start
Bumps [requests](https://github.com/psf/requests) from 2.28.1 to 2.31.0.
- [Release notes](https://github.com/psf/requests/releases)
- [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md)
- [Commits](psf/requests@v2.28.1...v2.31.0)

---
updated-dependencies:
- dependency-name: requests
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Parker Higgins <parker@parkerhiggins.net>
…hisisparker#173)

* nytimes: accommodate moreAnswers field for otherwise blank squares
* add some status check tests for special NYT puzzles
* nytimes: accomodate blank clues
* workflows: add blank clue test to status check
@lmfont

lmfont commented Feb 3, 2024

Copy link
Copy Markdown
Contributor Author

I just want to say it's understandable if you don't want to add this one, either because of the added dependency or the deobfuscation involved. It was no great amount of work on my part, I just set it as my Sunday project (last Sunday), and I've been testing it every day since then to make sure it worked reliably.

Hopefully FT does not syndicate their crosswords from some other, more easily scraped source. I attempted to figure out if this was the case, but didn't see any evidence of it.

@mixographer

Copy link
Copy Markdown

I tried to test this change, but I just get an error stating that the keyword is unrecognized.

Keyword ftc not recognized.

@lmfont

lmfont commented Jun 14, 2024

Copy link
Copy Markdown
Contributor Author

I tried to test this change, but I just get an error stating that the keyword is unrecognized.

Keyword ftc not recognized.

Could you provide reproduction steps? The following works for me:

git clone https://github.com/thisisparker/xword-dl
cd xword-dl
git fetch origin pull/180/head:ft
git checkout ft
python -m xword_dl ftc

@mixographer

Copy link
Copy Markdown

@afontenot you are correct, this does work for me, I was doing it wrong.

@mixographer

Copy link
Copy Markdown

This was working for me, but today it seems to fail:

File "/opt/homebrew/lib/python3.11/site-packages/xword_dl-2024.7.20-py3.11.egg/xword_dl/downloader/financialtimesdownloader.py", line 95, in <lambda> for _, clue in sorted(xword[direction].items(), key=lambda x: int(x[0])): ^^^^^^^^^ ValueError: invalid literal for int() with base 10: '21D'

@lmfont

lmfont commented Oct 18, 2024

Copy link
Copy Markdown
Contributor Author

This was working for me, but today it seems to fail:

Can confirm, I'll look at it.

@lmfont

lmfont commented Oct 18, 2024

Copy link
Copy Markdown
Contributor Author

So the issue is that there's a bogus clue, it's even in the web interface:

Screenshot_20241018_024629

The issue is that there are two 21 Down clues, and one of them is at the end with a 21D label instead of the usual clue number.

Maybe this is some hack they've put in the puzzle format to allow one clue to reference another? Edit: it's not, there are other clues with references like 11 Down. I could make the code skip invalid clues but I'm not sure if that is really reasonable here. I'm not inclined to make a change like that if this is a genuine mistake in their puzzle.

@mixographer

Copy link
Copy Markdown

Ahh. Makes sense.

@lmfont
lmfont force-pushed the financial-times branch from debced7 to 1adbb41 Compare July 20, 2026 06:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants