Spaces:
Runtime error
Runtime error
File size: 629 Bytes
e6a9cb0 dda94e6 e6a9cb0 dda94e6 e6a9cb0 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
import requests
def get_secret(puzzle_num: int):
request_url = f"https://semantoru.com/yesterday/{puzzle_num+1}"
response = requests.get(request_url)
if response.status_code == 200:
return response.content
else:
print("Not found error.")
def get_guess(word: str, puzzle_num: int):
request_url = f"https://semantoru.com/guess/{puzzle_num}/{word}"
response = requests.get(request_url)
print(response.status_code)
if response.status_code == 200:
output = response.json()
return output["guess"], output["sim"], output["rank"]
else:
return word, None, None |