Skip to content

Commit b13851a

Browse files
committed
Code improvements
1 parent b509def commit b13851a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

wordle_solver/wordle_solver.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def on_release(key):
3333

3434
# Get the status of the letters in the wordle
3535
def get_row_results(game_row):
36-
tiles = game_row.find_elements(By.CLASS_NAME, "Tile-module_tile__UWEHN")
36+
tiles = game_row.find_elements(By.XPATH, ".//*[contains(@class, 'Tile-module_tile__')]")
3737
row_results = []
3838
res_to_int = {
3939
"correct": 1,
@@ -167,7 +167,7 @@ def main():
167167
time.sleep(1)
168168

169169
# Get the game rows
170-
game_rows = browser.find_elements(By.CLASS_NAME, 'Row-module_row__pwpBq')
170+
game_rows = browser.find_elements(By.XPATH, "//*[contains(@class, 'Row-module_row__')]")
171171

172172
# Enter words until the game is over or the wordle is solved
173173
for i in range(guesses_left, 0, -1):

0 commit comments

Comments
 (0)