Skip to content

Commit

Permalink
Keep the old answers in the answers list
Browse files Browse the repository at this point in the history
Realized moving them to the guesses list would harm infinite mode, now it just appends them after the new answers which isn't perfect but probably the best I can do
  • Loading branch information
Epicpkmn11 committed Nov 9, 2022
1 parent 3b3917c commit 752db3b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 5 additions & 2 deletions resources/update-words.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,15 @@ def update_words(output):

# So we can get that and grab the base list incase they ever update that again
js = get(script).text
guesses = json.loads(re.findall(r'\["aahed"(?:,"\w{5}")*\]', js)[0])
guesses = json.loads(re.findall(r'\["aahed"(?:,"\w{5}")*(?=,"cigar")', js)[0] + "]")
guesses.sort()
choices = json.loads("[" + re.findall(r'"cigar"(?:,"\w{5}")*\]', js)[0])

# Now scrape the real upcoming answers since that's in a special API now
choices = choices[:506] + scrape_answers(506) # 506 is the day they started this
new_answers = scrape_answers(506) # 506 is the day they started this

choices = [word for word in choices if word not in new_answers]
choices = choices[:506] + new_answers + choices[506:]

output.write('''#include "words.hpp"
Expand Down
Loading

0 comments on commit 752db3b

Please sign in to comment.