Update NYT.py

This commit is contained in:
2023-11-15 10:52:28 -05:00
committed by GitHub
parent a65b1cccda
commit 1cede0e9a2

2
NYT.py
View File

@@ -13,7 +13,7 @@ table = soup.find_all("div", {"class":"pz-game-screen"})[0]
script = table.find_all("script", {"type":"text/javascript"})
text = script[0].get_text().split("=")[1]
Dict = json.loads(text)
grid = np.array( Dict[difficulty]["puzzle_data"]["puzzle"] ).reshape(9,9).tolist()
grid = np.array( Dict["hard"]["puzzle_data"]["puzzle"] ).reshape(9,9).tolist()
hard_puzzle_id = Dict["hard"]["puzzle_id"]
hard_published = Dict["hard"]["published"]