Added date search for Vox. To accomplish this, enhanced find_by_date … #209
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Added date search for Vox. To accomplish this, enhanced find_by_date to return a list of candidate URLs. xword_dl.py now looks to see if it was passed a candidate URL list, and if so, it attempts to find a puzzle at any of the candidate URLs.
For example, in the case of Vox, all of the puzzle URLs contain an author prefix and a numeric suffix. These prefixes and suffixes are limited in possibility. Therefore, if we build a list of all the possible combinations, it's possible to derive the correct puzzle url.
Caveats: This relies on the website being consistent in how they build these puzzle IDs. Vox is hilariously bad at this (or maybe intentionally doing it)
Examples:
The puzzle on 2024-10-29 incorrectly used 20241028 as its date in the url.
The puzzles between 2020-04-10 and 2020-04-24 insert an extra 0 in the date string.
For the vast majority of puzzles, this script will work, but it is not flawless.