Spaces:
Running
Running
bradley6597
commited on
Commit
•
401609b
1
Parent(s):
c8e9ef0
Update app.py
Browse files
app.py
CHANGED
@@ -11,7 +11,7 @@ english_dict = pd.read_csv("dictionary.txt",
|
|
11 |
english_dict = english_dict.reset_index(drop = True)
|
12 |
english_dict = english_dict.dropna()
|
13 |
|
14 |
-
url = 'https://spellbee.org'
|
15 |
def spell_bee_solver(no_centre, centre):
|
16 |
full_set = set(no_centre.lower() + centre.lower())
|
17 |
spell_bee_solver = english_dict[english_dict['word'].str.contains(str(centre.lower()), regex = False)]
|
@@ -33,6 +33,7 @@ def get_spellbee_answers(x):
|
|
33 |
content = requests.get(url)._content
|
34 |
content = re.sub(".*window.game = ", "", str(content))
|
35 |
content = re.sub("(.*?)\\;.*", "\\1", content)
|
|
|
36 |
content = json.loads(content)
|
37 |
valid_words = content['data']['dictionary']
|
38 |
final_word_df = pd.DataFrame(valid_words, columns = ['word'])
|
|
|
11 |
english_dict = english_dict.reset_index(drop = True)
|
12 |
english_dict = english_dict.dropna()
|
13 |
|
14 |
+
url = 'https://spellbee.org/unlimited?id=hagilno'
|
15 |
def spell_bee_solver(no_centre, centre):
|
16 |
full_set = set(no_centre.lower() + centre.lower())
|
17 |
spell_bee_solver = english_dict[english_dict['word'].str.contains(str(centre.lower()), regex = False)]
|
|
|
33 |
content = requests.get(url)._content
|
34 |
content = re.sub(".*window.game = ", "", str(content))
|
35 |
content = re.sub("(.*?)\\;.*", "\\1", content)
|
36 |
+
print(content)
|
37 |
content = json.loads(content)
|
38 |
valid_words = content['data']['dictionary']
|
39 |
final_word_df = pd.DataFrame(valid_words, columns = ['word'])
|